Skip to content

Limit the pipeline to pull only the repo where the MR is

Achilleas Pipinellis requested to merge limit-pulls into master

Limit the pipeline to pull only the repo where the MR is, not all 4, to save time/space.

Part of https://gitlab.com/gitlab-com/gitlab-docs/issues/215

Tested locally with the following.

On a gitlab-docs branch other than master:

  • CI_COMMIT_REF_NAME=test rake default - All the remote branches are set to master so they are not pulled.
  • CI_COMMIT_REF_NAME=test BRANCH_CE=docs/autodevops-k8s BRANCH_RUNNER=fix-codequality rake default - Only the CE and RUNNER products are pulled since their branches are other than master.

On the gitlab-docs master branch:

  • CI_COMMIT_REF_NAME=master BRANCH_CE=docs/autodevops-k8s BRANCH_RUNNER=fix-codequality rake default - All products are pulled, CE and RUNNER with the custom branches, the other two with the default master.
  • CI_COMMIT_REF_NAME=master rake default - All products are pulled from their master branch.

Benchmark

The compile_dev job now finishes in 42s instead of 2min 19s!

Issues

Closes https://gitlab.com/gitlab-com/gitlab-docs/issues/219

Edited by Achilleas Pipinellis

Merge request reports