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