1 # see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
11 # "--enable-coverage" or ""
12 SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: ""
14 # we run autobuild.py inside a samba CI docker image located on gitlab's registry
15 # overwrite this variable if you want use your own image registry.
17 # Or better ask for access to the shared development repository, see
18 # https://wiki.samba.org/index.php/Samba_CI_on_gitlab#Getting_Access
20 SAMBA_CI_CONTAINER_REGISTRY: registry.gitlab.com/samba-team/devel/samba
22 # Set this to the contents of bootstrap/sha1sum.txt
23 # which is generated by bootstrap/template.py --render
25 SAMBA_CI_CONTAINER_TAG: 9061307e79ad13733c69352a965eeb4f44bef4b7
27 # We use the ubuntu1804 image as default as
28 # it matches what we have on sn-devel-184.
30 SAMBA_CI_CONTAINER_IMAGE: ubuntu1804
32 # The following images are available
33 # Please see the samba-o3 sections at the end of this file!
34 # We should run that for each available image
36 SAMBA_CI_CONTAINER_IMAGE_ubuntu1804: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1804:${SAMBA_CI_CONTAINER_TAG}
37 SAMBA_CI_CONTAINER_IMAGE_ubuntu1604: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1604:${SAMBA_CI_CONTAINER_TAG}
38 SAMBA_CI_CONTAINER_IMAGE_debian9: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-debian9:${SAMBA_CI_CONTAINER_TAG}
39 SAMBA_CI_CONTAINER_IMAGE_debian10: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-debian10:${SAMBA_CI_CONTAINER_TAG}
40 SAMBA_CI_CONTAINER_IMAGE_opensuse150: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-opensuse150:${SAMBA_CI_CONTAINER_TAG}
41 SAMBA_CI_CONTAINER_IMAGE_opensuse151: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-opensuse151:${SAMBA_CI_CONTAINER_TAG}
42 SAMBA_CI_CONTAINER_IMAGE_fedora31: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-fedora31:${SAMBA_CI_CONTAINER_TAG}
43 SAMBA_CI_CONTAINER_IMAGE_fedora32: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-fedora32:${SAMBA_CI_CONTAINER_TAG}
44 SAMBA_CI_CONTAINER_IMAGE_centos7: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-centos7:${SAMBA_CI_CONTAINER_TAG}
45 SAMBA_CI_CONTAINER_IMAGE_centos8: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-centos8:${SAMBA_CI_CONTAINER_TAG}
48 # The image creation details are specified in a separate file
49 # See bootstrap/README.md for details
50 - 'bootstrap/.gitlab-ci.yml'
54 AUTOBUILD_JOB_NAME: $CI_JOB_NAME
55 image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-${SAMBA_CI_CONTAINER_IMAGE}:${SAMBA_CI_CONTAINER_TAG}
68 # ld will fail if coverage enabled, force link ld to ld.bfd
69 - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then sudo ln -sf $(which ld.bfd) $(which ld); fi
70 # See bootstrap/.gitlab-ci.yml how to generate a new image
71 - echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]"
72 - echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]"
73 - bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt
74 - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt
75 - echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
76 - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
77 - diff -u bootstrap/sha1sum.txt /sha1sum.txt
93 - runner_system_failure
94 - stuck_or_timeout_failure
96 # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
97 # autobuild name, which means we can define a default template that runs most autobuild jobs
98 - echo "Running cmd script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase"
99 - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
101 # Ensure when adding a new job below that you also add it to
102 # the dependencies for 'pages' below for the code coverage page
106 extends: .shared_template
108 - script/autobuild.py ldb $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
109 - script/autobuild.py pidl $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
110 - script/autobuild.py replace $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
111 - script/autobuild.py talloc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
112 - script/autobuild.py tdb $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
113 - script/autobuild.py tevent $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --testbase /tmp/samba-testbase
116 extends: .shared_template
119 extends: .shared_template
122 extends: .shared_template
125 extends: .shared_template
128 extends: .shared_template
131 extends: .shared_template
134 extends: .shared_template
137 extends: .shared_template
140 extends: .shared_template
143 extends: .shared_template
146 extends: .shared_template
149 extends: .shared_template
152 extends: .shared_template
155 extends: .shared_template
156 image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-ubuntu1604:${SAMBA_CI_CONTAINER_TAG}
159 extends: .shared_template
162 extends: .shared_template
165 extends: .shared_template
168 extends: .shared_template
170 samba-ad-dc-4-mitkrb5:
171 extends: .shared_template
174 extends: .shared_template
180 # These jobs are only run if the gitlab repo has private runners available.
181 # To enable private jobs, you must add the following var and value to
182 # your gitlab repo by navigating to:
183 # settings -> CI/CD -> Environment variables
184 - $SUPPORT_PRIVATE_TEST == "yes"
187 extends: .private_template
190 extends: .private_template
193 extends: .private_template
196 extends: .private_template
199 extends: .private_template
202 extends: .private_template
205 extends: .private_template
207 samba-ad-dc-1-mitkrb5:
208 extends: .private_template
210 # 'pages' is a special job which can publish artifacts in `public` dir to gitlab pages
212 image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-${SAMBA_CI_CONTAINER_IMAGE}:${SAMBA_CI_CONTAINER_TAG}
217 dependencies: # tell gitlab to download artifacts for these jobs
237 - samba-ad-dc-4-mitkrb5
241 - samba-ktest-heimdal
244 - samba-schemaupgrade
245 - samba-ad-dc-1-mitkrb5
247 - ./configure.developer
249 - lcov $(ls *.info | xargs -I{} echo -n "-a {} ") -o all.info
250 - genhtml all.info --output-directory public --prefix=$(pwd) --title "coverage report for $CI_COMMIT_REF_NAME $CI_COMMIT_SHORT_SHA"
257 - $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == "--enable-coverage"
260 # We build samba-o3 on all supported distributions
264 extends: .shared_template
266 AUTOBUILD_JOB_NAME: samba-o3
269 # do not run o3 for coverage since they are using different images
270 - $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == ""
273 extends: .samba-o3-template
274 image: $SAMBA_CI_CONTAINER_IMAGE_ubuntu1804
277 extends: .samba-o3-template
278 image: $SAMBA_CI_CONTAINER_IMAGE_debian10
280 opensuse150-samba-o3:
281 extends: .samba-o3-template
282 image: $SAMBA_CI_CONTAINER_IMAGE_opensuse150
284 opensuse151-samba-o3:
285 extends: .samba-o3-template
286 image: $SAMBA_CI_CONTAINER_IMAGE_opensuse151
289 extends: .samba-o3-template
290 image: $SAMBA_CI_CONTAINER_IMAGE_centos7
292 # Git on CentOS doesn't support shallow git cloning
294 # We need a newer GnuTLS version on CentOS7
295 PKG_CONFIG_PATH: "/usr/lib64/compat-gnutls34/pkgconfig:/usr/lib64/compat-nettle32/pkgconfig"
298 extends: .samba-o3-template
299 image: $SAMBA_CI_CONTAINER_IMAGE_centos8
302 extends: .samba-o3-template
303 image: $SAMBA_CI_CONTAINER_IMAGE_fedora31
306 extends: .samba-o3-template
307 image: $SAMBA_CI_CONTAINER_IMAGE_fedora32
310 # Keep the samba-o3 sections at the end ...