3 - if: $CI_MERGE_REQUEST_IID
5 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
10 GET_SOURCES_ATTEMPTS: 10
13 - export DEBIAN_FRONTEND=noninteractive
16 .prepare-lint-po: &prepare-lint-po
17 - apt-get -qy install git i18nspector
18 - git clone https://gitlab.tails.boum.org/tails/jenkins-tools.git /tmp/jenkins-tools
22 - if: '$CI_COMMIT_BRANCH == "master"'
23 - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
27 - apt-get -qy install ikiwiki po4a libyaml-perl libyaml-libyaml-perl libyaml-syck-perl perlmagick
33 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
39 - /tmp/jenkins-tools/slaves/lint_po
43 - apt-get -qy install python3-bandit file
45 - './bin/bandit-tree --configfile .bandit.yml
55 check-website-core-pages:
57 - apt-get -qy install git
58 - ./bin/check-core-pages
62 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
67 - apt-get -qy install python3 gettext
68 - ./bin/check-po-msgfmt
72 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
77 - apt-get -qy install git ruby
78 - ./bin/sanity-check-website
80 check-translatable-live-website-urls:
82 - apt-get -qy install python3-polib
83 - ./bin/check-translatable-live-website-urls po/tails.pot
87 - if: '$CI_COMMIT_BRANCH != "master"'
89 - 'cat config/chroot_local-packageslists/tails-perl5lib.list
90 config/chroot_local-packageslists/tails-iuk.list
92 | xargs apt-get -qy install'
93 - 'apt-get -qy install
95 libdist-zilla-plugin-test-notabs-perl
96 libdist-zilla-plugin-test-perl-critic-perl
97 libdist-zilla-app-command-authordebs-perl
106 libdata-dumper-concise-perl
108 libfile-copy-recursive-perl
109 libtest-lwp-useragent-perl'
110 - apt-get update -qq # Take into account APT configuration added by apt-file
111 # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
112 - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
113 - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/iuk
114 - dzil authordebs --install
115 - export SOURCE_DATE_EPOCH=$(date --utc +%s)
116 - 'TAILS_GIT_CHECKOUT=$CI_PROJECT_DIR
117 PERL5LIB=$CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib/lib
123 - if: '$CI_COMMIT_BRANCH != "master"'
125 - 'cat config/chroot_local-packageslists/tails-perl5lib.list
127 | xargs apt-get -qy install'
128 - 'apt-get -qy install
130 libdist-zilla-plugin-test-notabs-perl
131 libdist-zilla-plugin-test-perl-critic-perl
132 libdist-zilla-app-command-authordebs-perl
135 - apt-get update -qq # Take into account APT configuration added by apt-file
136 # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
137 - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
138 - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib
139 - dzil authordebs --install
143 image: debian:testing
145 - apt-get -qy install python3 shellcheck xmlstarlet file
146 - shellcheck --version
147 - './bin/shellcheck-tree --format=checkstyle
148 | xmlstarlet tr config/ci/shellcheck/checkstyle2junit.xslt
153 junit: shellcheck.xml
155 test-persistent-storage-config-file:
157 - apt-get -qy install python3 python3-gi acl
158 - config/chroot_local-includes/usr/lib/python3/dist-packages/tps/configuration/config_file_test.py
162 - apt-get -qy install python3 python3-sh
163 - config/chroot_local-includes/usr/local/lib/tails-gdm-error-message doctest --verbose
164 - env PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages python3 config/chroot_local-includes/usr/local/bin/tails-documentation --doctest
168 - if: '$CI_COMMIT_BRANCH != "master"'
170 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
172 | xargs apt-get -qy install'
173 - 'cd config/chroot_local-includes/usr/lib/python3/dist-packages ; find tca -name "*.py" -print0 | xargs -0 -L1 env PYTHONPATH=. python3 -m doctest'
177 - if: '$CI_COMMIT_BRANCH != "master"'
179 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
181 | xargs apt-get -qy install'
182 - 'PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages env python3 ./config/chroot_local-includes/usr/local/lib/tca-portal --doctest-only --log-level DEBUG'
187 - if: '$CI_COMMIT_BRANCH != "master"'
189 - apt-get -qy install python3 python3-atomicwrites python3-sh git
190 - 'cd config/chroot_local-includes/usr/lib/python3/dist-packages ; find tailslib -name "*.py" -print0 | grep --null-data -v -e netnsdrop.py -e gnome.py | xargs -0 -L1 env PYTHONPATH=. python3 -m doctest'
194 - if: '$CI_COMMIT_BRANCH != "master"'
196 - 'cat config/chroot_local-packageslists/whisperback.list | grep -E -v "^#"
197 | xargs apt-get -qy install'
198 - apt-get -qy install python3-pytest
199 - 'PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages
200 pytest-3 --verbose --junit-xml=report.xml
201 config/chroot_local-includes/usr/lib/python3/dist-packages/whisperBack/test.py'
207 apt-snapshots-expiry:
209 - apt-get -qy install curl git
210 - ./bin/apt-snapshots-expiry
212 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
215 - config/APT_snapshots.d/*/serial
216 - vagrant/definitions/tails-builder/config/APT_snapshots.d/*/serial
218 .install-https-get-expired-build-deps: &install-https-get-expired-build-deps
219 - apt-get -qy install --no-install-recommends golang-go ca-certificates
221 .build-https-get-expired: &build-https-get-expired
222 - go build -o ./https-get-expired config/chroot_local-includes/usr/src/https-get-expired.go
224 .test-https-get-expired: &test-https-get-expired
225 - echo "Basic check:"
226 - ./https-get-expired -reject-expired https://tails.boum.org/
227 - echo "Let's pretend we are in the past. Then, this certificate is still good."
228 - ./https-get-expired -current-time 2000-01-01 -reject-expired https://tails.boum.org/
229 - echo "Let's pretend we are in the future. Then, this certificate is expired"
230 - "! ./https-get-expired -current-time 2090-01-01 -reject-expired https://tails.boum.org/"
231 - "! ./https-get-expired -reject-expired https://wrong.host.badssl.com/"
232 - "! ./https-get-expired -reject-expired https://self-signed.badssl.com/"
233 - "! ./https-get-expired -reject-expired https://untrusted-root.badssl.com/"
234 - "! ./https-get-expired -reject-expired https://expired.badssl.com/"
235 - echo "Invalid host"
236 - "! ./https-get-expired -reject-expired https://nxdomain.tails.boum.org/"
237 - "( . config/chroot_local-includes/etc/default/htpdate.pools; err=0; for url in $(echo $HTP_POOL_1 $HTP_POOL_2 $HTP_POOL_3 | tr ',' ' '); do echo $url; if ! ./https-get-expired -reject-expired https://$url; then echo ERROR on $url; err=1; fi; done; exit $err; )"
241 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
244 - config/chroot_local-includes/usr/src/https-get-expired.go
245 - config/chroot_local-includes/etc/default/htpdate.pools
247 - *install-https-get-expired-build-deps
248 - *build-https-get-expired
249 - *test-https-get-expired
251 https-get-expired-sid:
252 # this job gives us results using a future version of Golang compared to the one we actually use
255 - if: '$CI_COMMIT_BRANCH == "devel"'
258 - config/chroot_local-includes/usr/src/https-get-expired.go
259 - config/chroot_local-includes/etc/default/htpdate.pools
261 - *install-https-get-expired-build-deps
262 - *build-https-get-expired
263 - *test-https-get-expired