dsdb: Slightly simplify dsdb_trust_get_incoming_passwords()
[Samba.git] / .gitlab-ci-main.yml
blob9c1ddc69fd56d19df274ad9d6c1a66959d4cc77e
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: 21a93787675107f010836bbfa5e8542c272bc4b0
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_fedora38: fedora38
68   SAMBA_CI_CONTAINER_IMAGE_centos7: centos7
69   SAMBA_CI_CONTAINER_IMAGE_centos8s: centos8s
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     - lsb_release -a
116     - cat /etc/os-release
117     - lscpu
118     - cat /proc/cpuinfo
119     - mount
120     - df -h
121     - cat /proc/swaps
122     - free -h
123       # ld will fail if coverage enabled, force link ld to ld.bfd
124     - if [ -n "$SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE" ]; then sudo ln -sf $(which ld.bfd) $(which ld); fi
125       # See bootstrap/.gitlab-ci.yml how to generate a new image
126     - echo "SAMBA_CI_CONTAINER_REGISTRY[${SAMBA_CI_CONTAINER_REGISTRY}]"
127     - echo "SAMBA_CI_CONTAINER_TAG[${SAMBA_CI_CONTAINER_TAG}]"
128     - echo "SAMBA_CI_JOB_IMAGE[${SAMBA_CI_JOB_IMAGE}]"
129     - echo "CI_JOB_IMAGE[${CI_JOB_IMAGE}]"
130     - bootstrap/template.py --sha1sum > /tmp/sha1sum-template.txt
131     - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-template.txt
132     - echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
133     - diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
134     - diff -u bootstrap/sha1sum.txt /sha1sum.txt
135     - echo "${CI_COMMIT_SHA} ${CI_COMMIT_TITLE}" > /tmp/commit.txt
136     - export CCACHE_BASEDIR="${PWD}"
137     - export CCACHE_DIR="${PWD}/ccache" && mkdir -pv "$CCACHE_DIR"
138     - export CC="ccache cc"
139     - export CXX="ccache c++"
140     - ccache -z -M 500M
141     - ccache -s
142       # We are already running .gitlab-ci directives from this repo, remove additional checks that break our CI
143     - git config --global --add safe.directory `pwd`
144   after_script:
145     - mount
146     - df -h
147     - cat /proc/swaps
148     - free -h
149     - CCACHE_BASEDIR="${PWD}" CCACHE_DIR="${PWD}/ccache" ccache -s -c
150   artifacts:
151     expire_in: 1 week
152     paths:
153       - "*.stdout"
154       - "*.stderr"
155       - "*.info"
156       - public
157       - system-info.txt
158   retry:
159     max: 2
160     when:
161       - runner_system_failure
162       - stuck_or_timeout_failure
163       - api_failure
164       - runner_unsupported
165       - stale_schedule
166       - archived_failure
167       - scheduler_failure
168       - data_integrity_failure
170   script:
171     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
172     # autobuild name, which means we can define a default template that runs most autobuild jobs
173     - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE  --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase
175 # Ensure when adding a new job below that you also add it to
176 # the dependencies for 'pages' below for the code coverage page
177 # generation.
179 others:
180   extends: .shared_template
181   script:
182     - script/autobuild.py ldb      $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/ldb
183     - script/autobuild.py pidl     $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/pidl
184     - script/autobuild.py replace  $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/replace
185     - script/autobuild.py talloc   $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/talloc
186     - script/autobuild.py tdb      $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/tdb
187     - script/autobuild.py tevent   $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/tevent
188     - script/autobuild.py samba-xc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/samba-xc
189     - script/autobuild.py docs-xml $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase/docs-xml
191 .shared_template_build_only:
192   extends: .shared_template
193   timeout: 2h
194   needs:
195   artifacts:
196     expire_in: 1 week
197     paths:
198       - "*.stdout"
199       - "*.stderr"
200       - "*.info"
201       - system-info.txt
202       - samba-testbase.tar
203   script:
204     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
205     # autobuild name, which means we can define a default template that runs most autobuild jobs
206     - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE  --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase
207     # On success we need to pack everything into an artifacts file
208     # which needs to be in the git checkout.
209     # As tar doesn't handle hardlink of read-only files,
210     # we remember the acls and add write permissions
211     # before creating the archive. The consumer will apply
212     # the acls again.
213     - cp -a /sha1sum.txt /builds/samba-testbase/image-sha1sum.txt
214     - cp -a /tmp/commit.txt /builds/samba-testbase/commit.txt
215     - ln -s /builds/samba-testbase/${AUTOBUILD_JOB_NAME}/ /builds/samba-testbase/build_subdir_link
216     - pushd /builds && getfacl -R samba-testbase > samba-testbase.acl.dump && popd
217     - chmod -R +w /builds/samba-testbase
218     - mv /builds/samba-testbase.acl.dump /builds/samba-testbase/
219     - tar $SAMBA_TESTBASE_TAR_OPTIONS -cf samba-testbase.tar /builds/samba-testbase
220     - ls -la samba-testbase.tar
221     - sha1sum samba-testbase.tar
223 .shared_template_test_only:
224   extends:
225     - .shared_template
226     - .shared_runner_test
227   stage: test_only
228   script:
229     # Print the Kerberos version to check we ended up with the right one
230     # in the runner. We do not have configure output to recognize it
231     # otherwise.
232     - if [ -x "$(command -v krb5-config)" ]; then krb5-config --version; fi
233     # We unpack the artifacts file created by the .shared_template_build_only
234     # run we depend on
235     - ls -la samba-testbase.tar
236     - sha1sum samba-testbase.tar
237     - tar $SAMBA_TESTBASE_TAR_OPTIONS -xf samba-testbase.tar -C /
238     - diff -u /builds/samba-testbase/image-sha1sum.txt /sha1sum.txt
239     - diff -u /builds/samba-testbase/commit.txt /tmp/commit.txt
240     - mv /builds/samba-testbase/samba-testbase.acl.dump /builds/samba-testbase.acl.dump
241     - pushd /builds && setfacl --restore=/builds/samba-testbase.acl.dump && popd
242     - ls -la /builds/samba-testbase/
243     - ls -la /builds/samba-testbase/build_subdir_link
244     - ls -la /builds/samba-testbase/build_subdir_link/
245     - 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
246     - ls -la /builds/samba-testbase/build_subdir_link/
247     # gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
248     # autobuild name, which means we can define a default template that runs most autobuild jobs
249     - script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --skip-dependencies --verbose --nocleanup --keeplogs --tail --full-testbase /builds/samba-testbase
251 samba-def-build:
252   extends: .shared_template_build_only
253   stage: build_first
255 .needs_samba-def-build:
256   extends: .shared_template_test_only
257   needs:
258     - job: samba-def-build
259       artifacts: true
260     - job: samba-codecheck
262 samba-mit-build:
263   extends: .shared_template_build_only
264   variables:
265     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
266   stage: build_first
268 .needs_samba-mit-build:
269   extends: .shared_template_test_only
270   variables:
271     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
272   needs:
273     - job: samba-mit-build
274       artifacts: true
275     - job: samba-codecheck
277 samba-h5l-build:
278   extends: .shared_template_build_only
280 .needs_samba-h5l-build:
281   extends: .shared_template_test_only
282   needs:
283     - job: samba-h5l-build
284       artifacts: true
286 samba-without-smb1-build:
287   extends: .shared_template_build_only
289 .needs_samba-without-smb1-build:
290   extends: .shared_template_test_only
291   needs:
292     - job: samba-without-smb1-build
293       artifacts: true
295 samba-nt4-build:
296   extends: .shared_template_build_only
298 .needs_samba-nt4-build:
299   extends: .shared_template_test_only
300   needs:
301     - job: samba-nt4-build
302       artifacts: true
304 samba-no-opath-build:
305   extends: .shared_template_build_only
307 .needs_samba-no-opath-build:
308   extends: .shared_template_test_only
309   needs:
310     - job: samba-no-opath-build
311       artifacts: true
313 samba:
314   extends: .shared_template
316 samba-mitkrb5:
317   extends: .shared_template
318   variables:
319     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
321 samba-minimal-smbd:
322   extends: .shared_template
324 samba-nopython:
325   extends: .shared_template
327 samba-admem:
328   extends: .needs_samba-def-build
330 samba-ad-dc-2:
331   extends: .needs_samba-def-build
333 samba-ad-dc-3:
334   extends: .needs_samba-def-build
336 samba-ad-dc-4a:
337   extends: .needs_samba-def-build
339 samba-ad-dc-4b:
340   extends: .needs_samba-def-build
342 samba-ad-dc-5:
343   extends: .needs_samba-def-build
345 samba-ad-dc-6:
346   extends: .needs_samba-def-build
348 samba-ad-back1:
349   extends: .needs_samba-def-build
351 samba-ad-back2:
352   extends: .needs_samba-def-build
354 samba-schemaupgrade:
355   extends: .needs_samba-def-build
357 samba-libs:
358   extends: .shared_template
360 samba-fuzz:
361   extends: .shared_template
362   variables:
363     # We match what Google is running over at oss-fuzz
364     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2004}
366 ctdb:
367   extends: .shared_template
369 samba-ctdb:
370   extends: .shared_template
372 samba-ad-dc-ntvfs:
373   extends: .needs_samba-def-build
375 samba-admem-mit:
376   extends: .needs_samba-mit-build
378 samba-addc-mit-4a:
379   extends: .needs_samba-mit-build
381 samba-addc-mit-4b:
382   extends: .needs_samba-mit-build
384 # This task is run first to ensure we compile before we start the
385 # main run as it is the fastest full compile of Samba.
386 samba-fips:
387   extends: .shared_template
388   variables:
389     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
391 samba-codecheck:
392   extends: .shared_template
393   needs:
394   variables:
395     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
396   stage: build_first
398 .private_test_only:
399   extends: .private_runner_test
400   stage: test_private
401   rules:
402       # See above, to avoid a duplicate CI on the MR (these rules override the others)
403     - if: $CI_MERGE_REQUEST_ID
404       when: never
406       # These jobs are only run if the gitlab repo has private runners available.
407       # To enable private jobs, you must add the following var and value to
408       # your gitlab repo by navigating to:
409       # settings -> CI/CD -> Environment variables
410     - if: $SUPPORT_PRIVATE_TEST == "yes"
412 .needs_ext4_support:
413   # All runners provide an ext4 filesystem
414   #
415   # Note: we don't use
416   # extends: .shared_template_test_only
417   # as that somehow resets the needs section
418   # and generates problems for something
419   # like this (which is used below)
420   #
421   # .needs_samba-SOME-build-ext4:
422   #   extends:
423   #     - .needs_samba-SOME-build
424   #     - .needs_ext4_support
425   #
426   # So we only set stage again instead...
427   stage: test_only
429 .needs_5_15_kernel:
430   # Our private runners are based on
431   # ubuntu2204 with a 5.15 kernel.
432   #
433   # And they also provide an ext4 filesystem
434   extends: .private_test_only
436 .needs_samba-def-build-ext4:
437   extends:
438     - .needs_samba-def-build
439     - .needs_ext4_support
441 .needs_samba-mit-build-ext4:
442   extends:
443     - .needs_samba-mit-build
444     - .needs_ext4_support
446 .needs_samba-h5l-build-ext4:
447   extends:
448     - .needs_samba-h5l-build
449     - .needs_ext4_support
451 .needs_samba-without-smb1-build-5_15:
452   # Currently this doesn't strictly
453   # require a kernel >= 5.15, but only
454   # ext4 support.
455   #
456   # But we want to make sure that
457   # our private runners keep working
458   # and at least do a single job.
459   #
460   # In future we'll be able to run
461   # tests with io_uring in this
462   # setup, which will requires a
463   # 5.15 kernel in order to be useful.
464   extends:
465     - .needs_samba-without-smb1-build
466     - .needs_5_15_kernel
468 .needs_samba-nt4-build-ext4:
469   extends:
470     - .needs_samba-nt4-build
471     - .needs_ext4_support
473 .needs_samba-no-opath-build-ext4:
474   extends:
475     - .needs_samba-no-opath-build
476     - .needs_ext4_support
478 samba-fileserver:
479   extends: .needs_samba-h5l-build-ext4
481 samba-fileserver-without-smb1:
482   extends: .needs_samba-without-smb1-build-5_15
484 # This is a full build without the AD DC so we test the build with MIT
485 # Kerberos from the default system (Ubuntu 22.04 at this stage).
486 # Runtime behaviour checked via the ktest (static ccache and keytab)
487 # environment
488 samba-ktest-mit:
489  extends: .shared_template
491 samba-ad-dc-1:
492   extends: .needs_samba-def-build-ext4
494 samba-nt4:
495   extends: .needs_samba-nt4-build-ext4
497 samba-addc-mit-1:
498   extends: .needs_samba-mit-build-ext4
500 samba-no-opath1:
501   extends: .needs_samba-no-opath-build-ext4
503 samba-no-opath2:
504   extends: .needs_samba-no-opath-build-ext4
506 # 'pages' is a special job which can publish artifacts in `public` dir to gitlab pages
507 pages:
508   extends: .shared_runner_build_image
509   stage: report
510   dependencies:  # tell gitlab to download artifacts for these jobs
511     - others
512     - samba
513     - samba-mitkrb5
514     - samba-admem
515     - samba-ad-dc-2
516     - samba-ad-dc-3
517     - samba-ad-dc-4a
518     - samba-ad-dc-4b
519     - samba-ad-dc-5
520     - samba-ad-dc-6
521     - samba-libs
522     - samba-minimal-smbd
523     - samba-nopython
524     - samba-fuzz
525     # - ctdb  # TODO
526     - samba-ctdb
527     - samba-ad-dc-ntvfs
528     - samba-admem-mit
529     - samba-addc-mit-4a
530     - samba-addc-mit-4b
531     - samba-ad-back1
532     - samba-ad-back2
533     - samba-fileserver
534     - samba-fileserver-without-smb1
535     - samba-ad-dc-1
536     - samba-nt4
537     - samba-schemaupgrade
538     - samba-addc-mit-1
539     - samba-fips
540     - samba-no-opath1
541     - samba-no-opath2
542     - ubuntu2204-samba-o3
543   script:
544     - ls -la *.info
545     - ./configure.developer
546     - make -j
547     - ls -la *.info
548     - lcov $(ls *.info | xargs -I{} echo -n "-a {} ") -o all.info
549     - ls -la *.info
550     - genhtml all.info --ignore-errors source --output-directory public --prefix=$(pwd) --title "coverage report for $CI_COMMIT_REF_NAME $CI_COMMIT_SHORT_SHA"
551   artifacts:
552     expire_in: 30 days
553     paths:
554       - public
555   only:
556     variables:
557       - $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == "--enable-coverage"
559 # Coverity Scan
560 coverity:
561   extends: .shared_runner_build_image
562   variables:
563     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_opensuse155}
564   stage: build
565   script:
566     - wget https://scan.coverity.com/download/linux64 --post-data "token=$COVERITY_SCAN_TOKEN&project=$COVERITY_SCAN_PROJECT_NAME" -O /tmp/coverity_tool.tgz
567     - tar xf /tmp/coverity_tool.tgz
568     - ./configure.developer --with-cluster-support
569     - cov-analysis-linux64-*/bin/cov-build --dir cov-int make -j$(nproc)
570     - tar czf cov-int.tar.gz cov-int
571     - curl
572       --form token=$COVERITY_SCAN_TOKEN
573       --form email=$COVERITY_SCAN_EMAIL
574       --form file=@cov-int.tar.gz
575       --form version="`git describe --tags`"
576       --form description="CI build"
577       https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
578   only:
579     refs:
580       - master
581       - schedules
582     variables:
583       - $COVERITY_SCAN_TOKEN != null
584       - $COVERITY_SCAN_PROJECT_NAME != null
585       - $COVERITY_SCAN_EMAIL != null
586   artifacts:
587     expire_in: 1 week
588     when: on_failure
589     paths:
590       - cov-int/*.txt
592 debian11-samba-32bit:
593   extends: .shared_template
594   variables:
595     AUTOBUILD_JOB_NAME: samba-32bit
596     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian11_32bit}
599 # We build samba-o3 on all supported distributions
602 # This job, which matches the main CI, needs to still do coverage so
603 # we show the coverage on the "none" environment tests
605 # We want --enable-coverage specified here otherwise we will have a
606 # different set of build options on the coverage build and can fail
607 # when -O3 gets combined with --enable-coverage in the scheduled
608 # builds.
610 ubuntu2204-samba-o3:
611   extends: .shared_template
612   variables:
613     AUTOBUILD_JOB_NAME: samba-o3
614     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2204}
615     SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE: "--enable-coverage"
616   rules:
617     # See above, to avoid a duplicate CI on the MR (these rules override the others)
618     - if: $CI_MERGE_REQUEST_ID
619       when: never
620     # do not run o3 builds (which run a lot of VMs) if told not to
621     # (this uses the same variable as autobuild.py)
622     - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1"
623       when: never
624     - when: on_success
626 # All other jobs do not want code coverage.
627 .samba-o3-template:
628   extends: .shared_template
629   variables:
630     AUTOBUILD_JOB_NAME: samba-o3
631   rules:
632     # See above, to avoid a duplicate CI on the MR (these rules override the others)
633     - if: $CI_MERGE_REQUEST_ID
634       when: never
635     # do not run o3 builds (which run a lot of VMs) if told not to
636     # (this uses the same variable as autobuild.py)
637     - if: $AUTOBUILD_SKIP_SAMBA_O3 == "1"
638       when: never
639     # do not run o3 for coverage since they are using different images
640     - if: $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE == ""
642 ubuntu2004-samba-o3:
643   extends: .samba-o3-template
644   variables:
645     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_ubuntu2004}
647 debian11-samba-o3:
648   extends: .samba-o3-template
649   variables:
650     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian11}
652 debian12-samba-o3:
653   extends: .samba-o3-template
654   variables:
655     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_debian12}
657 opensuse155-samba-o3:
658   extends: .samba-o3-template
659   variables:
660     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_opensuse155}
662 centos7-samba-o3:
663   extends: .samba-o3-template
664   variables:
665     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_centos7}
666     # Git on CentOS doesn't support shallow git cloning
667     GIT_DEPTH: ""
668     # We need a newer GnuTLS version on CentOS7
669     PKG_CONFIG_PATH: "/usr/lib64/compat-gnutls37/pkgconfig:/usr/lib64/compat-nettle32/pkgconfig"
671 centos8s-samba-o3:
672   extends: .samba-o3-template
673   variables:
674     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_centos8s}
676 fedora38-samba-o3:
677   extends: .samba-o3-template
678   variables:
679     SAMBA_CI_JOB_IMAGE: ${SAMBA_CI_CONTAINER_IMAGE_fedora38}
682 # Keep the samba-o3 sections at the end ...