Warnings: 'deploy.external_services.branch',
'deploy.external_services.revision',
'deploy.internal_services.branch' and
'deploy.internal_services.revision' are invalid keyword arguments
for 'salt.state'. If you were trying to pass additional data to be
used in a template context, please populate 'context' with 'key:
value' pairs. Your approach will work until Salt Carbon is out.
Please update your state files.
And
[ERROR ] Data passed to highstate outputter is not a valid highstate return: {'
plat01.pod1.local.or.certainaws.com': ["Rendering SLS 'common:deploy.internal_services' failed: Jinja variable 'salt.utils.context.NamespacedDictWrapper object' has no attribute 'deploy'", "Rendering SLS 'common:deploy.external_services' failed: Jinja variable 'salt.utils.context.NamespacedDictWrapper object' has no attribute 'deploy'”]}
My orchestrate runner now looks like this:
deploy_internal_and_external_services:
salt.state:
- tgt: plat[0-9]{2,3}.{{ pod }}.{{ pillar.deploy.environment }}.*
- tgt_type: pcre
- saltenv: common
- batch: 50%
- sls:
- deploy.internal_services
- deploy.external_services
- pillar:
deploy.internal_services.revision: {{ pillar.deploy.internal_services.revision }}
deploy.external_services.revision: {{ pillar.deploy.external_services.revision }}
deploy.internal_services.branch: {{ pillar.deploy.internal_services.branch }}
deploy.external_services.branch: {{ pillar.deploy.external_services.branch }}
And I’ve tried accessing the variables in the state file as {{ pillar.deploy.internal_services.revision }} and as {{ deploy.internal_services.revision }}
deploy_new_{{ artifact }}:
cmd.run:
- name: curl --user '{{ pillar.bamboo.user }}:{{ pillar.bamboo.passwd }}' --insecure {{ pillar.bamboo.url }}/PRODUCTION-PLATFORM-{{ pillar.deploy.internal_services.revision }}/artifact/shared/dist/{{ artifact }}.zip --fail -o {{ artifact }}.zip