From 93e3d5866ce93c53965165c0e6b0f7eb88206b8f Mon Sep 17 00:00:00 2001 From: Joe Guo Date: Wed, 20 Sep 2017 09:33:27 +1200 Subject: [PATCH 1/3] gitlab-ci: add .gitlab-ci.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add .gitlab-ci.yml file, and define build jobs in groups. Once gitlab-runner set up, builds and tests can be triggered automatically in parallel when push to gitlab. Also, with gitlab-runner autoscale mode, build instances will be created and removed on demand. Signed-off-by: Joe Guo Reviewed-by: Andrew Bartlett Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Tue Oct 31 15:32:16 CET 2017 on sn-devel-144 (cherry picked from commit 8be4236b323b5f755ff6c0bf0a4a5fb99343c84d) BUG: https://bugzilla.samba.org/show_bug.cgi?id=13689 --- .gitlab-ci.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000000..2ae9eb4032d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,47 @@ +# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options + +before_script: + - echo "Build starting ..." + +build_samba: + stage: build + tags: + - autobuild + script: + # this one takes about 4 hours to finish + - python script/autobuild.py samba --verbose --tail --testbase /tmp/samba-testbase + +build_samba_others: + stage: build + tags: + - autobuild + script: + - python script/autobuild.py samba-nopython --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py samba-systemkrb5 --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py samba-xc --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py samba-o3 --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py samba-libs --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py samba-static --verbose --tail --testbase /tmp/samba-testbase + +build_ctdb: + stage: build + tags: + - autobuild + script: + - python script/autobuild.py samba-ctdb --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py ctdb --verbose --tail --testbase /tmp/samba-testbase + +build_others: + stage: build + tags: + - autobuild + script: + - python script/autobuild.py ldb --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py pidl --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py replace --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py talloc --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py tdb --verbose --tail --testbase /tmp/samba-testbase + - python script/autobuild.py tevent --verbose --tail --testbase /tmp/samba-testbase + +after_script: + - echo "Build finished!" -- 2.11.0 From 16e3b0382578bb0d2551942e6834359928ed486a Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 26 Jun 2018 14:59:26 +1200 Subject: [PATCH 2/3] .gitlab-ci.yml: Adapt to current GitLab CI setup Signed-off-by: Andrew Bartlett (cherry picked from commit fb522c1ba0afa1b2298e66dfde42806cae72e5b9) BUG: https://bugzilla.samba.org/show_bug.cgi?id=13689 --- .gitlab-ci.yml => .gitlab-ci-private.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) rename .gitlab-ci.yml => .gitlab-ci-private.yml (92%) diff --git a/.gitlab-ci.yml b/.gitlab-ci-private.yml similarity index 92% rename from .gitlab-ci.yml rename to .gitlab-ci-private.yml index 2ae9eb4032d..584b853c25e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci-private.yml @@ -1,12 +1,15 @@ # see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options +image: registry.gitlab.com/samba-team/samba:latest + before_script: - echo "Build starting ..." build_samba: stage: build tags: - - autobuild + - docker + - private script: # this one takes about 4 hours to finish - python script/autobuild.py samba --verbose --tail --testbase /tmp/samba-testbase @@ -14,7 +17,8 @@ build_samba: build_samba_others: stage: build tags: - - autobuild + - docker + - private script: - python script/autobuild.py samba-nopython --verbose --tail --testbase /tmp/samba-testbase - python script/autobuild.py samba-systemkrb5 --verbose --tail --testbase /tmp/samba-testbase @@ -26,7 +30,8 @@ build_samba_others: build_ctdb: stage: build tags: - - autobuild + - docker + - private script: - python script/autobuild.py samba-ctdb --verbose --tail --testbase /tmp/samba-testbase - python script/autobuild.py ctdb --verbose --tail --testbase /tmp/samba-testbase @@ -34,7 +39,8 @@ build_ctdb: build_others: stage: build tags: - - autobuild + - docker + - private script: - python script/autobuild.py ldb --verbose --tail --testbase /tmp/samba-testbase - python script/autobuild.py pidl --verbose --tail --testbase /tmp/samba-testbase -- 2.11.0 From de8e2f105254006b694da56b12d03133ef9419fa Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 23 Nov 2018 12:39:33 +1300 Subject: [PATCH 3/3] gitlab-ci: Remove samba-nopython autobuild task not in Samba 4.6 BUG: https://bugzilla.samba.org/show_bug.cgi?id=13689 Reviewed-by: Gary Lockyer Signed-off-by: Andrew Bartlett --- .gitlab-ci-private.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci-private.yml b/.gitlab-ci-private.yml index 584b853c25e..f019211c6b6 100644 --- a/.gitlab-ci-private.yml +++ b/.gitlab-ci-private.yml @@ -20,7 +20,6 @@ build_samba_others: - docker - private script: - - python script/autobuild.py samba-nopython --verbose --tail --testbase /tmp/samba-testbase - python script/autobuild.py samba-systemkrb5 --verbose --tail --testbase /tmp/samba-testbase - python script/autobuild.py samba-xc --verbose --tail --testbase /tmp/samba-testbase - python script/autobuild.py samba-o3 --verbose --tail --testbase /tmp/samba-testbase -- 2.11.0