diff options
author | Ralph Giles <giles@thaumas.net> | 2020-12-22 20:12:19 -0800 |
---|---|---|
committer | Ralph Giles <giles@thaumas.net> | 2020-12-22 20:12:19 -0800 |
commit | 086cc06b9c6402c73afcad4334d69fac7ca825aa (patch) | |
tree | 606915a6eb3500305bd03019ed046e3647e823ed | |
parent | a923218e9ba59231fe898f305b91076c32209667 (diff) | |
download | opus-gitlab-ci-mr.tar.gz |
gitlab-ci: Re-enable builds for merge requests.gitlab-ci-mr
When the whitespace job was added, we marked it with
only: merge_requests
because we wanted it to only run on new merge requests.
However, adding an `only` clause like this disables all the
unmarked jobs for merge requests, which means we don't get
the more important feedback about build failures.
Instead, use the `rules` key, added in Gitlab 12.3. This
more flexible mechanism is currently recommended and lets
us specify what we want without having to add additional
decorations to every other job.
-rw-r--r-- | .gitlab-ci.yml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 70c243b5..83134404 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,10 +6,12 @@ default: whitespace: stage: test - only: - - merge_requests script: - git diff-tree --check origin/master HEAD + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: always + - when: never autoconf: stage: build |