Introduce cross project as-if-foss pipeline
What does this MR do and why?
Introduce cross project as-if-foss pipeline: https://gitlab.com/gitlab-org/gitlab-foss/-/pipelines/1121599641
-
prepare-as-if-foss-branch
is the job to prepare theas-if-foss/*
branch. -
prepare-as-if-foss-env
is the job to prepare the variables and decide what jobs we want to run in the cross project FOSS pipeline.- https://gitlab.com/gitlab-org/gitlab/-/jobs/5831884506
- For example, if we run unit tests in the merge request, we also run unit tests in the FOSS pipeline. We run respective jobs based on the merge request pipeline.
Notes
- We do not need a sandbox project because all the code can be reviewed from the merge request. Nevertheless, developers should always be mindful when triggering a pipeline from a fork.
- To gradually switch the
as-if-foss jobs
to a newas-if-foss pipeline
, we keep the originalas-if-foss jobs
, and introduce a new ~"pipeline:run-as-if-foss-cross-project" to trigger the newas-if-foss pipeline
. It is not supposed to cover all the FOSS jobs in the first few iterations. When we're confident that it's all covered, we'll change pipeline:run-as-if-foss to trigger this new pipeline and delete as-if-foss jobs and remove the intermediate ~"pipeline:run-as-if-foss-cross-project". - Not sure if we might hit into #436668 (closed) ?
TODO before merge
-
Create a new label ~"pipeline:run-as-if-foss-cross-project" for this new trigger -
Create an access token AS_IF_FOSS
in https://gitlab.com/gitlab-org/gitlab-foss/-/settings/access_tokens- With role
developer
and permissionwrite_repository
- With role
-
Put the above token as AS_IF_FOSS_TOKEN
in https://gitlab.com/gitlab-org/gitlab/-/settings/ci_cd- With
masked
- With
-
Set up maintenance scheduled pipelines to update FOSS cache or different versions of Ruby in https://gitlab.com/gitlab-org/gitlab-foss/-/pipeline_schedules
Related to #412717 (closed)
Edited by Lin Jen-Shin