diff options
author | Joe Guo <joeg@catalyst.net.nz> | 2019-02-15 22:25:07 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-02-18 10:54:19 +0100 |
commit | 6b4ae52f224ea6700527cd034353fe561cda0485 (patch) | |
tree | ada54b86ad0d00d515657bd6dcb6c52971905d35 /.gitlab-ci.yml | |
parent | 9fa698b02358807c20444a6bc5a9ab8f311c4922 (diff) | |
download | samba-6b4ae52f224ea6700527cd034353fe561cda0485.tar.gz |
.gitlab-ci.yml: merge .gitlab-ci-private.yml
`.gitlab-ci.yml` support conditional jobs with `only` and `except`.
And variables can be read from repo CI/CD settings as condition:
build_samba:
script: ...
only:
variables:
- $SUPPORT_PRIVATE_TEST == 'yes'
Instead of having 2 copies of yml file, we can use this feature to
trigger private jobs only when a var like `SUPPORT_PRIVATE_TEST` is defined.
I've already added above var to our repos.
Once merged, we can remove custom CI config file in
gitlab repo settings, and remove .gitlab-ci-private.yml file from code.
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 18 10:54:19 CET 2019 on sn-devel-144
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d999cf4693f..32a10181bfa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,3 +99,37 @@ samba-ad-dc-ntvfs: extends: .shared_template # this one takes about 100 mins to finish + +.private_template: + extends: .shared_template + tags: + - docker + - private + before_script: + - uname -a + - lsb_release -a + - mount + - df -h + - free -h + only: + variables: + # 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" + +samba: + extends: .private_template + # this one takes about 4 hours to finish + +samba-fileserver: + extends: .private_template + # this one takes about 1 hours to finish + +samba-ad-dc: + extends: .private_template + # this one takes about 1 hours to finish + +samba-nt4: + extends: .private_template |