3 - if: $CI_MERGE_REQUEST_IID
5 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
10 - export DEBIAN_FRONTEND=noninteractive
13 .prepare-lint-po: &prepare-lint-po
14 - apt-get -qy install git i18nspector
15 - git clone https://gitlab.tails.boum.org/tails/jenkins-tools.git /tmp/jenkins-tools
19 - if: '$CI_COMMIT_BRANCH == "master"'
20 - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
24 - apt-get -qy install ikiwiki po4a libyaml-perl libyaml-libyaml-perl libyaml-syck-perl perlmagick
30 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
36 - /tmp/jenkins-tools/slaves/lint_po
41 - if: '$CI_COMMIT_BRANCH == "stable"'
44 - apt-get -qy install intltool
45 - ./import-translations
46 - /tmp/jenkins-tools/slaves/lint_po po/*.po
50 - apt-get -qy install python3-bandit file
52 - './bin/bandit-tree --configfile .bandit.yml
62 check-website-core-pages:
64 - apt-get -qy install git
65 - ./bin/check-core-pages
69 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
74 - apt-get -qy install python3 gettext
75 - ./bin/check-po-msgfmt
79 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
84 - apt-get -qy install git ruby
85 - ./bin/sanity-check-website
87 check-translatable-live-website-urls:
89 - apt-get -qy install python3-polib
90 - ./bin/check-translatable-live-website-urls po/tails.pot
94 - if: '$CI_COMMIT_BRANCH != "master"'
96 - 'cat config/chroot_local-packageslists/tails-perl5lib.list
97 config/chroot_local-packageslists/tails-iuk.list
99 | xargs apt-get -qy install'
100 - 'apt-get -qy install
102 libdist-zilla-plugin-test-notabs-perl
103 libdist-zilla-plugin-test-perl-critic-perl
104 libdist-zilla-app-command-authordebs-perl
113 libdata-dumper-concise-perl
115 libfile-copy-recursive-perl
116 libtest-lwp-useragent-perl'
117 - apt-get update -qq # Take into account APT configuration added by apt-file
118 # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
119 - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
120 - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/iuk
121 - dzil authordebs --install
122 - export SOURCE_DATE_EPOCH=$(date --utc +%s)
123 - 'TAILS_GIT_CHECKOUT=$CI_PROJECT_DIR
124 NODE_PATH=$CI_PROJECT_DIR/submodules/mirror-pool-dispatcher/lib/js
125 PATH=$CI_PROJECT_DIR/submodules/mirror-pool-dispatcher/bin:$PATH
126 PERL5LIB=$CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib/lib
132 - if: '$CI_COMMIT_BRANCH != "master"'
134 - 'cat config/chroot_local-packageslists/tails-perl5lib.list
136 | xargs apt-get -qy install'
137 - 'apt-get -qy install
139 libdist-zilla-plugin-test-notabs-perl
140 libdist-zilla-plugin-test-perl-critic-perl
141 libdist-zilla-app-command-authordebs-perl
144 - apt-get update -qq # Take into account APT configuration added by apt-file
145 # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
146 - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
147 - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib
148 - dzil authordebs --install
152 image: debian:testing
154 - apt-get -qy install python3 shellcheck xmlstarlet file
155 - shellcheck --version
156 - './bin/shellcheck-tree --format=checkstyle
157 | xmlstarlet tr config/ci/shellcheck/checkstyle2junit.xslt
162 junit: shellcheck.xml
164 test-persistent-storage-config-file:
166 - apt-get -qy install python3 python3-gi acl
167 - config/chroot_local-includes/usr/lib/python3/dist-packages/tps/configuration/config_file_test.py
171 - apt-get -qy install python3 python3-sh
172 - config/chroot_local-includes/usr/local/lib/tails-gdm-error-message doctest --verbose
173 - env PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages python3 config/chroot_local-includes/usr/local/bin/tails-documentation --doctest
177 - if: '$CI_COMMIT_BRANCH != "master"'
179 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
181 | xargs apt-get -qy install'
182 - 'cd config/chroot_local-includes/usr/lib/python3/dist-packages ; find tca -name "*.py" -print0 | xargs -0 -L1 env PYTHONPATH=. python3 -m doctest'
186 - if: '$CI_COMMIT_BRANCH != "master"'
188 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
190 | xargs apt-get -qy install'
191 - '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'
196 - if: '$CI_COMMIT_BRANCH != "master"'
198 - apt-get -qy install python3 python3-atomicwrites python3-sh git
199 - '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'
203 - if: '$CI_COMMIT_BRANCH != "master"'
205 - 'cat config/chroot_local-packageslists/whisperback.list | grep -E -v "^#"
206 | xargs apt-get -qy install'
207 - apt-get -qy install python3-pytest
208 - 'PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages
209 pytest-3 --verbose --junit-xml=report.xml
210 config/chroot_local-includes/usr/lib/python3/dist-packages/whisperBack/test.py'
216 apt-snapshots-expiry:
218 - apt-get -qy install curl git
219 - ./bin/apt-snapshots-expiry
221 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
224 - config/APT_snapshots.d/*/serial
225 - vagrant/definitions/tails-builder/config/APT_snapshots.d/*/serial
227 .install-https-get-expired-build-deps: &install-https-get-expired-build-deps
228 - apt-get -qy install --no-install-recommends golang-go ca-certificates
230 .build-https-get-expired: &build-https-get-expired
231 - go build -o ./https-get-expired config/chroot_local-includes/usr/src/https-get-expired.go
233 .test-https-get-expired: &test-https-get-expired
234 - echo "Basic check:"
235 - ./https-get-expired -reject-expired https://tails.boum.org/
236 - echo "Let's pretend we are in the past. Then, this certificate is still good."
237 - ./https-get-expired -current-time 2000-01-01 -reject-expired https://tails.boum.org/
238 - echo "Let's pretend we are in the future. Then, this certificate is expired"
239 - "! ./https-get-expired -current-time 2090-01-01 -reject-expired https://tails.boum.org/"
240 - "! ./https-get-expired -reject-expired https://wrong.host.badssl.com/"
241 - "! ./https-get-expired -reject-expired https://self-signed.badssl.com/"
242 - "! ./https-get-expired -reject-expired https://untrusted-root.badssl.com/"
243 - "! ./https-get-expired -reject-expired https://expired.badssl.com/"
244 - echo "Invalid host"
245 - "! ./https-get-expired -reject-expired https://nxdomain.tails.boum.org/"
246 - "( . 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; )"
250 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
253 - config/chroot_local-includes/usr/src/https-get-expired.go
254 - config/chroot_local-includes/etc/default/htpdate.pools
256 - *install-https-get-expired-build-deps
257 - *build-https-get-expired
258 - *test-https-get-expired
260 https-get-expired-sid:
261 # this job gives us results using a future version of Golang compared to the one we actually use
264 - if: '$CI_COMMIT_BRANCH == "devel"'
267 - config/chroot_local-includes/usr/src/https-get-expired.go
268 - config/chroot_local-includes/etc/default/htpdate.pools
270 - *install-https-get-expired-build-deps
271 - *build-https-get-expired
272 - *test-https-get-expired