Commit 8c308643 authored by Michał Kępień's avatar Michał Kępień

Merge branch 'michal/gitlab-ci-cleanup' into 'master'

GitLab CI cleanup

See merge request !1329
parents 4a827494 a27b9dff
Pipeline #8862 passed with stages
in 57 seconds
variables: variables:
# Not normally needed, but may be if some script uses `apt-get install`.
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
# Locale settings do not affect the build, but might affect tests.
LC_ALL: C LC_ALL: C
DOCKER_DRIVER: overlay2
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9 CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
CCACHE_DIR: "/ccache" CCACHE_DIR: "/ccache"
SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf" SOFTHSM2_CONF: "/var/tmp/softhsm2/softhsm2.conf"
...@@ -12,132 +14,104 @@ stages: ...@@ -12,132 +14,104 @@ stages:
- test - test
- push - push
.centos-centos6-amd64: &centos_centos6_amd64_image ### Runner Tag Templates
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
.linux-amd64: &linux_amd64
tags: tags:
- linux - linux
- docker
- amd64 - amd64
.centos-centos7-amd64: &centos_centos7_amd64_image .linux-i386: &linux_i386
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
tags: tags:
- linux - linux
- docker - i386
- amd64
### Docker Image Templates
# CentOS
.centos-centos6-amd64: &centos_centos6_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
<<: *linux_amd64
.centos-centos7-amd64: &centos_centos7_amd64_image
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
<<: *linux_amd64
# Debian
.debian-jessie-amd64: &debian_jessie_amd64_image .debian-jessie-amd64: &debian_jessie_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64" image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
tags: <<: *linux_amd64
- linux
- docker
- amd64
.debian-jessie-i386: &debian_jessie_i386_image .debian-jessie-i386: &debian_jessie_i386_image
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386" image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
tags: <<: *linux_i386
- linux
- docker
- i386
.debian-stretch-amd64: &debian_stretch_amd64_image .debian-stretch-amd64: &debian_stretch_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64" image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
tags: <<: *linux_amd64
- linux
- docker
- amd64
.debian-stretch-i386:: &debian_stretch_i386_image .debian-stretch-i386: &debian_stretch_i386_image
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386" image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
tags: <<: *linux_i386
- linux
- docker
- i386
.debian-buster-amd64: &debian_buster_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
tags:
- linux
- docker
- amd64
.debian-buster-i386:: &debian_buster_i386_image
image: "$CI_REGISTRY_IMAGE:debian-buster-i386"
tags:
- linux
- docker
- i386
.debian-sid-amd64: &debian_sid_amd64_image .debian-sid-amd64: &debian_sid_amd64_image
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64" image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
tags: <<: *linux_amd64
- linux
- docker
- amd64
.debian-sid-i386: &debian_sid_i386_image .debian-sid-i386: &debian_sid_i386_image
image: "$CI_REGISTRY_IMAGE:debian-sid-i386" image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
tags: <<: *linux_i386
- linux
- docker # Ubuntu
- i386
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image .ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64" image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
tags: <<: *linux_amd64
- linux
- docker
- amd64
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image .ubuntu-xenial-i386: &ubuntu_xenial_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386" image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
tags: <<: *linux_i386
- linux
- docker
- i386
.ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image .ubuntu-bionic-amd64: &ubuntu_bionic_amd64_image
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64" image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-amd64"
tags: <<: *linux_amd64
- linux
- docker
- amd64
.ubuntu-bionic-i386: &ubuntu_bionic_i386_image .ubuntu-bionic-i386: &ubuntu_bionic_i386_image
image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386" image: "$CI_REGISTRY_IMAGE:ubuntu-bionic-i386"
tags: <<: *linux_i386
- linux
- docker ### Job Templates
- i386
.default-triggering-rules: &default_triggering_rules
only:
- merge_requests
- tags
- web
.precheck: &precheck_job
<<: *default_triggering_rules
<<: *debian_sid_amd64_image
stage: precheck
.build: &build_job .build: &build_job
<<: *default_triggering_rules
stage: build stage: build
before_script: before_script:
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}" - test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
# - ./autogen.sh
script: script:
- ./configure --enable-developer --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log - ./configure --enable-developer --with-libtool --disable-static --with-cmocka --prefix=$HOME/.local --without-make-clean $EXTRA_CONFIGURE || cat config.log
- make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1 - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
artifacts: artifacts:
paths:
- doc/
expire_in: '1 hour'
untracked: true untracked: true
only: expire_in: "1 hour"
- merge_requests
.install_test: &install_test_job
stage: test
before_script:
- mkdir $HOME/.local
script:
- make install
.system_test: &system_test_job .system_test: &system_test_job
<<: *default_triggering_rules
stage: test stage: test
retry: 2 retry: 2
before_script: before_script:
- rm -rf .ccache
- bash -x bin/tests/system/ifconfig.sh up - bash -x bin/tests/system/ifconfig.sh up
- bash -x util/prepare-softhsm2.sh - bash -x util/prepare-softhsm2.sh
script: script:
...@@ -145,12 +119,11 @@ stages: ...@@ -145,12 +119,11 @@ stages:
- test -s bin/tests/system/systests.output - test -s bin/tests/system/systests.output
artifacts: artifacts:
untracked: true untracked: true
expire_in: '1 week' expire_in: "1 week"
when: on_failure when: on_failure
only:
- merge_requests
.unit_test: &unit_test_job .unit_test: &unit_test_job
<<: *default_triggering_rules
stage: test stage: test
before_script: before_script:
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results" - export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
...@@ -161,17 +134,18 @@ stages: ...@@ -161,17 +134,18 @@ stages:
- kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html - kyua report-html --force --results-file kyua.results --results-filter "" --output kyua_html
artifacts: artifacts:
paths: paths:
- kyua.log - kyua.log
- kyua.results - kyua.results
- kyua_html/ - kyua_html/
expire_in: '1 week' expire_in: "1 week"
when: on_failure when: on_failure
only:
- merge_requests
sid:amd64:precheck: ### Job Definitions
<<: *debian_sid_amd64_image
stage: precheck # Jobs in the precheck stage
misc:sid:amd64:
<<: *precheck_job
script: script:
- sh util/checklibs.sh > checklibs.out - sh util/checklibs.sh > checklibs.out
- sh util/tabify-changes < CHANGES > CHANGES.tmp - sh util/tabify-changes < CHANGES > CHANGES.tmp
...@@ -187,72 +161,48 @@ sid:amd64:precheck: ...@@ -187,72 +161,48 @@ sid:amd64:precheck:
- xmllint --noout --nonet --html `git ls-files '*.html'` - xmllint --noout --nonet --html `git ls-files '*.html'`
artifacts: artifacts:
paths: paths:
- util/newcopyrights - util/newcopyrights
- checklibs.out - checklibs.out
expire_in: '1 week' expire_in: "1 week"
when: on_failure when: on_failure
only:
- merge_requests
🐞:sid:amd64:precheck: 🐞:sid:amd64:
<<: *debian_sid_amd64_image <<: *precheck_job
stage: precheck
script: util/check-cocci script: util/check-cocci
only:
- merge_requests # Jobs for doc builds on Debian Sid (amd64)
docs:sid:amd64: docs:sid:amd64:
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
stage: test stage: build
dependencies:
- sid:amd64:build
script: script:
- ./configure || cat config.log
- make -C doc/misc docbook - make -C doc/misc docbook
- make -C doc/arm Bv9ARM.html - make -C doc/arm Bv9ARM.html
artifacts: artifacts:
paths: paths:
- doc/arm/ - doc/arm/
expire_in: '1 month' expire_in: "1 month"
only: only:
- merge_requests - merge_requests
- master@isc-projects/bind9 - tags
- /^v9_.*$/@isc-projects/bind9 - web
- master@isc-projects/bind9
- /^v9_[1-9][0-9]$/@isc-projects/bind9
docs:push: push:docs:sid:amd64:
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
stage: push stage: push
dependencies: [] dependencies: []
script: script:
- curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL - curl -X POST -F token=$GITLAB_PAGES_DOCS_TRIGGER_TOKEN -F ref=master $GITLAB_PAGES_DOCS_TRIGGER_URL
only: only:
- master@isc-projects/bind9 - master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9 - /^v9_[1-9][0-9]$/@isc-projects/bind9
#jessie:amd64:build: # Jobs for regular GCC builds on CentOS 6 (amd64)
# <<: *debian_jessie_amd64_image
# <<: *build_job gcc:centos6:amd64:
#
#build:jessie:i386:
# <<: *debian_jessie_i386_image
# <<: *build_job
#
#build:stretch:amd64:
# <<: *debian_stretch_amd64_image
# <<: *build_job
#
#build:debian:buster:i386:
# <<: *debian_buster_i386_image
# <<: *build_job
#
#build:ubuntu:bionic:amd64:
# <<: *ubuntu_bionic_amd64_image
# <<: *build_job
#
#build:ubuntu:xenial:i386:
# <<: *ubuntu_xenial_i386_image
# <<: *build_job
centos6:amd64:build:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g" CFLAGS: "-Wall -Wextra -O2 -g"
...@@ -260,7 +210,21 @@ centos6:amd64:build: ...@@ -260,7 +210,21 @@ centos6:amd64:build:
<<: *centos_centos6_amd64_image <<: *centos_centos6_amd64_image
<<: *build_job <<: *build_job
centos7:amd64:build: system:gcc:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *system_test_job
dependencies:
- gcc:centos6:amd64
unit:gcc:centos6:amd64:
<<: *centos_centos6_amd64_image
<<: *unit_test_job
dependencies:
- gcc:centos6:amd64
# Jobs for regular GCC builds on CentOS 7 (amd64)
gcc:centos7:amd64:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g" CFLAGS: "-Wall -Wextra -O2 -g"
...@@ -268,15 +232,21 @@ centos7:amd64:build: ...@@ -268,15 +232,21 @@ centos7:amd64:build:
<<: *centos_centos7_amd64_image <<: *centos_centos7_amd64_image
<<: *build_job <<: *build_job
clang:stretch:amd64:build: system:gcc:centos7:amd64:
variables: <<: *centos_centos7_amd64_image
CC: clang <<: *system_test_job
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g" dependencies:
EXTRA_CONFIGURE: "--with-python=python3" - gcc:centos7:amd64
<<: *debian_stretch_amd64_image
<<: *build_job unit:gcc:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *unit_test_job
dependencies:
- gcc:centos7:amd64
jessie:amd64:build: # Jobs for regular GCC builds on Debian 8 Jessie (amd64)
gcc:jessie:amd64:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g" CFLAGS: "-Wall -Wextra -O2 -g"
...@@ -284,43 +254,73 @@ jessie:amd64:build: ...@@ -284,43 +254,73 @@ jessie:amd64:build:
<<: *debian_jessie_amd64_image <<: *debian_jessie_amd64_image
<<: *build_job <<: *build_job
stretch:amd64:build: system:gcc:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *system_test_job
dependencies:
- gcc:jessie:amd64
unit:gcc:jessie:amd64:
<<: *debian_jessie_amd64_image
<<: *unit_test_job
dependencies:
- gcc:jessie:amd64
# Jobs for regular GCC builds on Debian 9 Stretch (amd64)
gcc:stretch:amd64:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g" CFLAGS: "-Wall -Wextra -O2 -g"
<<: *debian_stretch_amd64_image <<: *debian_stretch_amd64_image
<<: *build_job <<: *build_job
sid:amd64:build: system:gcc:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *system_test_job
dependencies:
- gcc:stretch:amd64
unit:gcc:stretch:amd64:
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- gcc:stretch:amd64
# Jobs for regular GCC builds on Debian Sid (amd64)
gcc:sid:amd64:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g" CFLAGS: "-Wall -Wextra -O2 -g"
EXTRA_CONFIGURE: "--with-libidn2" EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
<<: *build_job <<: *build_job
only:
- merge_requests
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
asan:sid:amd64:build: install:gcc:sid:amd64:
variables: <<: *default_triggering_rules
CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g -fsanitize=address,undefined -DISC_MEM_USE_INTERNAL_MALLOC=0"
LDFLAGS: "-fsanitize=address,undefined"
EXTRA_CONFIGURE: "--with-libidn2"
<<: *debian_sid_amd64_image <<: *debian_sid_amd64_image
<<: *build_job stage: test
script:
- make install
dependencies:
- gcc:sid:amd64
clang:stretch:i386:build: system:gcc:sid:amd64:
variables: <<: *debian_sid_amd64_image
CC: clang <<: *system_test_job
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g" dependencies:
EXTRA_CONFIGURE: "--with-python=python2" - gcc:sid:amd64
<<: *debian_stretch_i386_image
<<: *build_job unit:gcc:sid:amd64:
<<: *debian_sid_amd64_image
<<: *unit_test_job
dependencies:
- gcc:sid:amd64
# Jobs for regular GCC builds on Debian Sid (i386)
sid:i386:build: gcc:sid:i386:
variables: variables:
CC: gcc CC: gcc
CFLAGS: "-Wall -Wextra -O2 -g" CFLAGS: "-Wall -Wextra -O2 -g"
...@@ -328,189 +328,150 @@ sid:i386:build: ...@@ -328,189 +328,150 @@ sid:i386:build:
<<: *debian_sid_i386_image <<: *debian_sid_i386_image
<<: *build_job <<: *build_job
unit:centos6:amd64: system:gcc:sid:i386:
<<: *centos_centos6_amd64_image <<: *debian_sid_i386_image
<<: *unit_test_job <<: *system_test_job
dependencies:
- centos6:amd64:build
unit:centos7:amd64:
<<: *centos_centos7_amd64_image
<<: *unit_test_job
dependencies: dependencies:
- centos7:amd64:build - gcc:sid:i386
unit:jessie:amd64: unit:gcc:sid:i386:
<<: *debian_jessie_amd64_image <<: *debian_sid_i386_image
<<: *unit_test_job <<: *unit_test_job
dependencies: dependencies:
- jessie:amd64:build - gcc:sid:i386
unit:stretch:amd64: # Jobs for regular GCC builds on Ubuntu 16.04 Xenial Xerus (amd64)
<<: *debian_stretch_amd64_image
<<: *unit_test_job
dependencies:
- stretch:amd64:build
unit:sid:amd64: gcc:xenial:amd64:
<<: *debian_sid_amd64_image variables:
<<: *unit_test_job CC: gcc
dependencies: CFLAGS: "-Wall -Wextra -O2 -g"
- sid:amd64:build <<: *ubuntu_xenial_amd64_image
only: <<: *build_job
- merge_requests
- master@isc-projects/bind9
- /^v9_.*$/@isc-projects/bind9
unit:asan:sid:amd64: system:gcc:xenial:amd64:
<<: *debian_sid_amd64_image <<: *ubuntu_xenial_amd64_image
<<: *unit_test_job <<: *system_test_job
dependencies: dependencies:
- asan:sid:amd64:build - gcc:xenial:amd64
unit:clang:stretch:amd64: unit:gcc:xenial:amd64:
<<: *debian_stretch_amd64_image <<: *ubuntu_xenial_amd64_image
<<: *unit_test_job <<: *unit_test_job
dependencies: dependencies:
- clang:stretch:amd64:build - gcc:xenial:amd64
unit:sid:i386: # Jobs for regular GCC builds on Ubuntu 18.04 Bionic Beaver (amd64)