Test ci config for backend MR running as if for foss
What does this MR do and why?
To Verify CI configuration against a future backend MR pipelines labeled with pipeline:run-as-if-foss.
Related issue: #381624 (closed)
This MR will create a manual job if CI configuration change has been made in an MR (i.e if .gitlab/ci/**.yml
files are changed) to verify the potential jobs being created in a future backend MR with pipeline:run-as-if-foss.
How does this work
- Team member makes a change to a CI configuration yml in branch
ci-config-branch
and submit an MR, which automatically starts an MR pipeline (pipline1). - A manual job will be available in the
prepare
state of the MR pipeline (pipeline1), which if started is allowed to fail. - When triggered to run, this manual job creates a branch
test-ci-config-ci-config-branch-backend-automated
, makes a dummy change to the backend file pattern, pushes a commit and create a MR against theci-config-branch
with the label pipeline:run-as-if-foss. - A "dry-run" pipeline, pipeline2, is therefore created for the dummy MR running CI following the new CI config from
ci-config-branch
. The jobs in pipeline2 will be canceled right away. - The manual job from pipeline1 then validates the jobs created in pipeline2, user can check to see if the resulting jobs in the dry-run pipeline are expected.
- pipeline2 then gets canceled immediately to minimize resource consumption.
- When user triggers the manual job from pipeline1, they have the option to supply a
REFERNCE_PIPELINE_ID
, which will be used for comparison and help user better visualize which jobs in pipeline2 are potentially different from the reference pipeline. - If
REFERENCE_PIPELINE_ID
is undefined, the job will simply list all the jobs that will be created for a sanity check.
Test results
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jennifer Li