Both FreeBSD and OpenBSD in the CI are tested on outdated images.
Current FreeBSD images can't even be rebuild because in the maintained
branches they were ported from QCOW2 to the AWS autoscaler (also a
future of the OpenBSD image). This is something we don't want to
backport to EoL branches.
(cherry picked from commit f08f69c54d)
879 lines
23 KiB
YAML
879 lines
23 KiB
YAML
variables:
|
|
# Not normally needed, but may be if some script uses `apt-get install`.
|
|
DEBIAN_FRONTEND: noninteractive
|
|
# Locale settings do not affect the build, but might affect tests.
|
|
LC_ALL: C
|
|
|
|
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
|
|
CCACHE_DIR: "/ccache"
|
|
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
|
|
|
|
# VirtualBox driver needs to set build_dir to "/builds" in gitlab-runner.toml
|
|
KYUA_RESULT: "$CI_PROJECT_DIR/kyua.results"
|
|
|
|
GIT_DEPTH: 1
|
|
|
|
# The following values may be overwritten in GitLab's CI/CD Variables Settings.
|
|
BUILD_PARALLEL_JOBS: 6
|
|
TEST_PARALLEL_JOBS: 4
|
|
|
|
CONFIGURE: ./configure
|
|
CLANG: clang-19
|
|
ASAN_SYMBOLIZER_PATH: /usr/lib/llvm-19/bin/llvm-symbolizer
|
|
|
|
CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra
|
|
|
|
# Pass run-time flags to AddressSanitizer to get core dumps on error.
|
|
ASAN_OPTIONS_COMMON: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1
|
|
|
|
TARBALL_COMPRESSOR: gzip
|
|
TARBALL_EXTENSION: gz
|
|
|
|
INSTALL_PATH: "${CI_PROJECT_DIR}/.local"
|
|
|
|
# Allow all running CI jobs to be automatically canceled when a new
|
|
# version of a branch is pushed.
|
|
#
|
|
# See: https://docs.gitlab.com/ee/ci/pipelines/settings.html#auto-cancel-redundant-pipelines
|
|
default:
|
|
interruptible: true
|
|
|
|
# AWS can interrupt the spot instance anytime, so let's retry the job when
|
|
# the interruption event happens to avoid a pipeline failure.
|
|
retry:
|
|
max: 2
|
|
when:
|
|
- runner_system_failure
|
|
|
|
stages:
|
|
- precheck
|
|
- build
|
|
- unit
|
|
- system
|
|
- performance
|
|
- docs
|
|
- push
|
|
- postcheck
|
|
- postmerge
|
|
- release
|
|
|
|
### Runner Tag Templates
|
|
|
|
.linux-amd64: &linux_amd64
|
|
tags:
|
|
- linux
|
|
- aws
|
|
- runner-manager
|
|
- amd64
|
|
|
|
.linux-i386: &linux_i386
|
|
tags:
|
|
- linux
|
|
- i386
|
|
|
|
### Docker Image Templates
|
|
|
|
# Alpine Linux
|
|
|
|
.alpine-3.15-amd64: &alpine_3_15_amd64_image
|
|
image: "$CI_REGISTRY_IMAGE:alpine-3.15-amd64"
|
|
<<: *linux_amd64
|
|
|
|
# Oracle Linux
|
|
|
|
.centos-centos6-i386: ¢os_centos6_i386_image
|
|
image: "$CI_REGISTRY_IMAGE:centos-centos6-i386"
|
|
<<: *linux_i386
|
|
|
|
.centos-centos6-amd64: ¢os_centos6_amd64_image
|
|
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
|
|
<<: *linux_amd64
|
|
|
|
.oraclelinux-8-amd64: &oraclelinux_8_amd64_image
|
|
image: "$CI_REGISTRY_IMAGE:oraclelinux-8-amd64"
|
|
<<: *linux_amd64
|
|
|
|
# Debian
|
|
|
|
.debian-stretch-amd64: &debian_stretch_amd64_image
|
|
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
|
|
<<: *linux_amd64
|
|
|
|
.debian-buster-amd64: &debian_buster_amd64_image
|
|
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
|
|
<<: *linux_amd64
|
|
|
|
.debian-bookworm-amd64: &debian_bookworm_amd64_image
|
|
image: "$CI_REGISTRY_IMAGE:debian-bookworm-amd64"
|
|
<<: *linux_amd64
|
|
|
|
# Ubuntu
|
|
|
|
.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image
|
|
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64"
|
|
<<: *linux_amd64
|
|
|
|
.ubuntu-focal-amd64: &ubuntu_focal_amd64_image
|
|
image: "$CI_REGISTRY_IMAGE:ubuntu-focal-amd64"
|
|
<<: *linux_amd64
|
|
|
|
# Base image
|
|
# This is a meta image that is used as a base for non-specific jobs
|
|
|
|
.base: &base_image
|
|
<<: *debian_bookworm_amd64_image
|
|
|
|
### Job Templates
|
|
|
|
.default-triggering-rules: &default_triggering_rules
|
|
only:
|
|
- api
|
|
- merge_requests
|
|
- pipelines
|
|
- tags
|
|
- triggers
|
|
- web
|
|
- schedules
|
|
|
|
.release-branch-triggering-rules: &release_branch_triggering_rules
|
|
only:
|
|
- api
|
|
- merge_requests
|
|
- pipelines
|
|
- tags
|
|
- triggers
|
|
- web
|
|
- schedules
|
|
- main@isc-projects/bind9
|
|
- /^v9_[1-9][0-9]$/@isc-projects/bind9
|
|
|
|
.schedules-tags-web-triggering-rules: &schedules_tags_web_triggering_rules
|
|
only:
|
|
- api
|
|
- pipelines
|
|
- schedules
|
|
- tags
|
|
- triggers
|
|
- web
|
|
|
|
.precheck: &precheck_job
|
|
<<: *default_triggering_rules
|
|
<<: *base_image
|
|
stage: precheck
|
|
|
|
.autoconf: &autoconf_job
|
|
<<: *release_branch_triggering_rules
|
|
<<: *base_image
|
|
stage: precheck
|
|
script:
|
|
- autoreconf -fi
|
|
artifacts:
|
|
untracked: true
|
|
expire_in: "1 day"
|
|
|
|
.configure: &configure
|
|
- ${CONFIGURE}
|
|
--enable-developer
|
|
--with-randomdev=/dev/urandom
|
|
--with-libtool
|
|
--with-geoip2=auto
|
|
--disable-static
|
|
--enable-option-checking=fatal
|
|
--disable-dnstap
|
|
--with-cmocka
|
|
--with-libxml2
|
|
--with-libjson
|
|
--prefix=/usr/local
|
|
--without-make-clean
|
|
$EXTRA_CONFIGURE
|
|
|| (test -s config.log && cat config.log; exit 1)
|
|
|
|
.build: &build_job
|
|
<<: *default_triggering_rules
|
|
stage: build
|
|
before_script:
|
|
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
|
|
- test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}"
|
|
script:
|
|
- *configure
|
|
- test -n "${SKIP_MAKE_DEPEND}" || make -j${BUILD_PARALLEL_JOBS:-1} depend 2>&1 | tee make-depend.log
|
|
- test -n "${SKIP_MAKE_DEPEND}" || ( ! grep -F "error:" make-depend.log )
|
|
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
|
|
- test -z "${RUN_MAKE_INSTALL}" || make DESTDIR="${INSTALL_PATH}" install
|
|
- test -z "${RUN_MAKE_INSTALL}" || DESTDIR="${INSTALL_PATH}" sh util/check-make-install
|
|
- if [[ "${CFLAGS}" == *"-fsanitize=address"* ]]; then ( ! grep -F AddressSanitizer config.log ); fi
|
|
needs:
|
|
- job: autoreconf
|
|
artifacts: true
|
|
artifacts:
|
|
untracked: true
|
|
expire_in: "1 day"
|
|
when: always
|
|
|
|
.setup_interfaces: &setup_interfaces
|
|
- if [ "$(id -u)" -eq "0" ]; then
|
|
sh -x bin/tests/system/ifconfig.sh up;
|
|
else
|
|
sudo sh -x bin/tests/system/ifconfig.sh up;
|
|
fi
|
|
|
|
.setup_softhsm: &setup_softhsm
|
|
- export SLOT=$(sh -x bin/tests/prepare-softhsm2.sh)
|
|
- test -n "${SLOT}" && test "${SLOT}" -gt 0
|
|
|
|
.system_test_common: &system_test_common
|
|
<<: *default_triggering_rules
|
|
stage: system
|
|
before_script:
|
|
- *setup_interfaces
|
|
- *setup_softhsm
|
|
script:
|
|
- ( cd bin/tests/system && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
|
|
- test -s bin/tests/system/systests.output
|
|
- if git rev-parse > /dev/null 2>&1; then ( ! grep "^I:.*:file.*not removed$" bin/tests/system/systests.output ); fi
|
|
|
|
.system_test: &system_test_job
|
|
<<: *system_test_common
|
|
artifacts:
|
|
untracked: true
|
|
expire_in: "1 day"
|
|
when: on_failure
|
|
|
|
.system_test_gcov: &system_test_gcov_job
|
|
<<: *system_test_common
|
|
artifacts:
|
|
untracked: true
|
|
expire_in: "1 day"
|
|
when: always
|
|
|
|
.kyua_report: &kyua_report_html
|
|
- kyua --logfile /dev/null report-html
|
|
--force
|
|
--results-file "$KYUA_RESULT"
|
|
--results-filter ""
|
|
--output kyua_html > /dev/null
|
|
|
|
.unit_test_common: &unit_test_common
|
|
<<: *default_triggering_rules
|
|
stage: unit
|
|
before_script:
|
|
- *setup_softhsm
|
|
script:
|
|
- make unit
|
|
after_script:
|
|
- *kyua_report_html
|
|
|
|
.unit_test: &unit_test_job
|
|
<<: *unit_test_common
|
|
artifacts:
|
|
untracked: true
|
|
expire_in: "1 day"
|
|
when: on_failure
|
|
|
|
.unit_test_gcov: &unit_test_gcov_job
|
|
<<: *unit_test_common
|
|
artifacts:
|
|
untracked: true
|
|
expire_in: "1 day"
|
|
when: always
|
|
|
|
### Job Definitions
|
|
|
|
# Jobs in the precheck stage
|
|
|
|
autoreconf:
|
|
<<: *autoconf_job
|
|
|
|
misc:
|
|
<<: *precheck_job
|
|
script:
|
|
- sh util/check-ans-prereq.sh
|
|
- sh util/checklibs.sh > checklibs.out
|
|
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
|
|
- sh util/xmllint-html.sh
|
|
- sh util/check-win32util-configure
|
|
- sh util/check-categories.sh
|
|
needs: []
|
|
artifacts:
|
|
paths:
|
|
- util/newcopyrights
|
|
- checklibs.out
|
|
expire_in: "1 day"
|
|
when: on_failure
|
|
|
|
changes:
|
|
<<: *precheck_job
|
|
except:
|
|
- pipelines
|
|
script:
|
|
- sh util/tabify-changes < CHANGES > CHANGES.tmp
|
|
- diff -urNap CHANGES CHANGES.tmp
|
|
- perl util/check-changes CHANGES
|
|
- sh util/check-line-length.sh CHANGES
|
|
- rm CHANGES.tmp
|
|
needs: []
|
|
|
|
coccinelle:
|
|
<<: *precheck_job
|
|
needs: []
|
|
script:
|
|
- util/check-cocci
|
|
- if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
|
|
|
|
danger:
|
|
<<: *precheck_job
|
|
needs: []
|
|
script:
|
|
- pip install git+https://gitlab.isc.org/isc-projects/hazard.git
|
|
- hazard
|
|
only:
|
|
refs:
|
|
- merge_requests
|
|
|
|
tarball-create:
|
|
stage: precheck
|
|
<<: *base_image
|
|
<<: *default_triggering_rules
|
|
script:
|
|
- source version
|
|
- export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
|
|
- git archive --prefix="${BIND_DIRECTORY}/" --output="${BIND_DIRECTORY}.tar" HEAD
|
|
- mkdir "${BIND_DIRECTORY}"
|
|
- echo "SRCID=$(git rev-list --max-count=1 HEAD | cut -b1-7)" > "${BIND_DIRECTORY}/srcid"
|
|
- tar --append --file="${BIND_DIRECTORY}.tar" "${BIND_DIRECTORY}/srcid"
|
|
- ${TARBALL_COMPRESSOR} "${BIND_DIRECTORY}.tar"
|
|
artifacts:
|
|
paths:
|
|
- bind-*.tar.${TARBALL_EXTENSION}
|
|
|
|
# Jobs for doc builds on Debian 11 "bookworm" (amd64)
|
|
|
|
docs:
|
|
<<: *release_branch_triggering_rules
|
|
<<: *debian_bookworm_amd64_image
|
|
stage: docs
|
|
script:
|
|
- ./configure || cat config.log
|
|
- make -C doc/misc docbook
|
|
- make -C doc/arm Bv9ARM.html
|
|
- find bin/ lib/ isc-config.sh.1 -not -path "bin/tests/*" -name "*.[0-9]" -exec mandoc -T lint -Werror "{}" \;
|
|
needs:
|
|
- job: autoreconf
|
|
artifacts: true
|
|
artifacts:
|
|
paths:
|
|
- doc/arm/
|
|
expire_in: "1 month"
|
|
|
|
push:docs:
|
|
<<: *base_image
|
|
stage: push
|
|
needs:
|
|
- job: docs
|
|
artifacts: false
|
|
script:
|
|
- curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=main $GITLAB_PAGES_DOCS_TRIGGER_URL
|
|
only:
|
|
- main@isc-projects/bind9
|
|
- /^v9_[1-9][0-9]$/@isc-projects/bind9
|
|
|
|
# Jobs for regular GCC builds on Alpine Linux 3.15 (amd64)
|
|
|
|
gcc:alpine3.15:amd64:
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON} -DOPENSSL_SUPPRESS_DEPRECATED"
|
|
<<: *alpine_3_15_amd64_image
|
|
<<: *build_job
|
|
|
|
system:gcc:alpine3.15:amd64:
|
|
<<: *alpine_3_15_amd64_image
|
|
<<: *system_test_job
|
|
needs:
|
|
- job: gcc:alpine3.15:amd64
|
|
artifacts: true
|
|
|
|
unit:gcc:alpine3.15:amd64:
|
|
<<: *alpine_3_15_amd64_image
|
|
<<: *unit_test_job
|
|
needs:
|
|
- job: gcc:alpine3.15:amd64
|
|
artifacts: true
|
|
|
|
# Jobs for regular GCC builds on CentOS 6 (i386)
|
|
|
|
gcc:centos6:i386:
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON}"
|
|
EXTRA_CONFIGURE: "--with-libidn2 --without-python --disable-warn-error"
|
|
<<: *centos_centos6_i386_image
|
|
<<: *build_job
|
|
|
|
system:gcc:centos6:i386:
|
|
<<: *centos_centos6_i386_image
|
|
<<: *system_test_job
|
|
needs:
|
|
- job: gcc:centos6:i386
|
|
artifacts: true
|
|
|
|
unit:gcc:centos6:i386:
|
|
<<: *centos_centos6_i386_image
|
|
<<: *unit_test_job
|
|
needs:
|
|
- job: gcc:centos6:i386
|
|
artifacts: true
|
|
|
|
# Jobs for regular GCC builds on CentOS 6 (amd64)
|
|
|
|
gcc:centos6:amd64:
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON}"
|
|
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
|
|
<<: *centos_centos6_amd64_image
|
|
<<: *build_job
|
|
|
|
system:gcc:centos6:amd64:
|
|
<<: *centos_centos6_amd64_image
|
|
<<: *system_test_job
|
|
needs:
|
|
- job: gcc:centos6:amd64
|
|
artifacts: true
|
|
|
|
unit:gcc:centos6:amd64:
|
|
<<: *centos_centos6_amd64_image
|
|
<<: *unit_test_job
|
|
needs:
|
|
- job: gcc:centos6:amd64
|
|
artifacts: true
|
|
|
|
# Jobs for regular GCC builds on Oracle Linux 8 (amd64)
|
|
|
|
gcc:oraclelinux8:amd64:
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON}"
|
|
EXTRA_CONFIGURE: "--enable-buffer-useinline --with-libidn2"
|
|
<<: *oraclelinux_8_amd64_image
|
|
<<: *build_job
|
|
|
|
system:gcc:oraclelinux8:amd64:
|
|
<<: *oraclelinux_8_amd64_image
|
|
<<: *system_test_job
|
|
needs:
|
|
- job: gcc:oraclelinux8:amd64
|
|
artifacts: true
|
|
|
|
unit:gcc:oraclelinux8:amd64:
|
|
<<: *oraclelinux_8_amd64_image
|
|
<<: *unit_test_job
|
|
needs:
|
|
- job: gcc:oraclelinux8:amd64
|
|
artifacts: true
|
|
|
|
# Jobs for regular GCC builds on Debian 9 Stretch (amd64)
|
|
|
|
gcc:stretch:amd64:
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON} -O2"
|
|
EXTRA_CONFIGURE: "--without-gssapi --enable-dnstap"
|
|
<<: *debian_stretch_amd64_image
|
|
<<: *build_job
|
|
<<: *schedules_tags_web_triggering_rules
|
|
|
|
system:gcc:stretch:amd64:
|
|
<<: *debian_stretch_amd64_image
|
|
<<: *system_test_job
|
|
<<: *schedules_tags_web_triggering_rules
|
|
needs:
|
|
- job: gcc:stretch:amd64
|
|
artifacts: true
|
|
allow_failure: true
|
|
|
|
unit:gcc:stretch:amd64:
|
|
<<: *debian_stretch_amd64_image
|
|
<<: *unit_test_job
|
|
<<: *schedules_tags_web_triggering_rules
|
|
needs:
|
|
- job: gcc:stretch:amd64
|
|
artifacts: true
|
|
|
|
# Jobs for regular GCC builds on Debian 10 Buster (amd64)
|
|
|
|
gcc:buster:amd64:
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON}"
|
|
EXTRA_CONFIGURE: "--with-libidn2"
|
|
<<: *debian_buster_amd64_image
|
|
<<: *build_job
|
|
<<: *schedules_tags_web_triggering_rules
|
|
|
|
system:gcc:buster:amd64:
|
|
<<: *debian_buster_amd64_image
|
|
<<: *system_test_job
|
|
<<: *schedules_tags_web_triggering_rules
|
|
needs:
|
|
- job: gcc:buster:amd64
|
|
artifacts: true
|
|
|
|
unit:gcc:buster:amd64:
|
|
<<: *debian_buster_amd64_image
|
|
<<: *unit_test_job
|
|
<<: *schedules_tags_web_triggering_rules
|
|
needs:
|
|
- job: gcc:buster:amd64
|
|
artifacts: true
|
|
|
|
# Jobs for tarball GCC builds on Debian 11 "bookworm" (amd64)
|
|
|
|
gcc:tarball:
|
|
variables:
|
|
CC: gcc
|
|
EXTRA_CONFIGURE: "--with-libidn2"
|
|
RUN_MAKE_INSTALL: 1
|
|
CFLAGS: "${CFLAGS_COMMON} -DOPENSSL_SUPPRESS_DEPRECATED"
|
|
<<: *base_image
|
|
<<: *build_job
|
|
before_script:
|
|
- tar --extract --file bind-*.tar.${TARBALL_EXTENSION}
|
|
- rm -f bind-*.tar.${TARBALL_EXTENSION}
|
|
- cd bind-*
|
|
needs:
|
|
- job: tarball-create
|
|
artifacts: true
|
|
|
|
system:gcc:tarball:
|
|
<<: *base_image
|
|
<<: *system_test_job
|
|
<<: *schedules_tags_web_triggering_rules
|
|
before_script:
|
|
- cd bind-*
|
|
- *setup_interfaces
|
|
needs:
|
|
- job: gcc:tarball
|
|
artifacts: true
|
|
|
|
unit:gcc:tarball:
|
|
<<: *base_image
|
|
<<: *unit_test_job
|
|
<<: *schedules_tags_web_triggering_rules
|
|
before_script:
|
|
- cd bind-*
|
|
needs:
|
|
- job: gcc:tarball
|
|
artifacts: true
|
|
|
|
# Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64)
|
|
|
|
gcc:bionic:amd64:
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON} -O2"
|
|
EXTRA_CONFIGURE: "--without-geoip2 --with-geoip --with-gssapi"
|
|
<<: *ubuntu_bionic_amd64_image
|
|
<<: *build_job
|
|
|
|
system:gcc:bionic:amd64:
|
|
<<: *ubuntu_bionic_amd64_image
|
|
<<: *system_test_job
|
|
needs:
|
|
- job: gcc:bionic:amd64
|
|
artifacts: true
|
|
|
|
unit:gcc:bionic:amd64:
|
|
<<: *ubuntu_bionic_amd64_image
|
|
<<: *unit_test_job
|
|
needs:
|
|
- job: gcc:bionic:amd64
|
|
artifacts: true
|
|
|
|
# Jobs for regular GCC builds on Ubuntu 20.04 Focal Fossa (amd64)
|
|
|
|
gcc:focal:amd64:
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON} -Og"
|
|
EXTRA_CONFIGURE: "--with-libidn2 --with-gssapi=/usr"
|
|
<<: *ubuntu_focal_amd64_image
|
|
<<: *build_job
|
|
|
|
system:gcc:focal:amd64:
|
|
<<: *ubuntu_focal_amd64_image
|
|
<<: *system_test_job
|
|
needs:
|
|
- job: gcc:focal:amd64
|
|
artifacts: true
|
|
|
|
# Jobs for builds with ASAN enabled
|
|
|
|
# "--disable-warn-error" ./configure option disables compiler warnings. This
|
|
# ensures that the job will not fail because of warnings (e.g., null
|
|
# destination pointer in lib/lwres/print.c) we don't want to fix on BIND 9.11
|
|
# because the version is in security-fixes-only mode.
|
|
gcc:asan:
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
|
|
LDFLAGS: "-fsanitize=address,undefined"
|
|
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
|
|
<<: *base_image
|
|
<<: *build_job
|
|
|
|
system:gcc:asan:
|
|
variables:
|
|
ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
|
|
<<: *base_image
|
|
<<: *system_test_job
|
|
needs:
|
|
- job: gcc:asan
|
|
artifacts: true
|
|
|
|
unit:gcc:asan:
|
|
variables:
|
|
ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
|
|
<<: *base_image
|
|
<<: *unit_test_job
|
|
needs:
|
|
- job: gcc:asan
|
|
artifacts: true
|
|
|
|
clang:asan:
|
|
variables:
|
|
CC: ${CLANG}
|
|
CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
|
|
LDFLAGS: "-fsanitize=address,undefined"
|
|
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
|
|
<<: *base_image
|
|
<<: *build_job
|
|
|
|
system:clang:asan:
|
|
variables:
|
|
ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
|
|
<<: *base_image
|
|
<<: *system_test_job
|
|
needs:
|
|
- job: clang:asan
|
|
artifacts: true
|
|
|
|
unit:clang:asan:
|
|
variables:
|
|
ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON}
|
|
<<: *base_image
|
|
<<: *unit_test_job
|
|
needs:
|
|
- job: clang:asan
|
|
artifacts: true
|
|
|
|
# Job producing a release tarball
|
|
|
|
release:
|
|
<<: *base_image
|
|
stage: release
|
|
script:
|
|
# Determine BIND version
|
|
- source version
|
|
- export BIND_DIRECTORY="bind-${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}"
|
|
# Prepare release tarball contents (tarballs + zips + documentation)
|
|
- mkdir -p release/doc/arm
|
|
- pushd release
|
|
- mv "../${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}" ../BIND*.zip .
|
|
- tar --extract --file="${BIND_DIRECTORY}.tar.${TARBALL_EXTENSION}"
|
|
- mv "${BIND_DIRECTORY}"/{CHANGES*,COPYRIGHT,LICENSE,README,srcid} .
|
|
- mv "${BIND_DIRECTORY}"/doc/arm/{Bv9ARM{*.html,.pdf},man.*,notes.{html,pdf,txt}} doc/arm/
|
|
- rm -rf "${BIND_DIRECTORY}"
|
|
- cp doc/arm/notes.html "RELEASE-NOTES-${BIND_DIRECTORY}.html"
|
|
- cp doc/arm/notes.pdf "RELEASE-NOTES-${BIND_DIRECTORY}.pdf"
|
|
- cp doc/arm/notes.txt "RELEASE-NOTES-${BIND_DIRECTORY}.txt"
|
|
- popd
|
|
# Create release tarball
|
|
- tar --create --file="${CI_COMMIT_TAG}.tar.gz" --gzip release/
|
|
needs:
|
|
- job: tarball-create
|
|
artifacts: true
|
|
only:
|
|
- tags
|
|
artifacts:
|
|
paths:
|
|
- "*.tar.gz"
|
|
expire_in: "1 day"
|
|
|
|
# Coverity Scan analysis upload
|
|
|
|
.coverity_cache_prep: &coverity_cache_prep
|
|
- test -f cov-analysis-linux64.md5 && test -f cov-analysis-linux64.tgz || (
|
|
curl --output cov-analysis-linux64.md5 https://scan.coverity.com/download/linux64
|
|
--form project=$COVERITY_SCAN_PROJECT_NAME
|
|
--form token=$COVERITY_SCAN_TOKEN
|
|
--form md5=1;
|
|
curl --output cov-analysis-linux64.tgz https://scan.coverity.com/download/linux64
|
|
--form project=$COVERITY_SCAN_PROJECT_NAME
|
|
--form token=$COVERITY_SCAN_TOKEN;
|
|
)
|
|
- test "$(md5sum cov-analysis-linux64.tgz | awk '{ print $1 }')" = "$(cat cov-analysis-linux64.md5)"
|
|
- tar --extract --gzip --file=cov-analysis-linux64.tgz
|
|
- test -d cov-analysis-linux64-2021.12.1
|
|
|
|
.coverity_build: &coverity_build
|
|
- cov-analysis-linux64-2021.12.1/bin/cov-build --dir cov-int sh -c 'make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1'
|
|
- tar --create --gzip --file=cov-int.tar.gz cov-int/
|
|
- curl -v https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
|
|
--form token=$COVERITY_SCAN_TOKEN
|
|
--form email=bind-changes@isc.org
|
|
--form file=@cov-int.tar.gz
|
|
--form version="$(git rev-parse --short HEAD)"
|
|
--form description="$(git rev-parse --short HEAD) / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID" 2>&1
|
|
| tee curl-response.txt
|
|
- grep -q 'Build successfully submitted' curl-response.txt
|
|
|
|
coverity:
|
|
<<: *base_image
|
|
stage: postcheck
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON} -Og"
|
|
EXTRA_CONFIGURE: "--with-libidn2"
|
|
script:
|
|
- *coverity_cache_prep
|
|
- *configure
|
|
- *coverity_build
|
|
needs:
|
|
- job: autoreconf
|
|
artifacts: true
|
|
artifacts:
|
|
paths:
|
|
- curl-response.txt
|
|
- cov-int.tar.gz
|
|
expire_in: "1 week"
|
|
when: on_failure
|
|
only:
|
|
variables:
|
|
- $COVERITY_SCAN_PROJECT_NAME
|
|
- $COVERITY_SCAN_TOKEN
|
|
cache:
|
|
key: cov-analysis-linux64-2021.12.1
|
|
paths:
|
|
- cov-analysis-linux64.md5
|
|
- cov-analysis-linux64.tgz
|
|
|
|
# Respdiff tests
|
|
|
|
respdiff:
|
|
<<: *debian_bookworm_amd64_image
|
|
<<: *schedules_tags_web_triggering_rules
|
|
stage: system
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON} -Og -DOPENSSL_SUPPRESS_DEPRECATED"
|
|
MAX_DISAGREEMENTS_PERCENTAGE: "0.1"
|
|
script:
|
|
- *configure
|
|
- make -j${BUILD_PARALLEL_JOBS:-1} V=1
|
|
- *setup_interfaces
|
|
- git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git
|
|
- cd bind9-qa/respdiff
|
|
- bash respdiff.sh -s named -q "${PWD}/100k_mixed.txt" -c 3 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}" "/usr/local/respdiff-reference-bind/sbin/named"
|
|
needs: []
|
|
artifacts:
|
|
paths:
|
|
- refserver
|
|
- bind9-qa/respdiff
|
|
exclude:
|
|
- bind9-qa/respdiff/rspworkdir/data.mdb # Exclude a 10 GB file.
|
|
untracked: true
|
|
expire_in: "1 day"
|
|
when: always
|
|
|
|
respdiff-third-party:
|
|
<<: *debian_bookworm_amd64_image
|
|
<<: *schedules_tags_web_triggering_rules
|
|
stage: system
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON} -Og -DOPENSSL_SUPPRESS_DEPRECATED"
|
|
MAX_DISAGREEMENTS_PERCENTAGE: "0.2"
|
|
script:
|
|
- *configure
|
|
- make -j${BUILD_PARALLEL_JOBS:-1} V=1
|
|
- *setup_interfaces
|
|
- git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git
|
|
- cd bind9-qa/respdiff
|
|
- bash respdiff.sh -s third_party -q "${PWD}/100k_mixed.txt" -c 1 -w "${PWD}/rspworkdir" "${CI_PROJECT_DIR}"
|
|
needs: []
|
|
artifacts:
|
|
paths:
|
|
- bind9-qa/respdiff
|
|
exclude:
|
|
- bind9-qa/respdiff/rspworkdir/data.mdb # Exclude a 10 GB file.
|
|
untracked: true
|
|
expire_in: "1 day"
|
|
when: always
|
|
|
|
# ABI check
|
|
|
|
abi-check:
|
|
<<: *base_image
|
|
stage: build
|
|
needs:
|
|
- job: autoreconf
|
|
artifacts: true
|
|
variables:
|
|
CC: gcc
|
|
CFLAGS: "${CFLAGS_COMMON} -Og"
|
|
EXTRA_CONFIGURE: "--with-libidn2"
|
|
BIND_BASELINE_VERSION: v9_11_36
|
|
script:
|
|
- *configure
|
|
- make -j${BUILD_PARALLEL_JOBS:-1} V=1
|
|
- git clone --branch "${BIND_BASELINE_VERSION}" --depth 1 https://gitlab.isc.org/isc-projects/bind9.git refbind
|
|
- cd refbind/
|
|
- *configure
|
|
- make -j${BUILD_PARALLEL_JOBS:-1} V=1
|
|
- cd ..
|
|
- util/api-checker.sh . refbind
|
|
artifacts:
|
|
paths:
|
|
- "*-lib*.html"
|
|
- "*-lib*.txt"
|
|
- "abi-*.dump"
|
|
expire_in: "1 week"
|
|
only:
|
|
- main@isc-projects/bind9
|
|
- /^v9_[1-9][0-9]$/@isc-projects/bind9
|
|
|
|
.post_merge_template: &post_merge
|
|
<<: *base_image
|
|
stage: postmerge
|
|
needs: []
|
|
# post-merge processes should run even if another MR was merged while the job was running (or queued)
|
|
interruptible: false
|
|
variables:
|
|
# automated commits will inherit identification from the user who pressed Merge button
|
|
GIT_COMMITTER_NAME: $GITLAB_USER_NAME
|
|
GIT_COMMITTER_EMAIL: $GITLAB_USER_EMAIL
|
|
# avoid leftover branches from previous jobs
|
|
GIT_STRATEGY: clone
|
|
# assumed max depth of a MR for backport or a rebased force-push
|
|
GIT_DEPTH: 1000
|
|
before_script:
|
|
# force-pushes should not trigger process automation (happens only in -sub branches)
|
|
- >
|
|
echo "previous branch tip: $CI_COMMIT_BEFORE_SHA"
|
|
- set +o pipefail; git log --format='%H' | grep --silent "$CI_COMMIT_BEFORE_SHA" && PREVIOUS_TIP_REACHABLE=1
|
|
- test "$PREVIOUS_TIP_REACHABLE" != "1" && echo "force-push detected, stop" && exit 1
|
|
# non-fast-forward merges are disabled so we have to have merge commit on top
|
|
- MERGE_REQUEST_ID="$(git log -1 --format='%b' | sed --silent -e "s|^See merge request ${CI_PROJECT_PATH}\!||p")"
|
|
- >
|
|
: stop if this is not a merge request in the current project\'s namespace
|
|
- test -n "$MERGE_REQUEST_ID"
|
|
- git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git
|
|
|
|
merged-metadata:
|
|
<<: *post_merge
|
|
rules:
|
|
- if: '$CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_REF_NAME =~ /^bind-9.[0-9]+(-sub)?$/ || $CI_COMMIT_REF_NAME =~ /^bind-9.[0-9]+.[0-9]+-release$/ || $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH)'
|
|
script:
|
|
- bind9-qa/releng/after_merge.py "$CI_PROJECT_ID" "$MERGE_REQUEST_ID"
|