diff options
author | Andrew Bartlett <abartlet@samba.org> | 2021-10-14 08:51:21 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2021-10-14 01:21:11 +0000 |
commit | 8ab0238abd171f9a11b013fd185605e7d1722b27 (patch) | |
tree | 88deb2b133c2442023f8b68d3d0b0d667dc0bbbd /.gitlab-ci-main.yml | |
parent | bcc22d00569551cfa25851c8c267ec9decc63d21 (diff) | |
download | samba-8ab0238abd171f9a11b013fd185605e7d1722b27.tar.gz |
.gitlab-ci: Avoid duplicate CI on all merge requests
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14861
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Oct 14 01:21:11 UTC 2021 on sn-devel-184
Diffstat (limited to '.gitlab-ci-main.yml')
-rw-r--r-- | .gitlab-ci-main.yml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml index 4187c7d54fe..d876923f9e7 100644 --- a/.gitlab-ci-main.yml +++ b/.gitlab-ci-main.yml @@ -83,7 +83,11 @@ include: interruptible: true timeout: 2h + # Otherwise we run twice, once on push and once on MR + # https://forum.gitlab.com/t/new-rules-syntax-and-detached-pipelines/37292 rules: + - if: $CI_MERGE_REQUEST_ID + when: never - when: on_success variables: @@ -357,6 +361,10 @@ samba-fips: extends: .private_runner_test stage: test_private rules: + # See above, to avoid a duplicate CI on the MR (these rules override the others) + - if: $CI_MERGE_REQUEST_ID + when: never + # These jobs are only run if the gitlab repo has private runners available. # To enable private jobs, you must add the following var and value to # your gitlab repo by navigating to: @@ -517,6 +525,9 @@ ubuntu1804-samba-o3: SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu1804} SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "--enable-coverage" rules: + # See above, to avoid a duplicate CI on the MR (these rules override the others) + - if: $CI_MERGE_REQUEST_ID + when: never # do not run o3 builds (which run a lot of VMs) if told not to # (this uses the same variable as autobuild.py) - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1" @@ -528,6 +539,9 @@ ubuntu1804-samba-o3: variables: AUTOBUILD_JOB_NAME: samba-o3 rules: + # See above, to avoid a duplicate CI on the MR (these rules override the others) + - if: $CI_MERGE_REQUEST_ID + when: never # do not run o3 builds (which run a lot of VMs) if told not to # (this uses the same variable as autobuild.py) - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1" |