This jinja template values are feed by python code.
{% for host in targets %}
Test_Container_{{ host }}:
stage: testing
image: docker
services:
- docker:dind
extends: .job_AWX_TEMPLATE_TEST_APT
variables:
dest_ip: {{ host }}
srv_type: {{ srv_type }}
artifacts:
paths:
- './apt*'
{#
rules:
- if: $srv_type == "svc_all_apt"
when: on_success
#}
{% endfor %}
When I run the pipeline without rules, it works. When I specify the rule condition in child pipeline. it doesn't work. Bdw, in the variable section, can see the value svc_all_apt.
This the child pipeline content, after getting values.
Test_Container_10.10.102.253:
stage: testing
image: docker
services:
- docker:dind
extends: .job_AWX_TEMPLATE_TEST_APT
variables:
dest_ip: 10.10.102.253
srv_type: svc_all_apt
artifacts:
paths:
- './apt*'
{#
rules:
- if: $srv_type == "svc_all_apt"
when: on_success
#}
The error which I am getting, stating no downstream jobs or stages IN the above, code, condition matches, for srv_type. but fails to run the pipeline.