s3:rpc_client: let cli_rpc_pipe_open_schannel() use rpccli_connect_netlogon() for...
[samba4-gss.git] / .gitlab-ci-main.yml
blob660cb6e973580d2881b7086452a81b564271c51f
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: d1ce7e10953d16253a34b8e58077fd32c1dbd59c
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_ubuntu2004: ubuntu2004
62   SAMBA_CI_CONTAINER_IMAGE_ubuntu2204: ubuntu2204
63   SAMBA_CI_CONTAINER_IMAGE_debian11: debian11
64   SAMBA_CI_CONTAINER_IMAGE_debian11_32bit: debian11-32bit
65   SAMBA_CI_CONTAINER_IMAGE_debian12: debian12
66   SAMBA_CI_CONTAINER_IMAGE_opensuse155: opensuse155
67   SAMBA_CI_CONTAINER_IMAGE_rocky8: rocky8
68   SAMBA_CI_CONTAINER_IMAGE_centos9s: centos9s
69   SAMBA_CI_CONTAINER_IMAGE_fedora40: fedora40
71 include:
72   # The image creation details are specified in a separate file
73   # See bootstrap/README.md for details
74   - 'bootstrap/.gitlab-ci.yml'
76 .shared_runner_build_image:
77   extends: .shared_runner_build
78   variables:
79     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE}
80   image: ${SAMBA_CI_CONTAINER_REGISTRY}/samba-ci-${SAMBA_CI_JOB_IMAGE}:${SAMBA_CI_CONTAINER_TAG}
82 .shared_template:
83   extends: .shared_runner_build_image
84   # All Samba jobs are interruptible, this avoids burning CPU when a
85   # newer branch is pushed.
86   interruptible: true
87   timeout: 2h
89   # Otherwise we run twice, once on push and once on MR
90   # https://forum.gitlab.com/t/new-rules-syntax-and-detached-pipelines/37292
91   rules:
92     - if: $CI_MERGE_REQUEST_ID
93       when: never
94     - when: on_success
96   variables:
97     AUTOBUILD_JOB_NAME: $CI_JOB_NAME
98   stage: build
99   cache:
100     key: ccache.${CI_JOB_NAME}.${SAMBA_CI_JOB_IMAGE}.${SAMBA_CI_FLAVOR}
101     paths:
102       - ccache
104   # This is overridden in many cases, but ensures none of the other
105   # main jobs start until and unless this build finishes.  However
106   # this also ensures we do not download artifacts from any build
107   # unless we specifically depend on it, saving bandwidth
109   needs:
110     - job: samba-def-build
111       artifacts: false
113   before_script:
114     - uname -a
115     - ls -l /sys/module/
116     - ls -l /sys/kernel/security/
117     - if [ -e /sys/kernel/security/lsm ]; then cat /sys/kernel/security/lsm ; echo; fi
118     - if [ -e /proc/config.gz ]; then sudo zcat /proc/config.gz; echo; fi
119     - lsb_release -a
120     - cat /etc/os-release
121     - id
122     - cat /proc/self/status
123     - lscpu
124     - cat /proc/cpuinfo
125     - mount
126     - df -h
127     - cat /proc/swaps
128     - free -h
129       # ld will fail if coverage enabled, force link ld to ld.bfd
130     - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then sudo ln -sf $(which ld.bfd) $(which ld); fi
131       # See bootstrap/.gitlab-ci.yml how to generate a new image
132     - echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]"
133     - echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]"
134     - echo "SAMBA_CI_JOB_IMAGE[${SAMBA_CI_JOB_IMAGE}]"
135     - echo "CI_JOB_IMAGE[${CI_JOB_IMAGE}]"
136     - bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt
137     - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt
138     - echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
139     - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
140     - diff -u bootstrap/sha1sum.txt /sha1sum.txt
141     - echo "${CI_COMMIT_SHA} ${CI_COMMIT_TITLE}" > /tmp/commit.txt
142     - export CCACHE_BASEDIR="${PWD}"
143     - export CCACHE_DIR="${PWD}/ccache" && mkdir -pv "$CCACHE_DIR"
144     - export CC="ccache cc"
145     - export CXX="ccache c++"
146     - ccache -z -M 500M
147     - ccache -s
148       # We are already running .gitlab-ci directives from this repo, remove additional checks that break our CI
149     - git config --global --add safe.directory '*'
150   after_script:
151     - mount
152     - df -h
153     - cat /proc/swaps
154     - free -h
155     - CCACHE_BASEDIR="${PWD}" CCACHE_DIR="${PWD}/ccache" ccache -s -c
156   artifacts:
157     expire_in: 1 week
158     paths:
159       - "*.stdout"
160       - "*.stderr"
161       - "*.info"
162       - public
163       - system-info.txt
164   retry:
165     max: 2
166     when:
167       - runner_system_failure
168       - stuck_or_timeout_failure
169       - api_failure
170       - runner_unsupported
171       - stale_schedule
172       - archived_failure
173       - scheduler_failure
174       - data_integrity_failure
176   script:
177     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
178     # autobuild name, which means we can define a default template that runs most autobuild jobs
179     - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE  --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase
181 # Ensure when adding a new job below that you also add it to
182 # the dependencies for 'pages' below for the code coverage page
183 # generation.
185 others:
186   extends: .shared_template
187   script:
188     - script/autobuild.py pidl     $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/pidl
189     - script/autobuild.py replace  $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/replace
190     - script/autobuild.py talloc   $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/talloc
191     - script/autobuild.py tdb      $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/tdb
192     - script/autobuild.py tevent   $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/tevent
193     - script/autobuild.py samba-xc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/samba-xc
194     - script/autobuild.py docs-xml $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/docs-xml
196 .shared_template_build_only:
197   extends: .shared_template
198   timeout: 2h
199   needs:
200   artifacts:
201     expire_in: 1 week
202     paths:
203       - "*.stdout"
204       - "*.stderr"
205       - "*.info"
206       - system-info.txt
207       - samba-testbase.tar
208   script:
209     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
210     # autobuild name, which means we can define a default template that runs most autobuild jobs
211     - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE  --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase
212     # On success we need to pack everything into an artifacts file
213     # which needs to be in the git checkout.
214     # As tar doesn't handle hardlink of read-only files,
215     # we remember the acls and add write permissions
216     # before creating the archive. The consumer will apply
217     # the acls again.
218     - cp -a /sha1sum.txt /builds/samba-testbase/image-sha1sum.txt
219     - cp -a /tmp/commit.txt /builds/samba-testbase/commit.txt
220     - ln -s /builds/samba-testbase/${AUTOBUILD_JOB_NAME}/ /builds/samba-testbase/build_subdir_link
221     - pushd /builds && getfacl -R samba-testbase > samba-testbase.acl.dump && popd
222     - chmod -R +w /builds/samba-testbase
223     - mv /builds/samba-testbase.acl.dump /builds/samba-testbase/
224     - tar $SAMBA_TESTBASE_TAR_OPTIONS -cf samba-testbase.tar /builds/samba-testbase
225     - ls -la samba-testbase.tar
226     - sha1sum samba-testbase.tar
228 .shared_template_test_only:
229   extends:
230     - .shared_template
231     - .shared_runner_test
232   stage: test_only
233   script:
234     # Print the Kerberos version to check we ended up with the right one
235     # in the runner. We do not have configure output to recognize it
236     # otherwise.
237     - if [ -x "$(command -v krb5-config)" ]; then krb5-config --version; fi
238     # We unpack the artifacts file created by the .shared_template_build_only
239     # run we depend on
240     - ls -la samba-testbase.tar
241     - sha1sum samba-testbase.tar
242     - tar $SAMBA_TESTBASE_TAR_OPTIONS -xf samba-testbase.tar -C /
243     - diff -u /builds/samba-testbase/image-sha1sum.txt /sha1sum.txt
244     - diff -u /builds/samba-testbase/commit.txt /tmp/commit.txt
245     - mv /builds/samba-testbase/samba-testbase.acl.dump /builds/samba-testbase.acl.dump
246     - pushd /builds && setfacl --restore=/builds/samba-testbase.acl.dump && popd
247     - ls -la /builds/samba-testbase/
248     - ls -la /builds/samba-testbase/build_subdir_link
249     - ls -la /builds/samba-testbase/build_subdir_link/
250     - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then find /builds/samba-testbase/build_subdir_link/ -type d -printf "'%p'\n" | xargs chmod u+w; fi
251     - ls -la /builds/samba-testbase/build_subdir_link/
252     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
253     # autobuild name, which means we can define a default template that runs most autobuild jobs
254     - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --skip-dependencies --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase
256 samba-def-build:
257   extends: .shared_template_build_only
258   stage: build_first
260 .needs_samba-def-build:
261   extends: .shared_template_test_only
262   needs:
263     - job: samba-def-build
264       artifacts: true
265     - job: samba-codecheck
267 samba-mit-build:
268   extends: .shared_template_build_only
269   variables:
270     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora40}
271   stage: build_first
273 .needs_samba-mit-build:
274   extends: .shared_template_test_only
275   variables:
276     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora40}
277   needs:
278     - job: samba-mit-build
279       artifacts: true
280     - job: samba-codecheck
282 samba-h5l-build:
283   extends: .shared_template_build_only
285 .needs_samba-h5l-build:
286   extends: .shared_template_test_only
287   needs:
288     - job: samba-h5l-build
289       artifacts: true
291 samba-without-smb1-build:
292   extends: .shared_template_build_only
294 .needs_samba-without-smb1-build:
295   extends: .shared_template_test_only
296   needs:
297     - job: samba-without-smb1-build
298       artifacts: true
300 samba-nt4-build:
301   extends: .shared_template_build_only
303 .needs_samba-nt4-build:
304   extends: .shared_template_test_only
305   needs:
306     - job: samba-nt4-build
307       artifacts: true
309 samba-no-opath-build:
310   extends: .shared_template_build_only
312 .needs_samba-no-opath-build:
313   extends: .shared_template_test_only
314   needs:
315     - job: samba-no-opath-build
316       artifacts: true
318 samba:
319   extends: .shared_template
321 samba-mitkrb5:
322   extends: .shared_template
323   variables:
324     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora40}
326 samba-minimal-smbd:
327   extends: .shared_template
329 samba-nopython:
330   extends: .shared_template
332 samba-admem:
333   extends: .needs_samba-def-build
335 samba-ad-dc-2:
336   extends: .needs_samba-def-build
338 samba-ad-dc-3:
339   extends: .needs_samba-def-build
341 samba-ad-dc-4a:
342   extends: .needs_samba-def-build
344 samba-ad-dc-4b:
345   extends: .needs_samba-def-build
347 samba-ad-dc-5:
348   extends: .needs_samba-def-build
350 samba-ad-dc-6:
351   extends: .needs_samba-def-build
353 samba-ad-back1:
354   extends: .needs_samba-def-build
356 samba-ad-back2:
357   extends: .needs_samba-def-build
359 samba-schemaupgrade:
360   extends: .needs_samba-def-build
362 samba-libs:
363   extends: .shared_template
365 samba-fuzz:
366   extends: .shared_template
367   variables:
368     # We match what Google is running over at oss-fuzz
369     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2004}
371 ctdb:
372   extends: .shared_template
374 samba-ctdb:
375   extends: .shared_template
377 samba-ad-dc-ntvfs:
378   extends: .needs_samba-def-build
380 samba-admem-mit:
381   extends: .needs_samba-mit-build
383 samba-addc-mit-4a:
384   extends: .needs_samba-mit-build
386 samba-addc-mit-4b:
387   extends: .needs_samba-mit-build
389 # This task is run first to ensure we compile before we start the
390 # main run as it is the fastest full compile of Samba.
391 samba-fips:
392   extends: .shared_template
393   variables:
394     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora40}
396 samba-codecheck:
397   extends: .shared_template
398   needs:
399   stage: build_first
401 .private_test_only:
402   extends: .private_runner_test
403   stage: test_private
404   rules:
405       # See above, to avoid a duplicate CI on the MR (these rules override the others)
406     - if: $CI_MERGE_REQUEST_ID
407       when: never
409       # These jobs are only run if the gitlab repo has private runners available.
410       # To enable private jobs, you must add the following var and value to
411       # your gitlab repo by navigating to:
412       # settings -> CI/CD -> Environment variables
413     - if: $SUPPORT_PRIVATE_TEST == "yes"
415 .needs_ext4_support:
416   # All runners provide an ext4 filesystem
417   #
418   # Note: we don't use
419   # extends: .shared_template_test_only
420   # as that somehow resets the needs section
421   # and generates problems for something
422   # like this (which is used below)
423   #
424   # .needs_samba-SOME-build-ext4:
425   #   extends:
426   #     - .needs_samba-SOME-build
427   #     - .needs_ext4_support
428   #
429   # So we only set stage again instead...
430   stage: test_only
432 .needs_5_15_kernel:
433   # Our private runners are based on
434   # ubuntu2204 with a 5.15 kernel.
435   #
436   # And they also provide an ext4 filesystem
437   extends: .private_test_only
439 .needs_samba-def-build-ext4:
440   extends:
441     - .needs_samba-def-build
442     - .needs_ext4_support
444 .needs_samba-mit-build-ext4:
445   extends:
446     - .needs_samba-mit-build
447     - .needs_ext4_support
449 .needs_samba-h5l-build-ext4:
450   extends:
451     - .needs_samba-h5l-build
452     - .needs_ext4_support
454 .needs_samba-without-smb1-build-5_15:
455   # Currently this doesn't strictly
456   # require a kernel >= 5.15, but only
457   # ext4 support.
458   #
459   # But we want to make sure that
460   # our private runners keep working
461   # and at least do a single job.
462   #
463   # In future we'll be able to run
464   # tests with io_uring in this
465   # setup, which will requires a
466   # 5.15 kernel in order to be useful.
467   extends:
468     - .needs_samba-without-smb1-build
469     - .needs_5_15_kernel
471 .needs_samba-nt4-build-ext4:
472   extends:
473     - .needs_samba-nt4-build
474     - .needs_ext4_support
476 .needs_samba-no-opath-build-ext4:
477   extends:
478     - .needs_samba-no-opath-build
479     - .needs_ext4_support
481 samba-fileserver:
482   extends: .needs_samba-h5l-build-ext4
484 samba-fileserver-without-smb1:
485   extends: .needs_samba-without-smb1-build-5_15
487 # This is a full build without the AD DC so we test the build with MIT
488 # Kerberos from the default system (Ubuntu 22.04 at this stage).
489 # Runtime behaviour checked via the ktest (static ccache and keytab)
490 # environment
491 samba-ktest-mit:
492  extends: .shared_template
494 samba-ad-dc-1:
495   extends: .needs_samba-def-build-ext4
497 samba-nt4:
498   extends: .needs_samba-nt4-build-ext4
500 samba-addc-mit-1:
501   extends: .needs_samba-mit-build-ext4
503 samba-no-opath1:
504   extends: .needs_samba-no-opath-build-ext4
506 samba-no-opath2:
507   extends: .needs_samba-no-opath-build-ext4
509 # 'pages' is a special job which can publish artifacts in `public` dir to gitlab pages
510 pages:
511   extends: .shared_runner_build_image
512   stage: report
513   dependencies:  # tell gitlab to download artifacts for these jobs
514     - others
515     - samba
516     - samba-mitkrb5
517     - samba-admem
518     - samba-ad-dc-2
519     - samba-ad-dc-3
520     - samba-ad-dc-4a
521     - samba-ad-dc-4b
522     - samba-ad-dc-5
523     - samba-ad-dc-6
524     - samba-libs
525     - samba-minimal-smbd
526     - samba-nopython
527     - samba-fuzz
528     # - ctdb  # TODO
529     - samba-ctdb
530     - samba-ad-dc-ntvfs
531     - samba-admem-mit
532     - samba-addc-mit-4a
533     - samba-addc-mit-4b
534     - samba-ad-back1
535     - samba-ad-back2
536     - samba-fileserver
537     - samba-fileserver-without-smb1
538     - samba-ad-dc-1
539     - samba-nt4
540     - samba-schemaupgrade
541     - samba-addc-mit-1
542     - samba-fips
543     - samba-no-opath1
544     - samba-no-opath2
545     - ubuntu2204-samba-o3
546   script:
547     - ls -la *.info
548     - ./configure.developer
549     - make -j
550     - ls -la *.info
551     - lcov $(ls *.info | xargs -I{} echo -n "-a {} ") -o all.info
552     - ls -la *.info
553     - genhtml all.info --ignore-errors source --output-directory public --prefix=$(pwd) --title "coverage report for $CI_COMMIT_REF_NAME $CI_COMMIT_SHORT_SHA"
554   artifacts:
555     expire_in: 30 days
556     paths:
557       - public
558   only:
559     variables:
560       - $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == "--enable-coverage"
562 # Coverity Scan
563 coverity:
564   extends: .shared_runner_build_image
565   variables:
566     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_opensuse155}
567   stage: build
568   script:
569     - wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_PROJECT_NAME" -O /tmp/coverity_tool.tgz
570     - tar xf /tmp/coverity_tool.tgz
571     - ./configure.developer --with-cluster-support
572     - cov-analysis-linux64-*/bin/cov-build --dir cov-int make -j$(nproc)
573     - tar czf cov-int.tar.gz cov-int
574     - curl
575       --form token=$COVERITY_SCAN_TOKEN
576       --form email=$COVERITY_SCAN_EMAIL
577       --form file=@cov-int.tar.gz
578       --form version="`git describe --tags`"
579       --form description="CI build"
580       https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
581   only:
582     refs:
583       - master
584       - schedules
585     variables:
586       - $COVERITY_SCAN_TOKEN != null
587       - $COVERITY_SCAN_PROJECT_NAME != null
588       - $COVERITY_SCAN_EMAIL != null
589   artifacts:
590     expire_in: 1 week
591     when: on_failure
592     paths:
593       - cov-int/*.txt
595 debian11-samba-32bit:
596   extends: .shared_template
597   variables:
598     AUTOBUILD_JOB_NAME: samba-32bit
599     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian11_32bit}
602 # We build samba-o3 on all supported distributions
605 # This job, which matches the main CI, needs to still do coverage so
606 # we show the coverage on the "none" environment tests
608 # We want --enable-coverage specified here otherwise we will have a
609 # different set of build options on the coverage build and can fail
610 # when -O3 gets combined with --enable-coverage in the scheduled
611 # builds.
613 ubuntu2204-samba-o3:
614   extends: .shared_template
615   variables:
616     AUTOBUILD_JOB_NAME: samba-o3
617     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2204}
618     SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "--enable-coverage"
619   rules:
620     # See above, to avoid a duplicate CI on the MR (these rules override the others)
621     - if: $CI_MERGE_REQUEST_ID
622       when: never
623     # do not run o3 builds (which run a lot of VMs) if told not to
624     # (this uses the same variable as autobuild.py)
625     - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1"
626       when: never
627     - when: on_success
629 # All other jobs do not want code coverage.
630 .samba-o3-template:
631   extends: .shared_template
632   variables:
633     AUTOBUILD_JOB_NAME: samba-o3
634   rules:
635     # See above, to avoid a duplicate CI on the MR (these rules override the others)
636     - if: $CI_MERGE_REQUEST_ID
637       when: never
638     # do not run o3 builds (which run a lot of VMs) if told not to
639     # (this uses the same variable as autobuild.py)
640     - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1"
641       when: never
642     # do not run o3 for coverage since they are using different images
643     - if: $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == ""
645 ubuntu2004-samba-o3:
646   extends: .samba-o3-template
647   variables:
648     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2004}
650 debian11-samba-o3:
651   extends: .samba-o3-template
652   variables:
653     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian11}
655 debian12-samba-o3:
656   extends: .samba-o3-template
657   variables:
658     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian12}
660 opensuse155-samba-o3:
661   extends: .samba-o3-template
662   variables:
663     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_opensuse155}
665 rocky8-samba-o3:
666   extends: .samba-o3-template
667   variables:
668     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_rocky8}
670 centos9s-samba-o3:
671   extends: .samba-o3-template
672   variables:
673     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_centos9s}
675 fedora40-samba-o3:
676   extends: .samba-o3-template
677   variables:
678     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora40}
681 # Keep the samba-o3 sections at the end ...