load from refdir

By default when you use ref tag to load taskfrom a file, it will use the default refdir from cli command line args, however this could be overriden using the refdir tag in task configuration

how does it work?

By default the the refdir should be from below command line, its value will be: ./tests/functests

up ngo -d ./tests/functests -t $1 -i dev -v vvvv --configdir=./tests/functests

In this case, the refdir is overriden using your own customised location

Relavant

load dvar using refdir

references

Externalized c0089-task-main.yml reference

    flow:
      -
        func: shell
        do:
          - echo "task step 1"
          - echo "task step 2"
    

Demo

source

Main task yaml file
    vars:
      dynadir: ./tests/functests
    tasks:
    - name: task
      ref: c0089-task-main.yml
      refdir: '{{.dynadir}}'
    
Main log file
    loading [Config]:  ./tests/functests/upconfig.yml
    Main config:
                 Version -> 1.0.0
                  RefDir -> ./tests/functests
                 WorkDir -> cwd
              AbsWorkDir -> /up_project/up
                TaskFile -> c0089
                 Verbose -> vvv
              ModuleName -> self
               ShellType -> /bin/sh
           MaxCallLayers -> 8
                 Timeout -> 3600000
     MaxModuelCallLayers -> 256
               EntryTask -> task
      ModRepoUsernameRef -> 
      ModRepoPasswordRef -> 
    work dir: /up_project/up
    -exec task: task
    loading [Task]:  ./tests/functests/c0089
    module: [self], instance id: [dev], exec profile: []
    profile -  envVars:
    
    (*core.Cache)({
    })
    
    loading [flow ref]:  ./tests/functests/c0089-task-main.yml
    Task1: [task ==> task:  ]
    -Step1:
    self: final context exec vars:
    
    (*core.Cache)({
      "dynadir": "./tests/functests",
      "up_runtime_task_layer_number": 0
    })
    
    cmd( 1):
    echo "task step 1"
    
    -
    task step 1
    
    -
     .. ok
    cmd( 2):
    echo "task step 2"
    
    -
    task step 2
    
    -
     .. ok
    . ok
    
Logs with different verbose level
Raw logs with different verbose level