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