Skip to content

Use PIPELINE_TYPE logic for remaining CI jobs also

Balasankar 'Balu' C requested to merge use-pipeline-type-everywhere into master

What does this MR do?

  1. When we originally implemented PIPELINE_TYPE logic, we couldn't use it for trigger jobs because the variable wasn't available for bridge jobs due to inherit:variables being false.
  2. However, later, we came to know about trigger:forward setting which will let us control what all to forward to downstream/child pipelines. So now, we can drop the inherit:variables directive.
  3. But, another obstacle in using this for child pipelines is that we want to pass the variable PIPELINE_TYPE to the child pipeline to decide what all jobs it should have. But, if we set a value for it directly in the bridge job via job:variables, then this value will be used for evaluating the rules:if instead of the value computed using workflow rules. So, we want to specify the variable not in job:variables, but somewhere else and still have them passed to child pipelines. Fortunately, we have an option to specify the variables to be passed using rules:if:variables. The variables specified here aren't used for computing the rules, but will still get passed to the downstream pipelines. In this MR, the variables to be passed are specified specifically for each if clause so that they don't interfere with the rules calculation.

Related issues

Closes: #7225 (closed), #7315 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for the GitLab Chart opened
Edited by Balasankar 'Balu' C

Merge request reports