summaryrefslogtreecommitdiff
path: root/.gitlab-ci-main.yml
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2021-10-14 08:11:49 +1300
committerStefan Metzmacher <metze@samba.org>2021-10-25 12:13:15 +0000
commit60419689f3e768a7a57d2812bec4bc49ebc9d2f7 (patch)
tree7359ddb2d9bde0a15ddfa3797e55580b7155673a /.gitlab-ci-main.yml
parent2c36f7c67ed552fab1a59bd14c6592ea6ac85738 (diff)
downloadsamba-60419689f3e768a7a57d2812bec4bc49ebc9d2f7.tar.gz
.gitlab-ci.yml: Restore building most of our jobs
We are changing the primary build jobs to use "when" not "only". These a similar and related GitLab syntax tools to control when jobs are run. With 'when' now in use it must be specified on all jobs that inherit from each other via: .extends .shared_template "only" can be left however for the pages and coverity as these use: .extends .shared_runner_build_image 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> (cherry picked from commit bcc22d00569551cfa25851c8c267ec9decc63d21)
Diffstat (limited to '.gitlab-ci-main.yml')
-rw-r--r--.gitlab-ci-main.yml18
1 files changed, 10 insertions, 8 deletions
diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml
index a738ee30519..d681e9647a6 100644
--- a/.gitlab-ci-main.yml
+++ b/.gitlab-ci-main.yml
@@ -83,6 +83,9 @@ include:
interruptible: true
timeout: 2h
+ rules:
+ - when: on_success
+
variables:
AUTOBUILD_JOB_NAME: $CI_JOB_NAME
stage: build
@@ -353,13 +356,12 @@ samba-fips:
.private_test_only:
extends: .private_runner_test
stage: test_private
- only:
- variables:
+ rules:
# 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:
# settings -> CI/CD -> Environment variables
- - $SUPPORT_PRIVATE_TEST == "yes"
+ - if: $SUPPORT_PRIVATE_TEST == "yes"
.needs_samba-def-build-private:
extends:
@@ -514,11 +516,11 @@ 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"
+ 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
# All other jobs do not want code coverage.
.samba-o3-template: