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 PERL5LIB=$CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib/lib
130 - if: '$CI_COMMIT_BRANCH != "master"'
132 - 'cat config/chroot_local-packageslists/tails-perl5lib.list
134 | xargs apt-get -qy install'
135 - 'apt-get -qy install
137 libdist-zilla-plugin-test-notabs-perl
138 libdist-zilla-plugin-test-perl-critic-perl
139 libdist-zilla-app-command-authordebs-perl
142 - apt-get update -qq # Take into account APT configuration added by apt-file
143 # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
144 - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
145 - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib
146 - dzil authordebs --install
150 image: debian:testing
152 - apt-get -qy install python3 shellcheck xmlstarlet file
153 - shellcheck --version
154 - './bin/shellcheck-tree --format=checkstyle
155 | xmlstarlet tr config/ci/shellcheck/checkstyle2junit.xslt
160 junit: shellcheck.xml
162 test-persistent-storage-config-file:
164 - apt-get -qy install python3 python3-gi acl
165 - config/chroot_local-includes/usr/lib/python3/dist-packages/tps/configuration/config_file_test.py
169 - apt-get -qy install python3 python3-sh
170 - config/chroot_local-includes/usr/local/lib/tails-gdm-error-message doctest --verbose
171 - env PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages python3 config/chroot_local-includes/usr/local/bin/tails-documentation --doctest
175 - if: '$CI_COMMIT_BRANCH != "master"'
177 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
179 | xargs apt-get -qy install'
180 - 'cd config/chroot_local-includes/usr/lib/python3/dist-packages ; find tca -name "*.py" -print0 | xargs -0 -L1 env PYTHONPATH=. python3 -m doctest'
184 - if: '$CI_COMMIT_BRANCH != "master"'
186 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
188 | xargs apt-get -qy install'
189 - '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'
194 - if: '$CI_COMMIT_BRANCH != "master"'
196 - apt-get -qy install python3 python3-atomicwrites python3-sh git
197 - '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'
201 - if: '$CI_COMMIT_BRANCH != "master"'
203 - 'cat config/chroot_local-packageslists/whisperback.list | grep -E -v "^#"
204 | xargs apt-get -qy install'
205 - apt-get -qy install python3-pytest
206 - 'PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages
207 pytest-3 --verbose --junit-xml=report.xml
208 config/chroot_local-includes/usr/lib/python3/dist-packages/whisperBack/test.py'
214 apt-snapshots-expiry:
216 - apt-get -qy install curl git
217 - ./bin/apt-snapshots-expiry
219 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
222 - config/APT_snapshots.d/*/serial
223 - vagrant/definitions/tails-builder/config/APT_snapshots.d/*/serial
225 .install-https-get-expired-build-deps: &install-https-get-expired-build-deps
226 - apt-get -qy install --no-install-recommends golang-go ca-certificates
228 .build-https-get-expired: &build-https-get-expired
229 - go build -o ./https-get-expired config/chroot_local-includes/usr/src/https-get-expired.go
231 .test-https-get-expired: &test-https-get-expired
232 - echo "Basic check:"
233 - ./https-get-expired -reject-expired https://tails.boum.org/
234 - echo "Let's pretend we are in the past. Then, this certificate is still good."
235 - ./https-get-expired -current-time 2000-01-01 -reject-expired https://tails.boum.org/
236 - echo "Let's pretend we are in the future. Then, this certificate is expired"
237 - "! ./https-get-expired -current-time 2090-01-01 -reject-expired https://tails.boum.org/"
238 - "! ./https-get-expired -reject-expired https://wrong.host.badssl.com/"
239 - "! ./https-get-expired -reject-expired https://self-signed.badssl.com/"
240 - "! ./https-get-expired -reject-expired https://untrusted-root.badssl.com/"
241 - "! ./https-get-expired -reject-expired https://expired.badssl.com/"
242 - echo "Invalid host"
243 - "! ./https-get-expired -reject-expired https://nxdomain.tails.boum.org/"
244 - "( . 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; )"
248 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
251 - config/chroot_local-includes/usr/src/https-get-expired.go
252 - config/chroot_local-includes/etc/default/htpdate.pools
254 - *install-https-get-expired-build-deps
255 - *build-https-get-expired
256 - *test-https-get-expired
258 https-get-expired-sid:
259 # this job gives us results using a future version of Golang compared to the one we actually use
262 - if: '$CI_COMMIT_BRANCH == "devel"'
265 - config/chroot_local-includes/usr/src/https-get-expired.go
266 - config/chroot_local-includes/etc/default/htpdate.pools
268 - *install-https-get-expired-build-deps
269 - *build-https-get-expired
270 - *test-https-get-expired