Skip to content

Update rules to fix docs pipelines

Marcel Amirault requested to merge only-run-doc-pipelines into master

What does this MR do?

I noticed that the docs pipelines were running the full pipeline by accident, see: https://gitlab.com/gitlab-org/omnibus-gitlab/-/pipelines/620080991

I believe this was caused by the config revamp in !6228 (merged), and I found some issues:

  • The regex needed a -, as per: https://gitlab.com/gitlab-org/omnibus-gitlab/-/blob/master/doc/development/pipelines.md?plain=1#L104
  • The CI_PROJECT_BRANCH in the docs rules is a typo, that variable doesn't exist, it should be $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME.
  • The other CI_PROJECT_BRANCH likely should be CI_COMMIT_BRANCH, assuming that's a branch pipeline and not an MR pipeline (needs to be checked).
  • All the jobs that extend .trigger-job: were also trying to run, due to a missing rule that excludes all those jobs from the docs pipelines, which caused the pipeline to fail: https://gitlab.com/gitlab-org/omnibus-gitlab/-/pipelines/620143697 so I copied the docs rule over there. The note in that part of the config makes me think this is the accepted fix: # Because of inherit:variables being false, `PIPELINE_TYPE` isn't available here. :( https://gitlab.com/gitlab-org/gitlab/-/issues/368759

Here is a test pipeline in a Draft MR to test the config, with a branch named docs-test-pipeline-config to verify the regex works: https://gitlab.com/gitlab-org/omnibus-gitlab/-/pipelines/620283898

Related issues

Related to !6228 (merged)

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 Robert Marshall

Merge request reports