1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

.gitlab-ci.yml: split out samba-{def,mit}-build into the build_first stage

It's enough to have 2 jobs in build_first, so we can move 'samba-fips'
out of it again.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher 2020-11-20 12:25:33 +01:00
parent dc16294342
commit 4df7f2b691

View File

@ -96,6 +96,7 @@ include:
- echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt
- diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt
- diff -u bootstrap/sha1sum.txt /sha1sum.txt
- echo "${CI_COMMIT_SHA} ${CI_COMMIT_TITLE}" > /tmp/commit.txt
- export CCACHE_BASEDIR="${PWD}"
- export CCACHE_DIR="${PWD}/ccache" && mkdir -pv "$CCACHE_DIR"
- export CC="ccache cc"
@ -141,6 +142,71 @@ others:
- script/autobuild.py samba-xc $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/samba-xc
- script/autobuild.py docs-xml $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase/docs-xml
.shared_template_build_only:
extends: .shared_template
stage: build_first
artifacts:
expire_in: 1 week
paths:
- "*.stdout"
- "*.stderr"
- "*.info"
- system-info.txt
- samba-testbase.tar.gz
script:
# gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
# autobuild name, which means we can define a default template that runs most autobuild jobs
- script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase
# On success we need to pack everything into an artifacts file
# which needs to be in the git checkout.
# As tar doesn't handle hardlink of read-only files,
# we remember the acls and add write permissions
# before creating the archive. The consumer will apply
# the acls again.
- cp -a /sha1sum.txt /tmp/samba-testbase/image-sha1sum.txt
- cp -a /tmp/commit.txt /tmp/samba-testbase/commit.txt
- pushd /tmp && getfacl -R samba-testbase > samba-testbase.acl.dump && popd
- chmod -R +w /tmp/samba-testbase
- mv /tmp/samba-testbase.acl.dump /tmp/samba-testbase/
- tar cfz samba-testbase.tar.gz /tmp/samba-testbase
- ls -la samba-testbase.tar.gz
- sha1sum samba-testbase.tar.gz
.shared_template_test_only:
extends: .shared_template
stage: build
script:
# We unpack the artifacts file created by the .shared_template_build_only
# run we depend on
- ls -la samba-testbase.tar.gz
- sha1sum samba-testbase.tar.gz
- tar xfz samba-testbase.tar.gz -C /
- diff -u /tmp/samba-testbase/image-sha1sum.txt /sha1sum.txt
- diff -u /tmp/samba-testbase/commit.txt /tmp/commit.txt
- mv /tmp/samba-testbase/samba-testbase.acl.dump /tmp/samba-testbase.acl.dump
- pushd /tmp && setfacl --restore=/tmp/samba-testbase.acl.dump && popd
# gitlab predefines CI_JOB_NAME for each job. The gitlab job usually matches the
# autobuild name, which means we can define a default template that runs most autobuild jobs
- script/autobuild.py $AUTOBUILD_JOB_NAME $SAMBA_CI_AUTOBUILD_ENABLE_COVERAGE --skip-dependencies --verbose --nocleanup --keeplogs --tail --full-testbase /tmp/samba-testbase
samba-def-build:
extends: .shared_template_build_only
.needs_samba-def-build:
extends: .shared_template_test_only
needs:
- job: samba-def-build
artifacts: true
samba-mit-build:
extends: .shared_template_build_only
.needs_samba-mit-build:
extends: .shared_template_test_only
needs:
- job: samba-mit-build
artifacts: true
samba:
extends: .shared_template
@ -151,22 +217,22 @@ samba-minimal-smbd:
extends: .shared_template
samba-admem:
extends: .shared_template
extends: .needs_samba-def-build
samba-ad-dc-2:
extends: .shared_template
extends: .needs_samba-def-build
samba-ad-dc-3:
extends: .shared_template
extends: .needs_samba-def-build
samba-ad-dc-4:
extends: .shared_template
extends: .needs_samba-def-build
samba-ad-dc-5:
extends: .shared_template
extends: .needs_samba-def-build
samba-ad-dc-6:
extends: .shared_template
extends: .needs_samba-def-build
samba-libs:
extends: .shared_template
@ -182,18 +248,17 @@ samba-ctdb:
extends: .shared_template
samba-ad-dc-ntvfs:
extends: .shared_template
extends: .needs_samba-def-build
samba-admem-mit:
extends: .shared_template
extends: .needs_samba-mit-build
samba-ad-dc-4-mitkrb5:
extends: .shared_template
extends: .needs_samba-mit-build
# This task is run first to ensure we compile before we start the
# main run as it is the fastest full compile of Samba.
samba-fips:
stage: build_first
extends: .shared_template
image: $SAMBA_CI_CONTAINER_IMAGE_fedora33