summaryrefslogtreecommitdiff
path: root/.gitlab-ci-main.yml
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2021-10-12 07:55:54 +1300
committerStefan Metzmacher <metze@samba.org>2021-10-25 12:13:15 +0000
commit44ad4dc8b77fd894a059dec1ea8b21e8f1e95f42 (patch)
treea2ff4adc43db82b75803afc803658c1db25ad913 /.gitlab-ci-main.yml
parentaa08c5cfbf72eee86174d75b8366a528411ea7c7 (diff)
downloadsamba-44ad4dc8b77fd894a059dec1ea8b21e8f1e95f42.tar.gz
.gitlab-ci.yml: Honour AUTOBUILD_SKIP_SAMBA_O3 in GitLab CI
GitLab CI resources are expensive and often rationed so provide a way to test other things without testing an -O3 build also, as this will save 9 jobs. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14861 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit 7857e1249b72be8c8841b99cb0820c9c563178f9)
Diffstat (limited to '.gitlab-ci-main.yml')
-rw-r--r--.gitlab-ci-main.yml16
1 files changed, 12 insertions, 4 deletions
diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml
index 832e8a8b5e7..071d84492f0 100644
--- a/.gitlab-ci-main.yml
+++ b/.gitlab-ci-main.yml
@@ -514,16 +514,24 @@ ubuntu1804-samba-o3:
AUTOBUILD_JOB_NAME: samba-o3
SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu1804}
SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "--enable-coverage"
+ only:
+ variables:
+ # do not run o3 builds (which run a lot of VMs) if told not to
+ # (this uses the same variable as autobuild.py)
+ - $AUTOBUILD_SKIP_SAMBA_O3 == "0"
# All other jobs do not want code coverage.
.samba-o3-template:
extends: .shared_template
variables:
AUTOBUILD_JOB_NAME: samba-o3
- only:
- variables:
- # do not run o3 for coverage since they are using different images
- - $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == ""
+ rules:
+ # 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"
+ when: never
+ # do not run o3 for coverage since they are using different images
+ - if: $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == ""
ubuntu2004-samba-o3:
extends: .samba-o3-template