1 # see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
10 # "--enable-coverage" or ""
11 SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: ""
13 # we run autobuild.py inside a samba CI docker image located on gitlab's registry
14 # overwrite this variable if you want use your own image registry.
16 # Or better ask for access to the shared development repository, see
17 # https://wiki.samba.org/index.php/Samba_CI_on_gitlab#Getting_Access
19 SAMBA_CI_CONTAINER_REGISTRY: registry.gitlab.com/samba-team/devel/samba
21 # Set this to the contents of bootstrap/sha1sum.txt
22 # which is generated by bootstrap/template.py --render
24 SAMBA_CI_CONTAINER_TAG: 1185fa2a316b3bb7e0c24e9fb8279d4c17450809
25 # We use the ubuntu1804 image as default as
26 # it matches what we have on sn-devel-184.
27 SAMBA_CI_CONTAINER_IMAGE: ubuntu1804
29 # The following images are available
30 # Please see the samba-o3 sections at the end of this file!
31 # We should run that for each available image
33 SAMBA_CI_CONTAINER_IMAGE_ubuntu1804: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1804:${SAMBA_CI_CONTAINER_TAG}
34 SAMBA_CI_CONTAINER_IMAGE_ubuntu1604: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1604:${SAMBA_CI_CONTAINER_TAG}
35 SAMBA_CI_CONTAINER_IMAGE_debian9: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-debian9:${SAMBA_CI_CONTAINER_TAG}
36 SAMBA_CI_CONTAINER_IMAGE_opensuse150: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-opensuse150:${SAMBA_CI_CONTAINER_TAG}
37 SAMBA_CI_CONTAINER_IMAGE_fedora29: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-fedora29:${SAMBA_CI_CONTAINER_TAG}
38 SAMBA_CI_CONTAINER_IMAGE_centos7: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-centos7:${SAMBA_CI_CONTAINER_TAG}
41 # The image creation details are specified in a separate file
42 # See bootstrap/README.md for details
43 - 'bootstrap/.gitlab-ci.yml'
47 AUTOBUILD_JOB_NAME: $CI_JOB_NAME
48 image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-${SAMBA_CI_CONTAINER_IMAGE}:${SAMBA_CI_CONTAINER_TAG}
61 # ld will fail if coverage enabled, force link ld to ld.bfd
62 - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then sudo ln -sf $(which ld.bfd) $(which ld); fi
63 # See bootstrap/.gitlab-ci.yml how to generate a new image
64 - echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]"
65 - echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]"
66 - bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt
67 - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt
68 - echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
69 - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
70 - diff -u bootstrap/sha1sum.txt /sha1sum.txt
86 - runner_system_failure
87 - stuck_or_timeout_failure
89 # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
90 # autobuild name, which means we can define a default template that runs most autobuild jobs
91 - echo "Running cmd script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
92 - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
95 extends: .shared_template
97 - script/autobuild.py ldb $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
98 - script/autobuild.py pidl $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
99 - script/autobuild.py replace $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
100 - script/autobuild.py talloc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
101 - script/autobuild.py tdb $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
102 - script/autobuild.py tevent $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
105 extends: .shared_template
108 extends: .shared_template
111 extends: .shared_template
114 extends: .shared_template
117 extends: .shared_template
120 extends: .shared_template
123 extends: .shared_template
126 extends: .shared_template
129 extends: .shared_template
132 extends: .shared_template
135 extends: .shared_template
138 extends: .shared_template
141 extends: .shared_template
144 extends: .shared_template
147 extends: .shared_template
150 extends: .shared_template
153 extends: .shared_template
156 extends: .shared_template
159 extends: .shared_template
165 # These jobs are only run if the gitlab repo has private runners available.
166 # To enable private jobs, you must add the following var and value to
167 # your gitlab repo by navigating to:
168 # settings -> CI/CD -> Environment variables
169 - $SUPPORT_PRIVATE_TEST == "yes"
172 extends: .private_template
175 extends: .private_template
178 extends: .private_template
181 extends: .private_template
184 # We build samba-o3 on all supported distributions
188 extends: .shared_template
190 AUTOBUILD_JOB_NAME: samba-o3
193 extends: .samba-o3-template
194 image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1804
197 extends: .samba-o3-template
198 image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1604
201 extends: .samba-o3-template
202 image: $SAMBA_CI_CONTAINER_IMAGE_debian9
204 opensuse150-samba-o3:
205 extends: .samba-o3-template
206 image: $SAMBA_CI_CONTAINER_IMAGE_opensuse150
209 extends: .samba-o3-template
210 image: $SAMBA_CI_CONTAINER_IMAGE_centos7
212 # Git on CentOS doesn't support shallow git cloning
216 extends: .samba-o3-template
217 image: $SAMBA_CI_CONTAINER_IMAGE_fedora29
220 # Keep the samba-o3 sections at the end ...