]> git.ipfire.org Git - thirdparty/pdns.git/blob - .circleci/config.yml
b2ff9ba8355035adb35902d84c6ee3b405cbe5d6
[thirdparty/pdns.git] / .circleci / config.yml
1 version: 2.1
2
3 commands:
4 checkout-shallow:
5 description: "Do a shallow checkout of the repository"
6 steps:
7 - run:
8 name: Install git and openssh
9 command: apt-get update && apt-get -qq -y install openssh-client git
10 - run:
11 name: Store the keyid for the git repo
12 command: mkdir -p $HOME/.ssh && ssh-keyscan $(echo ${CIRCLE_REPOSITORY_URL} | sed 's,.*@\([^:]*\):.*,\1,') > $HOME/.ssh/known_hosts
13 - run:
14 name: Clone the repo
15 command: |
16 if [ -n "$CIRCLE_PR_NUMBER" ]
17 then
18 echo === Checking out PR "$CIRCLE_PR_NUMBER" from "$CIRCLE_REPOSITORY_URL"
19 git clone --depth 1 $CIRCLE_REPOSITORY_URL ~/project
20 cd ~/project
21 git fetch --depth 1 origin +refs/pull/${CIRCLE_PR_NUMBER}/merge
22 git checkout -qf FETCH_HEAD
23 else
24 echo === Checking out branch "${CIRCLE_BRANCH}" from "$CIRCLE_REPOSITORY_URL"
25 git clone --depth 1 --branch $CIRCLE_BRANCH $CIRCLE_REPOSITORY_URL ~/project
26 fi
27 git show -s
28
29 install-coverity-tools:
30 description: Install the coverity tools to /usr/local
31 steps:
32 - run:
33 name: Install Coverity tools
34 command: curl -s https://scan.coverity.com/download/linux64 --data "token=${COVERITY_TOKEN}&project=${COVERITY_PROJECT}" | gunzip | tar xvf /dev/stdin --strip-components=2 --no-same-owner -C /usr/local
35
36 add-docs-upload-ssh:
37 description: Add ssh known_hosts fingerprints
38 steps:
39 - run:
40 command: mkdir -p $HOME/.ssh && echo "${DOCS_HOST} ${DOCS_FINGERPRINT}" > $HOME/.ssh/known_hosts
41 - add_ssh_keys:
42 fingerprints:
43 - "3e:0a:aa:2c:30:69:89:f3:eb:17:c1:3f:3b:78:40:7a"
44
45 auth-regress-setup:
46 description: Prepare the environment for auth regression tests
47 steps:
48 - run:
49 name: ensure ca-certificates is installed
50 command: apt-get update && apt-get -qq -y install ca-certificates
51 - attach_workspace:
52 at: /opt
53 - install-auth-deps
54 - run:
55 name: Install test dependencies
56 command: |
57 apt-get -y -qq install \
58 bc \
59 bind9utils \
60 default-jre-headless \
61 dnsutils \
62 ldnsutils \
63 libnet-dns-perl \
64 unbound-host
65 - run:
66 name: Install jdnssectools
67 command: |
68 if [ ! -e /usr/bin/jdnssec-verifyzone ]; then
69 apt-get install -qq -y wget
70 wget https://github.com/dblacka/jdnssec-tools/releases/download/0.14/jdnssec-tools-0.14.tar.gz
71 tar xfz jdnssec-tools-0.14.tar.gz --strip-components=1 -C /
72 rm jdnssec-tools-0.14.tar.gz
73 fi
74 - checkout-shallow
75 - run:
76 name: Allow missing tools in verify-dnssec-zone
77 command: touch regression-tests/tests/verify-dnssec-zone/allow-missing
78
79 auth-regress:
80 description: Run one auth regression context
81 parameters:
82 skip:
83 type: string
84 default: ""
85 rootskip:
86 type: string
87 default: ""
88 doroot:
89 type: boolean
90 default: true
91 context:
92 type: string
93 default: ""
94 prefix:
95 type: string
96 default: "/opt/pdns-auth/"
97 steps:
98 - run:
99 workdir: ~/project/regression-tests
100 name: Run << parameters.context >> tests
101 command: |
102 [ -e ./vars ] && . ./vars
103 rm -rf tests/*/skip
104 for t in << parameters.skip >>
105 do
106 touch tests/$t/skip
107 done
108 PDNS=<< parameters.prefix >>sbin/pdns_server \
109 PDNS2=<< parameters.prefix >>sbin/pdns_server \
110 SDIG=<< parameters.prefix >>bin/sdig \
111 NOTIFY=<< parameters.prefix >>bin/pdns_notify \
112 NSEC3DIG=<< parameters.prefix >>bin/nsec3dig \
113 SAXFR=<< parameters.prefix >>bin/saxfr \
114 ZONE2SQL=<< parameters.prefix >>bin/zone2sql \
115 ZONE2LDAP=<< parameters.prefix >>bin/zone2ldap \
116 PDNSUTIL=<< parameters.prefix >>bin/pdnsutil \
117 PDNSCONTROL=<< parameters.prefix >>bin/pdns_control \
118 ./start-test-stop 5300 << parameters.context >>
119 - when:
120 condition: << parameters.doroot >>
121 steps:
122 - run:
123 workdir: ~/project/regression-tests.rootzone
124 name: Run << parameters.context >> tests for the root zone
125 command: |
126 [ -e ../regression-tests/vars ] && . ../regression-tests/vars
127 rm -rf tests/*/skip
128 for t in << parameters.rootskip >>
129 do
130 touch tests/$t/skip
131 done
132 PDNS=<< parameters.prefix >>sbin/pdns_server \
133 PDNS2=<< parameters.prefix >>sbin/pdns_server \
134 SDIG=<< parameters.prefix >>bin/sdig \
135 NOTIFY=<< parameters.prefix >>bin/pdns_notify \
136 NSEC3DIG=<< parameters.prefix >>bin/nsec3dig \
137 SAXFR=<< parameters.prefix >>bin/saxfr \
138 ZONE2SQL=<< parameters.prefix >>bin/zone2sql \
139 ZONE2LDAP=<< parameters.prefix >>bin/zone2ldap \
140 PDNSUTIL=<< parameters.prefix >>bin/pdnsutil \
141 PDNSCONTROL=<< parameters.prefix >>bin/pdns_control \
142 ./start-test-stop 5300 << parameters.context >>
143
144 install-recursor-deps:
145 description: "Install all libraries needed for the recursor"
146 steps:
147 - run: apt-get update
148 - run:
149 command: |
150 apt-get install -qq -y \
151 libluajit-5.1 \
152 libboost-all-dev \
153 libcap2 \
154 libssl1.1 \
155 libsystemd0 \
156 libsodium18 \
157 libprotobuf10
158
159 install-auth-deps:
160 description: Install all libraries needed to run the auth
161 steps:
162 - run: |
163 apt-get install -qq -y --no-install-recommends \
164 libboost-all-dev \
165 libcdb1 \
166 libkrb5-3 \
167 libldap-2.4-2 \
168 liblmdb0 \
169 libpq5 \
170 libssl1.1 \
171 libsodium18 \
172 libsystemd0 \
173 default-libmysqlclient-dev \
174 unixodbc
175
176 install-auth-dev-deps:
177 description: Install all packages needed to build the auth
178 steps:
179 - run: apt-get update
180 - run:
181 command: |
182 apt-get install -qq -y --no-install-recommends \
183 autoconf \
184 automake \
185 bison \
186 bzip2 \
187 curl \
188 default-libmysqlclient-dev \
189 flex \
190 g++ \
191 git \
192 libboost-all-dev \
193 libcdb-dev \
194 libkrb5-dev \
195 libldap2-dev \
196 liblmdb-dev \
197 libpq-dev \
198 libsodium-dev \
199 libsqlite3-dev \
200 libssl-dev \
201 libtool \
202 make \
203 pkg-config \
204 ragel \
205 sqlite3 \
206 unixodbc-dev \
207 virtualenv \
208 wget
209
210 add-auth-repo:
211 description: "Add the debian repo for the auth"
212 parameters:
213 version:
214 type: string
215 default: "42"
216 distro:
217 type: string
218 default: "debian"
219 release:
220 type: string
221 default: "stretch"
222 steps:
223 - run:
224 name: "Install dependencies"
225 command: "apt-get update && apt-get install -qq -y curl gnupg2"
226 - run:
227 name: "Install apt-keys"
228 command: |
229 if [ "<< parameters.version >>" = "master" ]; then
230 curl https://repo.powerdns.com/CBC8B383-pub.asc | apt-key add -
231 else
232 curl https://repo.powerdns.com/FD380FBB-pub.asc | apt-key add -
233 fi
234 - run:
235 name: "Add repository"
236 command: |
237 echo 'deb [arch=amd64] http://repo.powerdns.com/<< parameters.distro >> << parameters.release >>-auth-<< parameters.version>> main' >> /etc/apt/sources.list.d/pdns.list
238 - run:
239 name: "add pinning"
240 command: |
241 echo 'Package: pdns-*' > /etc/apt/preferences.d/pdns
242 echo 'Pin: origin repo.powerdns.com' >> /etc/apt/preferences.d/pdns
243 echo 'Pin-Priority: 600' >> /etc/apt/preferences.d/pdns
244 - run:
245 name: update apt cache
246 command: apt-get update
247
248 setup-ccache:
249 description: Install .ccache and set $PATH
250 steps:
251 - run:
252 name: Install ccache
253 command: apt-get update && apt-get -qq -y install ccache
254 - run:
255 name: Setup ccache in $PATH
256 command: echo 'export PATH=/usr/lib/ccache:$PATH' >> $BASH_ENV
257
258 save-ccache-cache:
259 description: Store the .ccache directory
260 parameters:
261 product:
262 type: string
263 default: ""
264 steps:
265 - save_cache:
266 key: ccache-cache-{{ arch }}-<< parameters.product >>-{{ .Branch }}
267 paths:
268 - ~/.ccache
269
270 restore-cache-ccache:
271 description: Restore the .ccache directory
272 parameters:
273 product:
274 type: string
275 default: ""
276 steps:
277 - setup-ccache
278 - run:
279 name: ensure ca-certificates is installed
280 command: apt-get update && apt-get -qq -y install ca-certificates
281 - restore_cache:
282 keys:
283 - ccache-cache-{{ arch }}-<< parameters.product >>-{{ .Branch }}
284 - ccache-cache-{{ arch }}-<< parameters.product >>-
285
286 install-doc-deps:
287 description: Install dependencies needed to build the documentation
288 steps:
289 - run:
290 name: Install dependencies
291 command: |
292 apt-get update && apt-get -qq -y install \
293 autoconf \
294 automake \
295 bison \
296 curl \
297 flex \
298 g++ \
299 git \
300 latexmk \
301 libboost-all-dev \
302 libedit-dev \
303 libluajit-5.1-dev \
304 libssl-dev \
305 make \
306 pkg-config \
307 ragel \
308 virtualenv
309 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
310 apt-get update && apt-get -qq -y install \
311 texlive-full
312 fi
313
314 build-auth-docs:
315 description: Build documentation
316 steps:
317 - run:
318 name: autoconf
319 command: |
320 BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
321 - run:
322 name: configure
323 command: |
324 ./configure \
325 --disable-lua-records \
326 --disable-unit-tests \
327 --without-dynmodules \
328 --without-modules
329 - run:
330 name: build docs
331 command: |
332 make -C docs html-docs
333 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
334 make -C docs all-docs
335 fi
336
337 upload-auth-docs:
338 steps:
339 - run:
340 name: Upload documents
341 command: |
342 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
343 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' ./docs/html-docs/ docs_powerdns_com@${DOCS_HOST}:/authoritative/
344 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./docs/html-docs.tar.bz2 docs_powerdns_com@${DOCS_HOST}:/authoritative/
345 rsync -crv --no-p --chmod=g=rwX --exclude '*~' ./docs/PowerDNS-Authoritative.pdf docs_powerdns_com@${DOCS_HOST}:/authoritative/
346 fi
347
348 build-recursor-docs:
349 description: Build Recursor documentation
350 steps:
351 - run:
352 name: autoconf
353 command: |
354 BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
355 working_directory: ~/project/pdns/recursordist
356 - run:
357 name: configure
358 command: |
359 ./configure \
360 --disable-unit-tests \
361 --disable-protobuf
362 working_directory: ~/project/pdns/recursordist
363 - run:
364 name: build docs
365 command: |
366 make html-docs
367 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
368 make all-docs
369 fi
370 working_directory: ~/project/pdns/recursordist
371
372 upload-recursor-docs:
373 steps:
374 - run:
375 name: Upload documents
376 working_directory: ~/project/pdns/recursordist
377 command: |
378 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
379 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' html-docs/ docs_powerdns_com@${DOCS_HOST}:/recursor/
380 rsync -crv --no-p --chmod=g=rwX --exclude '*~' html-docs.tar.bz2 docs_powerdns_com@${DOCS_HOST}:/recursor/
381 rsync -crv --no-p --chmod=g=rwX --exclude '*~' PowerDNS-Recursor.pdf docs_powerdns_com@${DOCS_HOST}:/recursor/
382 fi
383
384 build-dnsdist-docs:
385 description: Build dnsdist documentation
386 steps:
387 - run:
388 name: autoconf
389 command: |
390 BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
391 working_directory: ~/project/pdns/dnsdistdist
392 - run:
393 name: configure
394 command: |
395 ./configure \
396 --disable-unit-tests \
397 --disable-protobuf
398 working_directory: ~/project/pdns/dnsdistdist
399 - run:
400 name: build docs
401 command: |
402 make html-docs
403 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
404 make all-docs
405 fi
406 working_directory: ~/project/pdns/dnsdistdist
407
408 upload-dnsdist-docs:
409 steps:
410 - run:
411 name: Upload documents
412 working_directory: ~/project/pdns/dnsdistdist
413 command: |
414 if [ "${CIRCLE_PROJECT_USERNAME}" = "PowerDNS" -a "${CIRCLE_PROJECT_REPONAME}" = "pdns" -a "${CIRCLE_BRANCH}" = "master" ]; then
415 rsync -crv --delete --no-p --chmod=g=rwX --exclude '*~' html-docs/ dnsdist_org@${DOCS_HOST}:
416 rsync -crv --no-p --chmod=g=rwX --exclude '*~' html-docs.tar.bz2 dnsdist_org@${DOCS_HOST}:
417 rsync -crv --no-p --chmod=g=rwX --exclude '*~' dnsdist.pdf dnsdist_org@${DOCS_HOST}:
418 fi
419
420 jobs:
421 build-auth:
422 docker:
423 - image: debian:stretch
424
425 steps:
426 - checkout-shallow
427 - install-auth-dev-deps
428 - restore-cache-ccache:
429 product: auth
430 - run:
431 name: autoconf
432 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
433 - run:
434 name: configure
435 command: |
436 CFLAGS="-O1 -Werror=vla" \
437 CXXFLAGS="-O1 -Werror=vla" \
438 ./configure \
439 --disable-lua-records \
440 --with-modules='bind lmdb ldap gmysql gsqlite3 gpgsql godbc mydns random tinydns' \
441 --enable-tools \
442 --with-lmdb=/usr \
443 --with-libsodium \
444 --prefix=/opt/pdns-auth
445 - run:
446 name: build
447 command: make -j3 -k
448 - save-ccache-cache:
449 product: auth
450 - run:
451 name: Install the binaries
452 command: make install
453 - persist_to_workspace:
454 root: /opt
455 paths:
456 - pdns-auth
457
458 test-auth-regress-odbc-sqlite3:
459 docker:
460 - image: debian:stretch
461 steps:
462 - auth-regress-setup
463 - run:
464 name: Configure ODBC for sqlite
465 command: |
466 cat >> ~/.odbc.ini \<<- __EOF__
467 [pdns-sqlite3-1]
468 Driver = SQLite3
469 Database = ${PWD}/regression-tests/pdns.sqlite3
470 [pdns-sqlite3-2]
471 Driver = SQLite3
472 Database = ${PWD}/regression-tests/pdns.sqlite32
473 __EOF__
474 - run:
475 name: Install ODBC deps
476 command: |
477 apt-get install -qq -y \
478 unixodbc \
479 libsqliteodbc \
480 sqlite3
481 - run:
482 name: Set up sqlite3 odbc testing
483 command: echo 'export GODBC_SQLITE3_DSN=pdns-sqlite3-1' > ./vars
484 workdir: ~/project/regression-tests
485 - auth-regress:
486 context: godbc_sqlite3-nsec3
487 doroot: false # Broken at the moment
488
489 test-auth-regress-odbc-mssql:
490 docker:
491 - image: debian:stretch
492 - image: mcr.microsoft.com/mssql/server:2017-GA-ubuntu
493 environment:
494 - ACCEPT_EULA: Y
495 - SA_PASSWORD: 'SAsa12%%'
496 steps:
497 - auth-regress-setup
498 - run:
499 name: Install ODBC deps
500 command: |
501 apt-get install -qq -y \
502 freetds-bin \
503 tdsodbc \
504 unixodbc
505 - run:
506 name: set up mssql odbc
507 command: |
508 cat >> ~/.odbc.ini \<<- __EOF__
509 [pdns-mssql-docker]
510 Driver=FreeTDS
511 Trace=No
512 Server=127.0.0.1
513 Port=1433
514 Database=pdns
515 TDS_Version=7.1
516 [pdns-mssql-docker-nodb]
517 Driver=FreeTDS
518 Trace=No
519 Server=127.0.0.1
520 Port=1433
521 TDS_Version=7.1
522 __EOF__
523 - run:
524 command: cat /usr/share/tdsodbc/odbcinst.ini >> /etc/odbcinst.ini
525 - run:
526 name: create database
527 command: echo 'create database pdns' | isql -v pdns-mssql-docker-nodb sa SAsa12%%
528 - run:
529 name: Set up mssql odbc testing
530 command: echo 'export GODBC_MSSQL_PASSWORD=SAsa12%% GODBC_MSSQL_USERNAME=sa GODBC_MSSQL_DSN=pdns-mssql-docker' > ./vars
531 workdir: ~/project/regression-tests
532 - auth-regress:
533 context: godbc_mssql-nodnssec
534 skip: 8bit-txt-unescaped
535 - auth-regress:
536 context: godbc_mssql
537 skip: 8bit-txt-unescaped
538 - auth-regress:
539 context: godbc_mssql-nsec3
540 skip: 8bit-txt-unescaped
541 - auth-regress:
542 context: godbc_mssql-nsec3-optout
543 skip: 8bit-txt-unescaped
544 - auth-regress:
545 context: godbc_mssql-nsec3-narrow
546 skip: 8bit-txt-unescaped
547
548 test-auth-regress-gsqlite3:
549 docker:
550 - image: debian:stretch
551 steps:
552 - auth-regress-setup
553 - run:
554 command: apt-get install -qq -y sqlite3
555 - auth-regress:
556 context: gsqlite3-nodnssec-both
557 - auth-regress:
558 context: gsqlite3-both
559 - auth-regress:
560 context: gsqlite3-nsec3-both
561 - auth-regress:
562 context: gsqlite3-nsec3-optout-both
563 - auth-regress:
564 context: gsqlite3-nsec3-narrow
565
566 test-auth-regress-bind:
567 docker:
568 - image: debian:stretch
569 - image: circleci/mysql:5 # for the hybrid test
570 steps:
571 - auth-regress-setup
572 - run:
573 command: apt-get install -qq -y sqlite3
574 - auth-regress:
575 context: bind-both
576 - auth-regress:
577 context: bind-dnssec-both
578 - auth-regress:
579 context: bind-dnssec-nsec3-both
580 - auth-regress:
581 context: bind-dnssec-nsec3-optout-both
582 - auth-regress:
583 context: bind-dnssec-nsec3-narrow
584 - run:
585 command: apt-get install -qq -y default-mysql-client
586 - run:
587 command: |
588 cat >> ~/.my.cnf \<<- __EOF__
589 [client]
590 protocol=TCP
591 __EOF__
592 - auth-regress:
593 context: bind-hybrid-nsec3
594
595 test-auth-regress-mydns:
596 docker:
597 - image: debian:stretch
598 - image: circleci/mysql:5
599 steps:
600 - auth-regress-setup
601 - run:
602 command: apt-get install -qq -y default-mysql-client
603 - run:
604 command: |
605 cat >> ~/.my.cnf \<<- __EOF__
606 [client]
607 protocol=TCP
608 __EOF__
609 - auth-regress:
610 context: mydns
611 doroot: false
612
613 test-auth-regress-gmysql:
614 docker:
615 - image: debian:stretch
616 - image: circleci/mysql:5
617 steps:
618 - auth-regress-setup
619 - run:
620 command: apt-get install -qq -y default-mysql-client
621 - run:
622 command: |
623 cat >> ~/.my.cnf \<<- __EOF__
624 [client]
625 protocol=TCP
626 __EOF__
627 - auth-regress:
628 context: gmysql-nodnssec-both
629 - auth-regress:
630 context: gmysql-both
631 - auth-regress:
632 context: gmysql-nsec3-both
633 - auth-regress:
634 context: gmysql-nsec3-optout-both
635 - auth-regress:
636 context: gmysql-nsec3-narrow
637
638 test-auth-regress-gpgsql:
639 docker:
640 - image: debian:stretch
641 - image: circleci/postgres:9
642 environment:
643 POSTGRES_USER: root
644 steps:
645 - auth-regress-setup
646 - run:
647 command: apt-get install -qq -y postgresql-client
648 - run:
649 name: Use TCP for Postgresql connections
650 command: |
651 cat >> ./vars \<<- __EOF__
652 export PGHOST=127.0.0.1
653 export PGPORT=5432
654 __EOF__
655 workdir: ~/project/regression-tests
656 - auth-regress:
657 context: gpgsql-nodnssec-both
658 - auth-regress:
659 context: gpgsql-both
660 - auth-regress:
661 context: gpgsql-nsec3-both
662 - auth-regress:
663 context: gpgsql-nsec3-optout-both
664 - auth-regress:
665 context: gpgsql-nsec3-narrow
666
667 test-auth-regress-ldap:
668 docker:
669 - image: debian:stretch
670 environment:
671 LDAPHOST: ldap://ldapserver/
672 - image: powerdns/ldap-regress:1.2.4-0 # OpenLDAP 2.4.47
673 name: ldapserver
674 command: '--loglevel debug'
675 environment:
676 LDAP_LOG_LEVEL: 0
677 steps:
678 - auth-regress-setup
679 - run: DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ldap-utils
680 - auth-regress:
681 context: ldap-tree
682 doroot: false
683 - auth-regress:
684 context: ldap-simple
685 doroot: false
686 - auth-regress:
687 context: ldap-strict
688 doroot: false
689
690 test-auth-regress-tinydns:
691 docker:
692 - image: debian:stretch
693 steps:
694 - auth-regress-setup
695 - auth-regress:
696 context: tinydns
697 doroot: false
698
699 test-auth-regress-lmdb:
700 docker:
701 - image: debian:stretch
702 steps:
703 - auth-regress-setup
704 - run: apt-get install -y -qq jq curl
705 - auth-regress:
706 context: lmdb-nodnssec-both
707 - auth-regress:
708 context: lmdb-both
709 - auth-regress:
710 context: lmdb-nsec3-both
711 - auth-regress:
712 context: lmdb-nsec3-optout-both
713 - auth-regress:
714 context: lmdb-nsec3-narrow
715
716 test-auth-algorithms:
717 docker:
718 - image: debian:stretch
719 steps:
720 - auth-regress-setup
721 - run:
722 name: Test all algorithms
723 command: /opt/pdns-auth/bin/pdnsutil test-algorithms
724
725 test-auth-api:
726 docker:
727 - image: debian:stretch
728 steps:
729 - auth-regress-setup
730 - run: apt-get -y -qq install virtualenv sqlite3
731 - run:
732 name: Run API tests
733 workdir: ~/project/regression-tests.api
734 command: |
735 PDNSSERVER="/opt/pdns-auth/sbin/pdns_server" \
736 PDNSUTIL="/opt/pdns-auth/bin/pdnsutil" \
737 SDIG="/opt/pdns-auth/bin/sdig" \
738 ZONE2SQL="/opt/pdns-auth/bin/zone2sql" \
739 ./runtests authoritative
740
741 build-recursor:
742 docker:
743 - image: debian:stretch
744 steps:
745 - restore-cache-ccache:
746 product: recursor
747 - run:
748 name: Install dependencies
749 command: |
750 apt-get update && apt-get -qq --no-install-recommends install \
751 autoconf \
752 automake \
753 ca-certificates \
754 curl \
755 bison \
756 flex \
757 g++ \
758 git \
759 libboost-all-dev \
760 libcap-dev \
761 libluajit-5.1-dev \
762 libprotobuf-dev \
763 libsodium-dev \
764 libssl-dev \
765 libsystemd-dev \
766 libtool \
767 make \
768 pkg-config \
769 protobuf-compiler \
770 ragel \
771 virtualenv
772 - checkout-shallow
773 - run:
774 name: autoconf
775 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
776 working_directory: ~/project/pdns/recursordist
777 - run:
778 name: configure
779 command: |
780 CFLAGS="-O1 -Werror=vla" \
781 CXXFLAGS="-O1 -Werror=vla" \
782 ./configure \
783 --enable-unit-tests \
784 --enable-nod \
785 --prefix=/opt/pdns-recursor \
786 --with-libsodium \
787 --with-lua=luajit \
788 --with-libcap \
789 --with-protobuf=yes \
790 --without-net-snmp
791 working_directory: ~/project/pdns/recursordist
792 - run:
793 name: build
794 command: make -j3 -k
795 working_directory: ~/project/pdns/recursordist
796 - save-ccache-cache:
797 product: recursor
798 - run:
799 name: Run unit tests
800 command: make check || (cat test-suite.log; false)
801 working_directory: ~/project/pdns/recursordist
802 - run:
803 name: Install resulting binaries
804 command: make install
805 working_directory: ~/project/pdns/recursordist
806 - persist_to_workspace:
807 root: /opt
808 paths:
809 - pdns-recursor
810
811 test-recursor-regression:
812 docker:
813 - image: debian:stretch
814 steps:
815 - add-auth-repo
816 - run: apt-get --no-install-recommends install -qq -y pdns-server pdns-backend-bind pdns-tools daemontools authbind jq libfaketime lua-posix moreutils bc virtualenv protobuf-compiler
817 - install-recursor-deps
818 - run:
819 name: Set up authbind
820 command: |
821 touch /etc/authbind/byport/53
822 chmod 755 /etc/authbind/byport/53
823 - checkout-shallow
824 - attach_workspace:
825 at: /opt
826 - run:
827 name: Run regression tests
828 workdir: ~/project
829 command: |
830 PDNSRECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
831 RECCONTROL=/opt/pdns-recursor/bin/rec_control \
832 ./build-scripts/test-recursor
833
834 test-recursor-bulk:
835 docker:
836 - image: debian:stretch
837 steps:
838 - add-auth-repo
839 - run: apt-get --no-install-recommends install -qq -y pdns-tools moreutils time
840 - install-recursor-deps
841 - checkout-shallow
842 - attach_workspace:
843 at: /opt
844 - run:
845 name: Get the majestic million list
846 workdir: ~/project/regression-tests
847 command: |
848 apt-get install -qq -y unzip && \
849 curl -LO http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip && \
850 unzip top-1m.csv.zip -d .
851 - run:
852 name: Run bulktests
853 command: |
854 DNSBULKTEST=/usr/bin/dnsbulktest \
855 RECURSOR=/opt/pdns-recursor/sbin/pdns_recursor \
856 THRESHOLD=95 \
857 TRACE=no \
858 ./timestamp ./recursor-test 5300 50000 || \
859 (cat recursor.log; false)
860 workdir: ~/project/regression-tests
861
862 test-recursor-api:
863 docker:
864 - image: debian:stretch
865 steps:
866 - add-auth-repo
867 - run: apt-get --no-install-recommends install -qq -y virtualenv pdns-tools
868 - install-recursor-deps
869 - checkout-shallow
870 - attach_workspace:
871 at: /opt
872 - run:
873 name: Run API tests
874 workdir: ~/project/regression-tests.api
875 command: |
876 PDNSRECURSOR="/opt/pdns-recursor/sbin/pdns_recursor" \
877 ./runtests recursor
878
879 build-auth-docs:
880 docker:
881 - image: debian:stretch
882 steps:
883 - checkout-shallow
884 - install-doc-deps
885 - build-auth-docs
886
887 deploy-auth-docs:
888 docker:
889 - image: debian:stretch
890 steps:
891 - checkout-shallow
892 - install-doc-deps
893 - build-auth-docs
894 - add-docs-upload-ssh
895 - upload-auth-docs
896
897 build-recursor-docs:
898 docker:
899 - image: debian:stretch
900 steps:
901 - checkout-shallow
902 - install-doc-deps
903 - build-recursor-docs
904
905 deploy-recursor-docs:
906 docker:
907 - image: debian:stretch
908 steps:
909 - checkout-shallow
910 - install-doc-deps
911 - build-recursor-docs
912 - add-docs-upload-ssh
913 - upload-recursor-docs
914
915 build-dnsdist-docs:
916 docker:
917 - image: debian:stretch
918 steps:
919 - checkout-shallow
920 - install-doc-deps
921 - build-dnsdist-docs
922
923 deploy-dnsdist-docs:
924 docker:
925 - image: debian:stretch
926 steps:
927 - checkout-shallow
928 - install-doc-deps
929 - build-dnsdist-docs
930 - add-docs-upload-ssh
931 - upload-dnsdist-docs
932
933 coverity-auth:
934 docker:
935 - image: debian:stretch
936 steps:
937 - install-auth-dev-deps
938 - install-coverity-tools
939 - checkout-shallow
940 - run:
941 name: autoconf
942 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
943 - run:
944 name: configure
945 command: |
946 CFLAGS="-O1 -Werror=vla" \
947 CXXFLAGS="-O1 -Werror=vla" \
948 ./configure \
949 --disable-lua-records \
950 --with-modules='bind lmdb ldap gmysql gsqlite3 gpgsql godbc mydns random tinydns' \
951 --enable-tools \
952 --with-lmdb=/usr \
953 --with-libsodium \
954 --prefix=/opt/pdns-auth
955 - run:
956 name: build
957 command: /usr/local/bin/cov-build --dir cov-int make -j2 -k
958 - run:
959 name: Create Coverity tarball
960 command: tar caf auth.tar.bz2 cov-int
961 - run:
962 name: Upload tarball to coverity
963 command: |
964 curl --form token=${COVERITY_TOKEN} \
965 --form email="${COVERITY_EMAIL}" \
966 --form file=@auth.tar.bz2 \
967 --form version="$(./builder-support/gen-version)" \
968 --form description="master build" \
969 https://scan.coverity.com/builds?project=${COVERITY_PROJECT}
970
971 coverity-dnsdist:
972 docker:
973 - image: debian:stretch
974 steps:
975 - run:
976 name: Install dependencies
977 command: |
978 apt-get update && apt-get -qq --no-install-recommends install \
979 autoconf \
980 automake \
981 bison \
982 bzip2 \
983 ca-certificates \
984 curl \
985 flex \
986 g++ \
987 git \
988 libboost-all-dev \
989 libcap-dev \
990 libedit-dev \
991 libfstrm-dev \
992 libluajit-5.1-dev \
993 libprotobuf-dev \
994 libre2-dev \
995 libsnmp-dev \
996 libsodium-dev \
997 libssl-dev \
998 libsystemd-dev \
999 libtool \
1000 make \
1001 pkg-config \
1002 protobuf-compiler \
1003 ragel \
1004 virtualenv
1005 - install-coverity-tools
1006 - checkout-shallow
1007 - run:
1008 name: autoconf
1009 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
1010 working_directory: ~/project/pdns/dnsdistdist
1011 - run:
1012 name: configure
1013 command: |
1014 CFLAGS="-O1 -Werror=vla" \
1015 CXXFLAGS="-O1 -Werror=vla" \
1016 ./configure \
1017 --disable-systemd \
1018 --disable-unit-tests \
1019 --enable-dnstap \
1020 --enable-dnscrypt \
1021 --enable-dns-over-tls \
1022 --prefix=/opt/dnsdist \
1023 --with-libsodium \
1024 --with-lua=luajit \
1025 --with-libcap \
1026 --with-protobuf=yes \
1027 --with-re2
1028 working_directory: ~/project/pdns/dnsdistdist
1029 - run:
1030 name: build
1031 command: /usr/local/bin/cov-build --dir cov-int make -j2 -k
1032 working_directory: ~/project/pdns/dnsdistdist
1033 - run:
1034 name: Create Coverity tarball
1035 command: tar caf dnsdist.tar.bz2 cov-int
1036 working_directory: ~/project/pdns/dnsdistdist
1037 - run:
1038 name: Upload tarball to coverity
1039 command: |
1040 curl --form token=${COVERITY_TOKEN} \
1041 --form email="${COVERITY_EMAIL}" \
1042 --form file=@pdns/dnsdistdist/dnsdist.tar.bz2 \
1043 --form version="$(./builder-support/gen-version)" \
1044 --form description="master build" \
1045 https://scan.coverity.com/builds?project=${COVERITY_PROJECT}
1046
1047 coverity-recursor:
1048 docker:
1049 - image: debian:stretch
1050 steps:
1051 - run:
1052 name: Install dependencies
1053 command: |
1054 apt-get update && apt-get -qq --no-install-recommends install \
1055 autoconf \
1056 automake \
1057 ca-certificates \
1058 curl \
1059 bison \
1060 bzip2 \
1061 flex \
1062 g++ \
1063 git \
1064 libboost-all-dev \
1065 libcap-dev \
1066 libluajit-5.1-dev \
1067 libprotobuf-dev \
1068 libsodium-dev \
1069 libssl-dev \
1070 libsystemd-dev \
1071 libtool \
1072 make \
1073 pkg-config \
1074 protobuf-compiler \
1075 ragel \
1076 virtualenv
1077 - install-coverity-tools
1078 - checkout-shallow
1079 - run:
1080 name: autoconf
1081 command: BUILDER_VERSION=0.0.0-git1 autoreconf -vfi
1082 working_directory: ~/project/pdns/recursordist
1083 - run:
1084 name: configure
1085 command: |
1086 CFLAGS="-O1 -Werror=vla" \
1087 CXXFLAGS="-O1 -Werror=vla" \
1088 ./configure \
1089 --disable-systemd \
1090 --disable-unit-tests \
1091 --prefix=/opt/pdns-recursor \
1092 --with-libsodium \
1093 --with-lua=luajit \
1094 --with-libcap \
1095 --with-protobuf=yes \
1096 --without-net-snmp
1097 working_directory: ~/project/pdns/recursordist
1098 - run:
1099 name: build
1100 command: /usr/local/bin/cov-build --dir cov-int make -j2 -k
1101 working_directory: ~/project/pdns/recursordist
1102 - run:
1103 name: Create Coverity tarball
1104 command: tar caf recursor.tar.bz2 cov-int
1105 working_directory: ~/project/pdns/recursordist
1106 - run:
1107 name: Upload tarball to coverity
1108 command: |
1109 curl --form token=${COVERITY_TOKEN} \
1110 --form email="${COVERITY_EMAIL}" \
1111 --form file=@pdns/recursordist/recursor.tar.bz2 \
1112 --form version="$(./builder-support/gen-version)" \
1113 --form description="master build" \
1114 https://scan.coverity.com/builds?project=${COVERITY_PROJECT}
1115
1116 workflows:
1117 version: 2
1118 coverity:
1119 triggers:
1120 - schedule:
1121 cron: "0 0 * * *"
1122 filters:
1123 branches:
1124 only: master
1125 jobs:
1126 - coverity-auth:
1127 context: auth-coverity
1128 - coverity-dnsdist:
1129 context: dnsdist-coverity
1130 - coverity-recursor:
1131 context: recursor-coverity
1132
1133 build-and-test-all:
1134 jobs:
1135 - build-auth
1136 - test-auth-api:
1137 requires:
1138 - build-auth
1139 - test-auth-algorithms:
1140 requires:
1141 - build-auth
1142 - test-auth-regress-odbc-sqlite3:
1143 requires:
1144 - build-auth
1145 - test-auth-regress-odbc-mssql:
1146 requires:
1147 - build-auth
1148 - test-auth-regress-gmysql:
1149 requires:
1150 - build-auth
1151 - test-auth-regress-mydns:
1152 requires:
1153 - build-auth
1154 - test-auth-regress-bind:
1155 requires:
1156 - build-auth
1157 - test-auth-regress-gsqlite3:
1158 requires:
1159 - build-auth
1160 - test-auth-regress-gpgsql:
1161 requires:
1162 - build-auth
1163 - test-auth-regress-lmdb:
1164 requires:
1165 - build-auth
1166 - test-auth-regress-ldap:
1167 requires:
1168 - build-auth
1169 - test-auth-regress-tinydns:
1170 requires:
1171 - build-auth
1172 - build-recursor
1173 - test-recursor-regression:
1174 requires:
1175 - build-recursor
1176 - test-recursor-bulk:
1177 requires:
1178 - build-recursor
1179 - test-recursor-api:
1180 requires:
1181 - build-recursor
1182
1183 build-docs:
1184 jobs:
1185 - build-auth-docs:
1186 filters:
1187 branches:
1188 ignore: master
1189 - build-recursor-docs:
1190 filters:
1191 branches:
1192 ignore: master
1193 - build-dnsdist-docs:
1194 filters:
1195 branches:
1196 ignore: master
1197
1198 # These actually deploy
1199 - deploy-auth-docs:
1200 context: docs
1201 filters:
1202 branches:
1203 only: master
1204 - deploy-recursor-docs:
1205 context: docs
1206 filters:
1207 branches:
1208 only: master
1209 - deploy-dnsdist-docs:
1210 context: docs
1211 filters:
1212 branches:
1213 only: master