- run:
name: Clone the repo
command: |
+ mkdir -p /opt/project
if [ -n "$CIRCLE_PR_NUMBER" ]
then
echo === Checking out PR "$CIRCLE_PR_NUMBER" from "$CIRCLE_REPOSITORY_URL"
- git clone --depth 1 $CIRCLE_REPOSITORY_URL ~/project
- cd ~/project
+ git clone --depth 1 $CIRCLE_REPOSITORY_URL /opt/project
+ cd /opt/project
git fetch --depth 1 origin +refs/pull/${CIRCLE_PR_NUMBER}/merge
git checkout -qf FETCH_HEAD
else
echo === Checking out branch "${CIRCLE_BRANCH}" from "$CIRCLE_REPOSITORY_URL"
- git clone --depth 1 --branch $CIRCLE_BRANCH $CIRCLE_REPOSITORY_URL ~/project
+ git clone --depth 1 --branch $CIRCLE_BRANCH $CIRCLE_REPOSITORY_URL /opt/project
fi
+ cd /opt/project
git show -s
+ get-workspace:
+ description: "Attach workspace to /opt and symlink checkout into home"
+ steps:
+ - run:
+ name: ensure ca-certificates is installed
+ command: apt-get update && apt-get -qq -y install ca-certificates
+ - attach_workspace:
+ at: /opt
+ - run:
+ name: symlink checkout into home
+ command: rmdir ~/project && ln -s /opt/project ~/project
+
install-coverity-tools:
description: Install the coverity tools to /usr/local
steps:
auth-regress-setup:
description: Prepare the environment for auth regression tests
steps:
- - run:
- name: ensure ca-certificates is installed
- command: apt-get update && apt-get -qq -y install ca-certificates
- - attach_workspace:
- at: /opt
+ - get-workspace
- install-auth-deps
- run:
name: Install test dependencies
tar xfz jdnssec-tools-0.14.tar.gz --strip-components=1 -C /
rm jdnssec-tools-0.14.tar.gz
fi
- - checkout-shallow
- run:
name: Allow missing tools in verify-dnssec-zone
command: touch regression-tests/tests/verify-dnssec-zone/allow-missing
- run:
command: |
apt-get install -qq -y \
+ git \
libboost-all-dev \
libsystemd0 \
libyaml-cpp0.5v5 \
fi
jobs:
+ checkout:
+ docker:
+ - image: debian:buster
+
+ steps:
+ - checkout-shallow
+ - persist_to_workspace:
+ root: /opt
+ paths:
+ - project
+
build-auth:
docker:
- image: debian:stretch
steps:
- - checkout-shallow
+ - get-workspace
- install-auth-dev-deps
- restore-cache-ccache:
product: auth
ragel \
systemd \
virtualenv
- - checkout-shallow
+ - get-workspace
- run:
name: autoconf
command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
command: |
touch /etc/authbind/byport/53
chmod 755 /etc/authbind/byport/53
- - checkout-shallow
- - attach_workspace:
- at: /opt
+ - get-workspace
- run:
name: Run regression tests
workdir: ~/project
- add-auth-repo
- run: apt-get --no-install-recommends install -qq -y pdns-tools moreutils time
- install-recursor-deps
- - checkout-shallow
- - attach_workspace:
- at: /opt
+ - get-workspace
- run:
name: Get the majestic million list
workdir: ~/project/regression-tests
- add-auth-repo
- run: apt-get --no-install-recommends install -qq -y virtualenv pdns-tools
- install-recursor-deps
- - checkout-shallow
- - attach_workspace:
- at: /opt
+ - get-workspace
- run:
name: Run API tests
workdir: ~/project/regression-tests.api
docker:
- image: debian:stretch
steps:
- - checkout-shallow
+ - get-workspace
- install-doc-deps
- build-auth-docs
docker:
- image: debian:stretch
steps:
- - checkout-shallow
+ - get-workspace
- install-doc-deps
- build-auth-docs
- add-docs-upload-ssh
docker:
- image: debian:stretch
steps:
- - checkout-shallow
+ - get-workspace
- install-doc-deps
- build-recursor-docs
docker:
- image: debian:stretch
steps:
- - checkout-shallow
+ - get-workspace
- install-doc-deps
- build-recursor-docs
- add-docs-upload-ssh
docker:
- image: debian:stretch
steps:
- - checkout-shallow
+ - get-workspace
- install-doc-deps
- build-dnsdist-docs
docker:
- image: debian:stretch
steps:
- - checkout-shallow
+ - get-workspace
- install-doc-deps
- build-dnsdist-docs
- add-docs-upload-ssh
steps:
- install-auth-dev-deps
- install-coverity-tools
- - checkout-shallow
+ - get-workspace
- run:
name: autoconf
command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
ragel \
virtualenv
- install-coverity-tools
- - checkout-shallow
+ - get-workspace
- run:
name: autoconf
command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
ragel \
virtualenv
- install-coverity-tools
- - checkout-shallow
+ - get-workspace
- run:
name: autoconf
command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
ragel \
systemd \
virtualenv
- - checkout-shallow
+ - get-workspace
- run:
name: autoconf
command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
steps:
- install-dnsdist-deps
- - checkout-shallow
+ - get-workspace
- run:
name: setup snmp
command: |
apt-get -qq --no-install-recommends install snmpd
sed "s/agentxperms 0700 0755 dnsdist/agentxperms 0700 0755/g" regression-tests.dnsdist/snmpd.conf > /etc/snmp/snmpd.conf
/etc/init.d/snmpd start
- - attach_workspace:
- at: /opt
- run:
name: Run dnsdist tests
workdir: ~/project/regression-tests.dnsdist
UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
steps:
- install-ixfrdist-deps
- - checkout-shallow
- - attach_workspace:
- at: /opt
+ - get-workspace
- run:
name: Run ixfrdist tests
workdir: ~/project/regression-tests.ixfrdist
build-and-test-all:
jobs:
- - build-auth
+ - checkout
+ - build-auth:
+ requires:
+ - checkout
- test-auth-api:
requires:
- build-auth
- test-auth-regress-tinydns:
requires:
- build-auth
- - build-recursor
+ - build-recursor:
+ requires:
+ - checkout
- test-recursor-regression:
requires:
- build-recursor
- test-recursor-api:
requires:
- build-recursor
- - build-dnsdist
+ - build-dnsdist:
+ requires:
+ - checkout
- test-dnsdist-regression:
requires:
- build-dnsdist
build-docs:
jobs:
+ - checkout
- build-auth-docs:
filters:
branches:
ignore: master
+ requires:
+ - checkout
- build-recursor-docs:
filters:
branches:
ignore: master
+ requires:
+ - checkout
- build-dnsdist-docs:
filters:
branches:
ignore: master
+ requires:
+ - checkout
# These actually deploy
- deploy-auth-docs:
filters:
branches:
only: master
+ requires:
+ - checkout
- deploy-recursor-docs:
context: docs
filters:
branches:
only: master
+ requires:
+ - checkout
- deploy-dnsdist-docs:
context: docs
filters:
branches:
only: master
+ requires:
+ - checkout