Merge branch 'michal/minor-gitlab-ci-cleanup-9.16' into 'bind-9.16'

[9.16] Minor GitLab CI cleanup

See merge request isc-projects/bind9!8513
This commit is contained in:
Michał Kępień
2023-11-21 09:34:07 +00:00

View File

@@ -38,9 +38,6 @@ variables:
UBSAN_OPTIONS: "halt_on_error=1:abort_on_error=1:disable_coredump=0"
TARBALL_COMPRESSOR: xz
TARBALL_EXTENSION: xz
INSTALL_PATH: "${CI_PROJECT_DIR}/.local"
# Disable pytest's "cacheprovider" plugin to prevent it from creating
@@ -331,49 +328,6 @@ stages:
- export SLOT=$(sh -x bin/tests/prepare-softhsm2.sh)
- test -n "${SLOT}" && test "${SLOT}" -gt 0
cross-version-config-tests:
stage: system
<<: *base_image
<<: *default_triggering_rules
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON}"
# Disable option checking to prevent problems with new default options in
# the &configure anchor.
EXTRA_CONFIGURE: "--disable-option-checking"
script:
# Exclude the dyndb test from the system test as the sample library can't
# locate the libdns library from the BIND 9 baseline version.
- sed -i '/^dyndb \\$/d' bin/tests/system/conf.sh.common
- *configure
- *setup_interfaces
- make -j${BUILD_PARALLEL_JOBS:-1}
- export BIND_BRANCH=16
# When testing a .0 release, compare it against the previous development
# release (e.g., 9.19.0 and 9.18.0 should both be compared against 9.17.22).
- if [ "$(sed -n -E "s|^m4_define\(\[bind_VERSION_PATCH\], ([0-9]+)\)dnl$|\1|p" configure.ac)" = "0" ]; then export BIND_BRANCH=$((BIND_BRANCH - 1 - (BIND_BRANCH % 2))); fi
- BASELINE="$(curl -s "https://gitlab.isc.org/api/v4/projects/1/repository/tags?search=^v9.${BIND_BRANCH}&order_by=version" | jq -r ".[0].name")"
- git clone --branch "${BASELINE}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git "bind-${BASELINE}"
- cd "bind-${BASELINE}"
- *configure
- make -j${BUILD_PARALLEL_JOBS:-1}
- cd bin/tests/system
# Neutralize shell and pytests; in effect, "nsX" servers are just started
# and stopped, thus configuration checked.
- truncate --size=0 */tests{.sh,*.py}
# Run the setup phase of all system tests in the most recently tagged BIND 9
# release using the binaries built for the current BIND 9 version. This
# intends to detect obvious backward compatibility issues with the latter.
- sed -i -E "s|(export TOP)=.*|\1=${CI_PROJECT_DIR}|" conf.sh
- make -j${TEST_PARALLEL_JOBS:-1} -k check V=1
artifacts:
paths:
- bind-*
untracked: true
expire_in: "1 day"
when: on_failure
needs: []
.system_test_common: &system_test_common
<<: *default_triggering_rules
stage: system
@@ -598,10 +552,10 @@ tarball-create:
- rm -rf "${BIND_DIRECTORY}/tmp/.doctrees/"
- for man in "${BIND_DIRECTORY}/doc/man/"*; do mv "$man" "$man"in; done
- tar --append --file="${BIND_DIRECTORY}.tar" "${BIND_DIRECTORY}/doc/man/"*in
- ${TARBALL_COMPRESSOR} "${BIND_DIRECTORY}.tar"
- xz "${BIND_DIRECTORY}.tar"
artifacts:
paths:
- bind-*.tar.${TARBALL_EXTENSION}
- bind-*.tar.xz
# Jobs for doc builds on Debian 12 "bookworm" (amd64)
@@ -643,6 +597,51 @@ docs:pdf:
untracked: true
needs: []
# Job detecting named.conf breakage introduced since the previous point release
cross-version-config-tests:
stage: system
<<: *base_image
<<: *default_triggering_rules
variables:
CC: gcc
CFLAGS: "${CFLAGS_COMMON}"
# Disable option checking to prevent problems with new default options in
# the &configure anchor.
EXTRA_CONFIGURE: "--disable-option-checking"
script:
# Exclude the dyndb test from the system test as the sample library can't
# locate the libdns library from the BIND 9 baseline version.
- sed -i '/^dyndb \\$/d' bin/tests/system/conf.sh.common
- *configure
- *setup_interfaces
- make -j${BUILD_PARALLEL_JOBS:-1}
- export BIND_BRANCH=16
# When testing a .0 release, compare it against the previous development
# release (e.g., 9.19.0 and 9.18.0 should both be compared against 9.17.22).
- if [ "$(sed -n -E "s|^m4_define\(\[bind_VERSION_PATCH\], ([0-9]+)\)dnl$|\1|p" configure.ac)" = "0" ]; then export BIND_BRANCH=$((BIND_BRANCH - 1 - (BIND_BRANCH % 2))); fi
- BASELINE="$(curl -s "https://gitlab.isc.org/api/v4/projects/1/repository/tags?search=^v9.${BIND_BRANCH}&order_by=version" | jq -r ".[0].name")"
- git clone --branch "${BASELINE}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git "bind-${BASELINE}"
- cd "bind-${BASELINE}"
- *configure
- make -j${BUILD_PARALLEL_JOBS:-1}
- cd bin/tests/system
# Neutralize shell and pytests; in effect, "nsX" servers are just started
# and stopped, thus configuration checked.
- truncate --size=0 */tests{.sh,*.py}
# Run the setup phase of all system tests in the most recently tagged BIND 9
# release using the binaries built for the current BIND 9 version. This
# intends to detect obvious backward compatibility issues with the latter.
- sed -i -E "s|(export TOP)=.*|\1=${CI_PROJECT_DIR}|" conf.sh
- make -j${TEST_PARALLEL_JOBS:-1} -k check V=1
artifacts:
paths:
- bind-*
untracked: true
expire_in: "1 day"
when: on_failure
needs: []
# Jobs for regular GCC builds on Alpine Linux 3.18 (amd64)
gcc:alpine3.18:amd64:
@@ -749,8 +748,8 @@ gcc:tarball:nosphinx:
<<: *build_job
before_script:
- (! command -v sphinx-build >/dev/null)
- tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
- rm -f bind-*.tar.${TARBALL_EXTENSION}
- tar --extract --file bind-*.tar.xz
- rm -f bind-*.tar.xz
- cd bind-*
needs:
- job: tarball-create
@@ -950,8 +949,8 @@ gcc:tarball:
<<: *base_image
<<: *build_job
before_script:
- tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
- rm -f bind-*.tar.${TARBALL_EXTENSION}
- tar --extract --file bind-*.tar.xz
- rm -f bind-*.tar.xz
- cd bind-*
needs:
- job: tarball-create
@@ -1377,7 +1376,7 @@ release:
- find Build/Debug/ \( -name "*.bsc" -o -name "*.idb" \) -print -delete
- find Build/ -regextype posix-extended -regex "Build/.*/($(find bin/tests/ -type f | sed -nE "s|^bin/tests(/system)?/win32/(.*)\.vcxproj$|\2|p" | paste -d"|" -s))\..*" -print -delete
# Create Windows zips
- openssl dgst -sha256 "${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" | tee Build/Release/SHA256 Build/Debug/SHA256
- openssl dgst -sha256 "${BIND_DIRECTORY}.tar.xz" | tee Build/Release/SHA256 Build/Debug/SHA256
- cp "doc/arm/_build/latex/Bv9ARM.pdf" Build/Release/
- cp "doc/arm/_build/latex/Bv9ARM.pdf" Build/Debug/
- ( cd Build/Release; zip "../../BIND${BIND_DIRECTORY#bind-}.x64.zip" * )
@@ -1385,8 +1384,8 @@ release:
# Prepare release tarball contents (tarballs + zips + documentation)
- mkdir -p "${BIND_DIRECTORY}-release/doc/arm"
- pushd "${BIND_DIRECTORY}-release"
- mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" ../BIND*.zip .
- tar --extract --file="${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}"
- mv "../${BIND_DIRECTORY}.tar.xz" ../BIND*.zip .
- tar --extract --file="${BIND_DIRECTORY}.tar.xz"
- mv "${BIND_DIRECTORY}"/{CHANGES*,COPYRIGHT,LICENSE,README,srcid} .
- rm -rf "${BIND_DIRECTORY}"
- mv "../doc/arm/_build/html" doc/arm/