Fix docs pipelines for merge requests
What does this MR do?
Fix docs pipelines for merge requests
Why was this MR needed?
When pipelines for merge
results
are enabled the ref name changes since it's the merge result of the
branch so the current except
rules don't' work. Use expect:variables
instead to check the name of the source branch with the
CI_MERGE_REQUEST_SOURCE_BRANCH_NAME
. Using expect/only
are not ideal
since there is rules
which are the new and superior way but these are not compatible with
pipelines for merge requests since you can't mix only
and rules
together, and there is no way to create pipelines for merge requests
with rules.
We can see a successful pipeline with this change in https://gitlab.com/gitlab-org/gitlab-runner/pipelines/108036227
This is also not ideal, we should check the changes we get and define which job to run instead of depending on the branch name since that is fragile but that is a much bigger task and is tracked in #5019 (closed).
What are the relevant issue numbers?
Closes #6270 (closed)