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