WHATSNEW: Up to Samba 4.18.0rc1.
[Samba.git] / .gitlab-ci-main.yml
blobe725bfd07756818f59aff4542ce4c28411b0f03b
1 # see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
3 # Stages explained
5 # images: Build the images with the bootstrap script
6 # build_first: Build a few things first to find silly errors (fast job)
7 #              (don't pay for 35 machines until something compiles)
8 # build: The main parallel job
9 #              (keep these to 1hour as we are billed per hour)
10 # test_only: Tests using the build from prior stages, these typically
11 #            have an explicit dependency defined to a specific build job,
12 #            which means that start as soon as the build job finished.
13 # test_private: Like test_only, but running on private runners
14 # report: Code coverage reporting
16 stages:
17   - images
18   - build_first
19   - build
20   - test_only
21   - test_private
22   - report
24 variables:
25   # We want to be resilient to runner failures
26   ARTIFACT_DOWNLOAD_ATTEMPTS: "3"
27   EXECUTOR_JOB_SECTION_ATTEMPTS: "3"
28   GET_SOURCES_ATTEMPTS: "3"
29   RESTORE_CACHE_ATTEMPTS: "3"
30   #
31   GIT_STRATEGY: fetch
32   GIT_DEPTH: "3"
33   #
34   # Use GZip by default, it is fast and is good enough.  Other options include --xz
36   SAMBA_TESTBASE_TAR_OPTIONS: -z
38   #
39   # we run autobuild.py inside a samba CI docker image located on gitlab's registry
40   # overwrite this variable if you want use your own image registry.
41   #
42   # Or better ask for access to the shared development repository, see
43   # https://wiki.samba.org/index.php/Samba_CI_on_gitlab#Getting_Access
44   #
45   SAMBA_CI_CONTAINER_REGISTRY: registry.gitlab.com/samba-team/devel/samba
46   #
47   # Set this to the contents of bootstrap/sha1sum.txt
48   # which is generated by bootstrap/template.py --render
49   #
50   SAMBA_CI_CONTAINER_TAG: 790c229c42a67336099420d137fa9dc9974a133a
51   #
52   # We use the ubuntu2204 image as default as
53   # it matches what we have on atb-devel-224
54   #
55   SAMBA_CI_CONTAINER_IMAGE: ubuntu2204
56   #
57   # The following images are available
58   # Please see the samba-o3 sections at the end of this file!
59   # We should run that for each available image
60   #
61   SAMBA_CI_CONTAINER_IMAGE_ubuntu1804: ubuntu1804
62   SAMBA_CI_CONTAINER_IMAGE_ubuntu1804_32bit: ubuntu1804-32bit
63   SAMBA_CI_CONTAINER_IMAGE_ubuntu2004: ubuntu2004
64   SAMBA_CI_CONTAINER_IMAGE_ubuntu2204: ubuntu2204
65   SAMBA_CI_CONTAINER_IMAGE_debian11: debian11
66   SAMBA_CI_CONTAINER_IMAGE_opensuse154: opensuse154
67   SAMBA_CI_CONTAINER_IMAGE_fedora37: fedora37
68   SAMBA_CI_CONTAINER_IMAGE_f37mit120: f37mit120
69   SAMBA_CI_CONTAINER_IMAGE_centos7: centos7
70   SAMBA_CI_CONTAINER_IMAGE_centos8s: centos8s
72 include:
73   # The image creation details are specified in a separate file
74   # See bootstrap/README.md for details
75   - 'bootstrap/.gitlab-ci.yml'
77 .shared_runner_build_image:
78   extends: .shared_runner_build
79   variables:
80     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE}
81   image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-${SAMBA_CI_JOB_IMAGE}:${SAMBA_CI_CONTAINER_TAG}
83 .shared_template:
84   extends: .shared_runner_build_image
85   # All Samba jobs are interruptible, this avoids burning CPU when a
86   # newer branch is pushed.
87   interruptible: true
88   timeout: 2h
90   # Otherwise we run twice, once on push and once on MR
91   # https://forum.gitlab.com/t/new-rules-syntax-and-detached-pipelines/37292
92   rules:
93     - if: $CI_MERGE_REQUEST_ID
94       when: never
95     - when: on_success
97   variables:
98     AUTOBUILD_JOB_NAME: $CI_JOB_NAME
99   stage: build
100   cache:
101     key: ccache.${CI_JOB_NAME}.${SAMBA_CI_JOB_IMAGE}.${SAMBA_CI_FLAVOR}
102     paths:
103       - ccache
105   # This is overridden in many cases, but ensures none of the other
106   # main jobs start until and unless this build finishes.  However
107   # this also ensures we do not download artifacts from any build
108   # unless we specifically depend on it, saving bandwidth
110   needs:
111     - job: samba-def-build
112       artifacts: false
114   before_script:
115     - uname -a
116     - lsb_release -a
117     - cat /etc/os-release
118     - lscpu
119     - cat /proc/cpuinfo
120     - mount
121     - df -h
122     - cat /proc/swaps
123     - free -h
124       # ld will fail if coverage enabled, force link ld to ld.bfd
125     - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then sudo ln -sf $(which ld.bfd) $(which ld); fi
126       # See bootstrap/.gitlab-ci.yml how to generate a new image
127     - echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]"
128     - echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]"
129     - echo "SAMBA_CI_JOB_IMAGE[${SAMBA_CI_JOB_IMAGE}]"
130     - echo "CI_JOB_IMAGE[${CI_JOB_IMAGE}]"
131     - bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt
132     - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt
133     - echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
134     - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
135     - diff -u bootstrap/sha1sum.txt /sha1sum.txt
136     - echo "${CI_COMMIT_SHA} ${CI_COMMIT_TITLE}" > /tmp/commit.txt
137     - export CCACHE_BASEDIR="${PWD}"
138     - export CCACHE_DIR="${PWD}/ccache" && mkdir -pv "$CCACHE_DIR"
139     - export CC="ccache cc"
140     - export CXX="ccache c++"
141     - ccache -z -M 500M
142     - ccache -s
143       # We are already running .gitlab-ci directives from this repo, remove additional checks that break our CI
144     - git config --global --add safe.directory `pwd`
145   after_script:
146     - mount
147     - df -h
148     - cat /proc/swaps
149     - free -h
150     - CCACHE_BASEDIR="${PWD}" CCACHE_DIR="${PWD}/ccache" ccache -s -c
151   artifacts:
152     expire_in: 1 week
153     paths:
154       - "*.stdout"
155       - "*.stderr"
156       - "*.info"
157       - public
158       - system-info.txt
159   retry:
160     max: 2
161     when:
162       - runner_system_failure
163       - stuck_or_timeout_failure
164       - api_failure
165       - runner_unsupported
166       - stale_schedule
167       - archived_failure
168       - scheduler_failure
169       - data_integrity_failure
171   script:
172     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
173     # autobuild name, which means we can define a default template that runs most autobuild jobs
174     - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE  --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase
176 # Ensure when adding a new job below that you also add it to
177 # the dependencies for 'pages' below for the code coverage page
178 # generation.
180 others:
181   extends: .shared_template
182   script:
183     - script/autobuild.py ldb      $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/ldb
184     - script/autobuild.py pidl     $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/pidl
185     - script/autobuild.py replace  $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/replace
186     - script/autobuild.py talloc   $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/talloc
187     - script/autobuild.py tdb      $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/tdb
188     - script/autobuild.py tevent   $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/tevent
189     - script/autobuild.py samba-xc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/samba-xc
190     - script/autobuild.py docs-xml $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/docs-xml
192 .shared_template_build_only:
193   extends: .shared_template
194   timeout: 2h
195   needs:
196   artifacts:
197     expire_in: 1 week
198     paths:
199       - "*.stdout"
200       - "*.stderr"
201       - "*.info"
202       - system-info.txt
203       - samba-testbase.tar
204   script:
205     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
206     # autobuild name, which means we can define a default template that runs most autobuild jobs
207     - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE  --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase
208     # On success we need to pack everything into an artifacts file
209     # which needs to be in the git checkout.
210     # As tar doesn't handle hardlink of read-only files,
211     # we remember the acls and add write permissions
212     # before creating the archive. The consumer will apply
213     # the acls again.
214     - cp -a /sha1sum.txt /tmp/samba-testbase/image-sha1sum.txt
215     - cp -a /tmp/commit.txt /tmp/samba-testbase/commit.txt
216     - ln -s /tmp/samba-testbase/${AUTOBUILD_JOB_NAME}/ /tmp/samba-testbase/build_subdir_link
217     - pushd /tmp && getfacl -R samba-testbase > samba-testbase.acl.dump && popd
218     - chmod -R +w /tmp/samba-testbase
219     - mv /tmp/samba-testbase.acl.dump /tmp/samba-testbase/
220     - tar $SAMBA_TESTBASE_TAR_OPTIONS -cf samba-testbase.tar /tmp/samba-testbase
221     - ls -la samba-testbase.tar
222     - sha1sum samba-testbase.tar
224 .shared_template_test_only:
225   extends:
226     - .shared_template
227     - .shared_runner_test
228   stage: test_only
229   script:
230     # Print the Kerberos version to check we ended up with the right one
231     # in the runner. We do not have configure output to recognize it
232     # otherwise.
233     - if [ -x "$(command -v krb5-config)" ]; then krb5-config --version; fi
234     # We unpack the artifacts file created by the .shared_template_build_only
235     # run we depend on
236     - ls -la samba-testbase.tar
237     - sha1sum samba-testbase.tar
238     - tar $SAMBA_TESTBASE_TAR_OPTIONS -xf samba-testbase.tar -C /
239     - diff -u /tmp/samba-testbase/image-sha1sum.txt /sha1sum.txt
240     - diff -u /tmp/samba-testbase/commit.txt /tmp/commit.txt
241     - mv /tmp/samba-testbase/samba-testbase.acl.dump /tmp/samba-testbase.acl.dump
242     - pushd /tmp && setfacl --restore=/tmp/samba-testbase.acl.dump && popd
243     - ls -la /tmp/samba-testbase/
244     - ls -la /tmp/samba-testbase/build_subdir_link
245     - ls -la /tmp/samba-testbase/build_subdir_link/
246     - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then find /tmp/samba-testbase/build_subdir_link/ -type d -printf "'%p'\n" | xargs chmod u+w; fi
247     - ls -la /tmp/samba-testbase/build_subdir_link/
248     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
249     # autobuild name, which means we can define a default template that runs most autobuild jobs
250     - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --skip-dependencies --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase
252 samba-def-build:
253   extends: .shared_template_build_only
254   stage: build_first
256 .needs_samba-def-build:
257   extends: .shared_template_test_only
258   needs:
259     - job: samba-def-build
260       artifacts: true
261     - job: samba-shellcheck
263 samba-mit-build:
264   extends: .shared_template_build_only
265   variables:
266     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
267   stage: build_first
269 samba-mit120-build:
270   extends: .shared_template_build_only
271   variables:
272     AUTOBUILD_JOB_NAME: samba-mit-build
273     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_f37mit120}
274   stage: build_first
276 .needs_samba-mit-build:
277   extends: .shared_template_test_only
278   variables:
279     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
280   needs:
281     - job: samba-mit-build
282       artifacts: true
283     - job: samba-shellcheck
285 .needs_samba-mit120-build:
286   extends: .shared_template_test_only
287   variables:
288     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_f37mit120}
289   needs:
290     - job: samba-mit120-build
291       artifacts: true
293 samba-h5l-build:
294   extends: .shared_template_build_only
296 .needs_samba-h5l-build:
297   extends: .shared_template_test_only
298   needs:
299     - job: samba-h5l-build
300       artifacts: true
302 samba-without-smb1-build:
303   extends: .shared_template_build_only
305 .needs_samba-without-smb1-build:
306   extends: .shared_template_test_only
307   needs:
308     - job: samba-without-smb1-build
309       artifacts: true
311 samba-nt4-build:
312   extends: .shared_template_build_only
314 .needs_samba-nt4-build:
315   extends: .shared_template_test_only
316   needs:
317     - job: samba-nt4-build
318       artifacts: true
320 samba-no-opath-build:
321   extends: .shared_template_build_only
323 .needs_samba-no-opath-build:
324   extends: .shared_template_test_only
325   needs:
326     - job: samba-no-opath-build
327       artifacts: true
329 samba:
330   extends: .shared_template
332 samba-mitkrb5:
333   extends: .shared_template
334   variables:
335     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
337 samba-minimal-smbd:
338   extends: .shared_template
340 samba-nopython:
341   extends: .shared_template
343 samba-admem:
344   extends: .needs_samba-def-build
346 samba-ad-dc-2:
347   extends: .needs_samba-def-build
349 samba-ad-dc-3:
350   extends: .needs_samba-def-build
352 samba-ad-dc-4a:
353   extends: .needs_samba-def-build
355 samba-ad-dc-4b:
356   extends: .needs_samba-def-build
358 samba-ad-dc-5:
359   extends: .needs_samba-def-build
361 samba-ad-dc-6:
362   extends: .needs_samba-def-build
364 samba-ad-back1:
365   extends: .needs_samba-def-build
367 samba-ad-back2:
368   extends: .needs_samba-def-build
370 samba-schemaupgrade:
371   extends: .needs_samba-def-build
373 samba-libs:
374   extends: .shared_template
376 samba-fuzz:
377   extends: .shared_template
378   variables:
379     # We match what Google is running over at oss-fuzz
380     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2004}
382 ctdb:
383   extends: .shared_template
385 samba-ctdb:
386   extends: .shared_template
388 samba-ad-dc-ntvfs:
389   extends: .needs_samba-def-build
391 samba-admem-mit:
392   extends: .needs_samba-mit-build
394 samba-addc-mit-4a:
395   extends: .needs_samba-mit-build
397 samba-addc-mit-4b:
398   extends: .needs_samba-mit-build
400 # This task is run first to ensure we compile before we start the
401 # main run as it is the fastest full compile of Samba.
402 samba-fips:
403   extends: .shared_template
404   variables:
405     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
407 samba-shellcheck:
408   extends: .shared_template
409   needs:
410   variables:
411     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
412   stage: build_first
414 .private_test_only:
415   extends: .private_runner_test
416   stage: test_private
417   rules:
418       # See above, to avoid a duplicate CI on the MR (these rules override the others)
419     - if: $CI_MERGE_REQUEST_ID
420       when: never
422       # These jobs are only run if the gitlab repo has private runners available.
423       # To enable private jobs, you must add the following var and value to
424       # your gitlab repo by navigating to:
425       # settings -> CI/CD -> Environment variables
426     - if: $SUPPORT_PRIVATE_TEST == "yes"
428 .needs_samba-def-build-private:
429   extends:
430     - .needs_samba-def-build
431     - .private_test_only
433 .needs_samba-mit-build-private:
434   extends:
435     - .needs_samba-mit-build
436     - .private_test_only
438 .needs_samba-mit120-build-private:
439   extends:
440     - .needs_samba-mit120-build
441     - .private_test_only
443 .needs_samba-h5l-build-private:
444   extends:
445     - .needs_samba-h5l-build
446     - .private_test_only
448 .needs_samba-without-smb1-build-private:
449   extends:
450     - .needs_samba-without-smb1-build
451     - .private_test_only
453 .needs_samba-nt4-build-private:
454   extends:
455     - .needs_samba-nt4-build
456     - .private_test_only
458 .needs_samba-no-opath-build-private:
459   extends:
460     - .needs_samba-no-opath-build
461     - .private_test_only
463 samba-fileserver:
464   extends: .needs_samba-h5l-build-private
466 samba-fileserver-without-smb1:
467   extends: .needs_samba-without-smb1-build-private
469 # This is a full build without the AD DC so we test the build with MIT
470 # Kerberos from the default system (Ubuntu 18.04 at this stage).
471 # Runtime behaviour checked via the ktest (static ccache and keytab)
472 # environment
473 samba-ktest-mit:
474  extends: .shared_template
476 samba-ad-dc-1:
477   extends: .needs_samba-def-build-private
479 samba-nt4:
480   extends: .needs_samba-nt4-build-private
482 samba-addc-mit-1:
483   extends: .needs_samba-mit-build-private
485 samba-addc-mit120:
486   extends: .needs_samba-mit120-build-private
487   variables:
488     AUTOBUILD_JOB_NAME: samba-addc-mit-1
490 samba-no-opath1:
491   extends: .needs_samba-no-opath-build-private
493 samba-no-opath2:
494   extends: .needs_samba-no-opath-build-private
496 # 'pages' is a special job which can publish artifacts in `public` dir to gitlab pages
497 pages:
498   extends: .shared_runner_build_image
499   stage: report
500   dependencies:  # tell gitlab to download artifacts for these jobs
501     - others
502     - samba
503     - samba-mitkrb5
504     - samba-admem
505     - samba-ad-dc-2
506     - samba-ad-dc-3
507     - samba-ad-dc-4a
508     - samba-ad-dc-4b
509     - samba-ad-dc-5
510     - samba-ad-dc-6
511     - samba-libs
512     - samba-minimal-smbd
513     - samba-nopython
514     - samba-fuzz
515     # - ctdb  # TODO
516     - samba-ctdb
517     - samba-ad-dc-ntvfs
518     - samba-admem-mit
519     - samba-addc-mit-4a
520     - samba-addc-mit-4b
521     - samba-ad-back1
522     - samba-ad-back2
523     - samba-fileserver
524     - samba-fileserver-without-smb1
525     - samba-ad-dc-1
526     - samba-nt4
527     - samba-schemaupgrade
528     - samba-addc-mit-1
529     - samba-fips
530     - samba-no-opath1
531     - samba-no-opath2
532     - ubuntu1804-samba-o3
533   script:
534     - ls -la *.info
535     - ./configure.developer
536     - make -j
537     - ls -la *.info
538     - lcov $(ls *.info | xargs -I{} echo -n "-a {} ") -o all.info
539     - ls -la *.info
540     - genhtml all.info --ignore-errors source --output-directory public --prefix=$(pwd) --title "coverage report for $CI_COMMIT_REF_NAME $CI_COMMIT_SHORT_SHA"
541   artifacts:
542     expire_in: 30 days
543     paths:
544       - public
545   only:
546     variables:
547       - $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == "--enable-coverage"
549 # Coverity Scan
550 coverity:
551   extends: .shared_runner_build_image
552   variables:
553     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_opensuse154}
554   stage: build
555   script:
556     - wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_PROJECT_NAME" -O /tmp/coverity_tool.tgz
557     - tar xf /tmp/coverity_tool.tgz
558     - ./configure.developer --with-cluster-support --with-system-mitkrb5 --with-experimental-mit-ad-dc
559     - cov-analysis-linux64-*/bin/cov-build --dir cov-int make -j$(nproc)
560     - tar czf cov-int.tar.gz cov-int
561     - curl
562       --form token=$COVERITY_SCAN_TOKEN
563       --form email=$COVERITY_SCAN_EMAIL
564       --form file=@cov-int.tar.gz
565       --form version="`git describe --tags`"
566       --form description="CI build"
567       https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
568   only:
569     refs:
570       - master
571       - schedules
572     variables:
573       - $COVERITY_SCAN_TOKEN != null
574       - $COVERITY_SCAN_PROJECT_NAME != null
575       - $COVERITY_SCAN_EMAIL != null
576   artifacts:
577     expire_in: 1 week
578     when: on_failure
579     paths:
580       - cov-int/*.txt
582 ubuntu1804-samba-32bit:
583   extends: .shared_template
584   variables:
585     AUTOBUILD_JOB_NAME: samba-32bit
586     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu1804_32bit}
589 # We build samba-o3 on all supported distributions
592 # This job, which matches the main CI, needs to still do coverage so
593 # we show the coverage on the "none" environment tests
595 # We want --enable-coverage specified here otherwise we will have a
596 # different set of build options on the coverage build and can fail
597 # when -O3 gets combined with --enable-coverage in the scheduled
598 # builds.
600 ubuntu1804-samba-o3:
601   extends: .shared_template
602   variables:
603     AUTOBUILD_JOB_NAME: samba-o3
604     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu1804}
605     SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "--enable-coverage"
606   rules:
607     # See above, to avoid a duplicate CI on the MR (these rules override the others)
608     - if: $CI_MERGE_REQUEST_ID
609       when: never
610     # do not run o3 builds (which run a lot of VMs) if told not to
611     # (this uses the same variable as autobuild.py)
612     - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1"
613       when: never
615 # All other jobs do not want code coverage.
616 .samba-o3-template:
617   extends: .shared_template
618   variables:
619     AUTOBUILD_JOB_NAME: samba-o3
620   rules:
621     # See above, to avoid a duplicate CI on the MR (these rules override the others)
622     - if: $CI_MERGE_REQUEST_ID
623       when: never
624     # do not run o3 builds (which run a lot of VMs) if told not to
625     # (this uses the same variable as autobuild.py)
626     - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1"
627       when: never
628     # do not run o3 for coverage since they are using different images
629     - if: $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == ""
631 ubuntu2004-samba-o3:
632   extends: .samba-o3-template
633   variables:
634     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2004}
636 ubuntu2204-samba-o3:
637   extends: .samba-o3-template
638   variables:
639     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2204}
641 debian11-samba-o3:
642   extends: .samba-o3-template
643   variables:
644     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian11}
646 opensuse154-samba-o3:
647   extends: .samba-o3-template
648   variables:
649     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_opensuse154}
651 centos7-samba-o3:
652   extends: .samba-o3-template
653   variables:
654     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_centos7}
655     # Git on CentOS doesn't support shallow git cloning
656     GIT_DEPTH: ""
657     # We need a newer GnuTLS version on CentOS7
658     PKG_CONFIG_PATH: "/usr/lib64/compat-gnutls37/pkgconfig:/usr/lib64/compat-nettle32/pkgconfig"
660 centos8s-samba-o3:
661   extends: .samba-o3-template
662   variables:
663     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_centos8s}
665 fedora37-samba-o3:
666   extends: .samba-o3-template
667   variables:
668     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora37}
671 # Keep the samba-o3 sections at the end ...