0

This the content of child pipeline, generated from jinja template and stored as artifacts in the previous job.

While triggering this child pipeline, it says, no stage or no job for this child pipeline.

Test_Container_10.10.102.240:
  stage: TEST
  image: docker
  services:
    - docker:dind
  extends: .job_AWX_TEMPLATE_TEST_APT
  variables:
    dest_ip: 10.10.102.240
    srv_type: svc_all_apt
  artifacts:
    paths:
      - './apt*'
  rules:
    - if: $srv_type == 'svc_all_apt'
      when: on_success

Here in the variable section, srv_type value is feed by python code in the jinja template.

When I disable the rule section, this pipeline works. Even when I run the same code as parent pipeline with rules, it works.

Why rule section is not working in the child pipeline
srv_type variable value comes from python code, in the previous job. 
Do I need to pass this value from the parent pipeline in this job.

1 Answers1

0

if: $srv_type == 'svc_all_apt'

You need to use double quotes for values, not single quotes.

  rules:
    - if: $srv_type == "svc_all_apt"
sytech
  • 29,298
  • 3
  • 45
  • 86