address:
suburb:
name: {{.student.address.suburb.name}}
postcode: 2000
CBD: yes
school: {{.student.address.school}}
prod is not within the instance(dev)’s group, so it is correct that school_prod is can not be rendered a value
scopes:
- name: global
vars:
student:
name: Tom
gender: Male
address:
suburb:
name: sydney
postcode: 2000
CBD: yes
school: Sydney Grammar
dvars:
- name: school_global
ref: d0030_school.yml
flags: [toObj]
- name: nonprod
members:
- dev
- staging
vars:
a: non-prod-a
b: non-prod-b
c: non-prod-c
d: non-prod-d
dvars:
- name: school_nonprod
ref: d0030_school.yml
flags: [toObj]
- name: prod
members:
- prod
vars:
a: prod-a
b: prod-b
c: prod-c
d: prod-d
dvars:
- name: school_prod
ref: d0030_school.yml
flags: [toObj]
- name: staging
vars:
a: staging-a
b: staging-b
dvars:
- name: sgp_address
ref: d0030_school.yml
flags: [toObj]
tasks:
- name: task
task:
- func: shell
do:
- echo """1.school_global -> {{.school_global}}""" - echo """2.school_global object
-> {{.school_global_object.address.suburb.name}}"""
- echo """3.school_nonprod -> {{.school_nonprod}}"""
- echo """4.school_nonprod object -> {{.school_nonprod_object.address.suburb.name}}"""
- echo """5.sgp address -> {{.sgp_address}}"""
- echo """6.sgp address object -> {{.sgp_address_object.address.suburb.name}}"""
- echo """7.school_prod -> {{.school_prod}}"""
- echo """8.school_prod object -> {{.school_prod_object.address.suburb.name}}"""
loading [Config]: ./tests/functests/upconfig.yml
Main config:
Version -> 1.0.0
RefDir -> ./tests/functests
WorkDir -> cwd
AbsWorkDir -> /up_project/up
TaskFile -> c0030
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/c0030
module: [self], instance id: [dev], exec profile: []
profile - envVars:
(*core.Cache)({
})
Task1: [task ==> task: ]
-Step1:
self: final context exec vars:
(*core.Cache)({
"student": {
"gender": "Male",
"address": {
"suburb": {
"postcode": 2000,
"CBD": true,
"name": "sydney"
},
"school": "Sydney Grammar"
},
"name": "Tom"
},
"d": "non-prod-d",
"c": "non-prod-c",
"b": "non-prod-b",
"sgp_address_object": {
"address": {
"suburb": {
"name": "sydney",
"postcode": 2000,
"CBD": true
},
"school": "Sydney Grammar"
}
},
"school_global": "address:\n suburb:\n name: sydney\n postcode: 2000\n CBD: yes\n school: Sydney Grammar\n",
"school_nonprod_object": {
"address": {
"suburb": {
"postcode": 2000,
"CBD": true,
"name": "sydney"
},
"school": "Sydney Grammar"
}
},
"school_nonprod": "address:\n suburb:\n name: sydney\n postcode: 2000\n CBD: yes\n school: Sydney Grammar\n",
"school_global_object": {
"address": {
"suburb": {
"name": "sydney",
"postcode": 2000,
"CBD": true
},
"school": "Sydney Grammar"
}
},
"sgp_address": "address:\n suburb:\n name: sydney\n postcode: 2000\n CBD: yes\n school: Sydney Grammar\n",
"up_runtime_task_layer_number": 0,
"a": "non-prod-a"
})
cmd( 1):
echo """1.school_global -> {{.school_global}}""" - echo """2.school_global object -> {{.school_global_object.address.suburb.name}}"""
-
1.school_global -> address:
suburb:
name: sydney
postcode: 2000
CBD: yes
school: Sydney Grammar
- echo 2.school_global object -> sydney
-
.. ok
cmd( 2):
echo """3.school_nonprod -> {{.school_nonprod}}"""
-
3.school_nonprod -> address:
suburb:
name: sydney
postcode: 2000
CBD: yes
school: Sydney Grammar
-
.. ok
cmd( 3):
echo """4.school_nonprod object -> {{.school_nonprod_object.address.suburb.name}}"""
-
4.school_nonprod object -> sydney
-
.. ok
cmd( 4):
echo """5.sgp address -> {{.sgp_address}}"""
-
5.sgp address -> address:
suburb:
name: sydney
postcode: 2000
CBD: yes
school: Sydney Grammar
-
.. ok
cmd( 5):
echo """6.sgp address object -> {{.sgp_address_object.address.suburb.name}}"""
-
6.sgp address object -> sydney
-
.. ok
cmd( 6):
echo """7.school_prod -> {{.school_prod}}"""
-
7.school_prod -> <no value>
-
.. ok
cmd( 7):
echo """8.school_prod object -> {{.school_prod_object.address.suburb.name}}"""
-
8.school_prod object -> <no value>
-
.. ok
. ok