The below case shows that the var a is available in step1 but not in step2
tasks:
- name: task
task:
- func: shell
name: step1
vars:
a: aaa
b: bbb
do:
- pwd
- func: shell
name: step2
do:
- echo "{{.a}}"
loading [Config]: ./tests/functests/upconfig.yml
Main config:
Version -> 1.0.0
RefDir -> ./tests/functests
WorkDir -> cwd
AbsWorkDir -> /up_project/up
TaskFile -> c0035
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/c0035
module: [self], instance id: [dev], exec profile: []
profile - envVars:
(*core.Cache)({
})
Task1: [task ==> task: ]
-Step1: [step1: ]
self: final context exec vars:
(*core.Cache)({
"a": "aaa",
"b": "bbb",
"up_runtime_task_layer_number": 0
})
cmd( 1):
pwd
-
/up_project/up
-
.. ok
. ok
-Step2: [step2: ]
self: final context exec vars:
(*core.Cache)({
"last_result": (*utils.ExecResult)({
Cmd: "pwd",
Code: 0,
Output: "/up_project/up",
ErrMsg: ""
}),
"up_runtime_task_layer_number": 0
})
cmd( 1):
echo "{{.a}}"
-
<no value>
-
.. ok
. ok