Newer
Older
variables:
DEBIAN_FRONTEND: noninteractive
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: recursive
- build
- test
- documentation
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker build --no-cache -t "$IMAGE_TAG" "scripts/docker/$IMAGE_NAME"
docker:knot-dns:debian:
<<: *image
variables:
IMAGE_NAME: debian:latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME
docker:knot-dns:debian:unstable:
<<: *image
variables:
IMAGE_NAME: debian:unstable
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME
docker:knot-dns:ubuntu:
<<: *image
variables:
IMAGE_NAME: ubuntu:latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME
<<: *image
variables:
IMAGE_NAME: fedora:latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME
.fedora_latest: &fedora_latest
image: "$CI_REGISTRY/knot/knot-dns/fedora:latest"
tags:
- docker
- linux
- amd64
.centos_latest: ¢os_latest
image: "$CI_REGISTRY/knot/knot-dns/centos:latest"
tags:
- docker
- linux
- amd64
.debian_stable: &debian_stable
image: "$CI_REGISTRY/knot/knot-dns/debian:latest"
image: "$CI_REGISTRY/knot/knot-dns/debian:unstable"
.ubuntu_latest: &ubuntu_latest
image: "$CI_REGISTRY/knot/knot-dns/ubuntu:latest"
tags:
- docker
- linux
- amd64
.build: &build_job
stage: build
script:
- autoreconf -fi
- ./configure --disable-fastparser $EXTRA_CONFIGURE || ( cat config.log && exit 1 )
artifacts:
untracked: true
.test: &test_job
stage: test
before_script:
- find -exec touch -t $(date +%m%d%H%M) {} \;
.pkg_symbols: &pkg_symbols
stage: test
script:
- ln -s distro/pkg/deb debian
- sed -i "s/{{ version }}/99/g" distro/pkg/deb/changelog
- sed -i "s/{{ release }}/1/g" distro/pkg/deb/changelog
- dpkg-gensymbols -c4 -esrc/.libs/$LIB_NAME.so.$LIB_ABI -P. -p$LIB_NAME$LIB_ABI
allow_failure: true
except:
only:
- schedules
dependencies:
- build:debian:amd64
build:fedora:amd64:
<<: *fedora_latest
<<: *build_job
test:fedora:amd64:
<<: *fedora_latest
<<: *test_job
dependencies:
- build:fedora:amd64
build:centos:amd64:
<<: *centos_latest
<<: *build_job
test:centos:amd64:
<<: *centos_latest
<<: *test_job
dependencies:
- build:centos:amd64
build:ubuntu:amd64:
<<: *ubuntu_latest
<<: *build_job
test:ubuntu:amd64:
<<: *ubuntu_latest
<<: *test_job
dependencies:
- build:ubuntu:amd64
build:debian:amd64:
variables:
EXTRA_CONFIGURE: --enable-xdp=yes
<<: *debian_stable
except: # run on schedules as well, for debian:symbols tests
test:debian:amd64:
<<: *debian_stable
- build:debian:amd64
pkg:debian:symbols:libknot:
variables:
LIB_NAME: libknot
<<: *debian_stable
<<: *pkg_symbols
pkg:debian:symbols:libdnssec:
variables:
LIB_NAME: libdnssec
<<: *debian_stable
<<: *pkg_symbols
pkg:debian:symbols:libzscanner:
variables:
LIB_NAME: libzscanner
<<: *debian_stable
<<: *pkg_symbols
build:debian:unstable:amd64:
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64
Ondřej Surý
committed
build:debian:unstable:amd64:asan:
variables:
Ondřej Surý
committed
CFLAGS: "-fsanitize=address -g -O2 -fno-omit-frame-pointer"
LSAN_OPTIONS: verbosity=1:log_threads=1
Ondřej Surý
committed
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:asan:
variables:
Ondřej Surý
committed
CFLAGS: "-fsanitize=address -g -O2"
LSAN_OPTIONS: verbosity=1:log_threads=1
Ondřej Surý
committed
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64:asan
build:debian:unstable:amd64:ubsan:
variables:
CFLAGS: "-fsanitize=undefined -fno-sanitize=nonnull-attribute -g -O2"
Ondřej Surý
committed
UBSAN_OPTIONS: print_stacktrace=1
Ondřej Surý
committed
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:ubsan:
variables:
CFLAGS: "-fsanitize=undefined -fno-sanitize=nonnull-attribute -g -O2"
Ondřej Surý
committed
LDFLAGS: "-fsanitize=undefined"
UBSAN_OPTIONS: print_stacktrace=1
Ondřej Surý
committed
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64:ubsan
build:archive:
<<: *debian_stable
script:
- autoreconf -fi
- mkdir _build
- cd _build
- ../configure
artifacts:
paths:
- _build/*.tar.xz
environment:
name: OBS/$OBS_REPO
url: https://build.opensuse.org/package/show/home:CZ-NIC:$OBS_REPO/knot
tags:
- respdiff
script:
- mv _build/*.tar.xz ./
- scripts/make-distrofiles.sh
build:documentation:
<<: *debian_stable
stage: documentation
only:
- tags
- triggers
dependencies:
- build:debian:amd64
- make -C doc html singlehtml pdf epub V=1
- doc/_build/html/
- doc/_build/singlehtml/
- doc/_build/epub/KnotDNS.epub
expire_in: '1 hour'
.deploytest: &deploytest
stage: deploy-test
only:
variables:
- $OBS_REPO =~ /^knot-dns-devel|knot-dns-latest|knot-dns-testing$/
dependencies: []
when: delayed
start_in: 3 minutes # give OBS build some time
tags:
- respdiff
obs:build:all:
<<: *deploytest
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
script:
- "osc results home:CZ-NIC:$OBS_REPO knot -w"
- version=$(sed 's/^v//' <(git describe --exact-match HEAD || git rev-parse --short HEAD) )
- > # check version only for one (reliable) repo to avoid false negatives
! osc ls -b home:CZ-NIC:$OBS_REPO knot Debian_9.0 x86_64 | \
grep -E '(rpm|deb|tar\.xz)$' | grep -v $version || \
(echo "ERROR: version mismatch"; exit 1)
- >
! osc results home:CZ-NIC:$OBS_REPO knot --csv | \
grep -Ev 'disabled|excluded|Rawhide' | grep -v 'succeeded' -q || \
(echo "ERROR: build(s) failed"; exit 1)
.distrotest: &distrotest
<<: *deploytest
script:
- "osc results home:CZ-NIC:$OBS_REPO knot -a x86_64 -r $DISTROTEST_REPO -w"
- >
osc results home:CZ-NIC:$OBS_REPO knot -a x86_64 -r $DISTROTEST_REPO --csv | grep 'succeeded|$' -q || \
(echo "ERROR: build failed"; exit 1)
- export LABEL="gl$(date +%s)_$OBS_REPO"
- export COMMITDIR="/var/tmp/respdiff-jobs/$(git rev-parse --short HEAD)-$LABEL"
- export TESTDIR="$COMMITDIR/distrotest.$DISTROTEST_NAME"
- ln -s $COMMITDIR distrotest_commitdir
- sudo -u respdiff /var/opt/respdiff/contrib/job_manager/submit.py -w
-p $DISTROTEST_PRIORITY
$(sudo -u respdiff /var/opt/respdiff/contrib/job_manager/create.py
"$(git rev-parse --short HEAD)" -l $LABEL -t distrotest.$DISTROTEST_NAME
--package knot-dns --obs-repo $OBS_REPO)
- export EXITCODE=$(cat $TESTDIR/j*_exitcode)
- if [[ "$EXITCODE" != "0" ]]; then cat $TESTDIR/j*_{vagrant.log.txt,stdout.txt}; fi
- exit $EXITCODE
after_script:
- 'cp -t . distrotest_commitdir/distrotest.$DISTROTEST_NAME/j* ||:'
artifacts:
when: always
expire_in: 1 week
paths:
- ./j*
retry:
max: 1
when:
- script_failure
obs:centos7:x86_64:
<<: *distrotest
variables:
DISTROTEST_NAME: centos7
DISTROTEST_REPO: CentOS_7_EPEL
obs:centos8:x86_64:
<<: *distrotest
variables:
DISTROTEST_NAME: centos8
DISTROTEST_REPO: CentOS_8_EPEL
obs:debian9:x86_64:
<<: *distrotest
variables:
DISTROTEST_NAME: debian9
DISTROTEST_REPO: Debian_9.0
obs:debian10:x86_64:
<<: *distrotest
variables:
DISTROTEST_NAME: debian10
DISTROTEST_REPO: Debian_10
obs:debian11:x86_64:
<<: *distrotest
variables:
DISTROTEST_NAME: debian11
DISTROTEST_REPO: Debian_11
DISTROTEST_NAME: fedora34
DISTROTEST_REPO: Fedora_34
DISTROTEST_NAME: fedora35
DISTROTEST_REPO: Fedora_35
obs:leap15:x86_64:
<<: *distrotest
variables:
DISTROTEST_NAME: leap15
obs:ubuntu1804:x86_64:
<<: *distrotest
variables:
DISTROTEST_NAME: ubuntu1804
DISTROTEST_REPO: xUbuntu_18.04
DISTROTEST_NAME: ubuntu2004
DISTROTEST_REPO: xUbuntu_20.04
DISTROTEST_NAME: ubuntu2110
DISTROTEST_REPO: xUbuntu_21.10