4 - if: $CI_MERGE_REQUEST_IID
6 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
11 GET_SOURCES_ATTEMPTS: 10
14 - export DEBIAN_FRONTEND=noninteractive
17 .prepare-lint-po: &prepare-lint-po
18 - apt-get -qy install git i18nspector
19 - git clone https://gitlab.tails.boum.org/tails/jenkins-tools.git /tmp/jenkins-tools
23 - if: '$CI_COMMIT_BRANCH == "master"'
24 - if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"'
28 - apt-get -qy install ikiwiki po4a libyaml-perl libyaml-libyaml-perl libyaml-syck-perl perlmagick
34 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
40 - /tmp/jenkins-tools/slaves/lint_po
44 - apt-get -qy install python3-bandit file
46 - './bin/bandit-tree --configfile .bandit.yml
57 image: debian:bookworm
59 - apt-get -qy install black
70 - apt-get -qy install ruff findutils git
72 - git fetch origin "${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:?}"
73 - ./bin/test-utils/ruff HEAD "origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:?}" --output-format=junit --output-file=ruff.xml
79 check-website-core-pages:
81 - apt-get -qy install git
82 - ./bin/check-core-pages
86 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
91 - apt-get -qy install python3 gettext
92 - ./bin/check-po-msgfmt
96 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
101 - apt-get -qy install git ruby
102 - ./bin/sanity-check-website
104 check-translatable-live-website-urls:
106 - apt-get -qy install python3-polib
107 - ./bin/check-translatable-live-website-urls po/tails.pot
109 check-locale-descriptions:
111 - apt-get -qy install python3 python3-requests python3-toml python3-bs4
112 - echo 'If this fails, look at https://tails.net/contribute/release_process/update_locale_descriptions/'
113 - ./bin/locale-descriptions suggest
116 image: debian:bookworm
118 - apt-get -qy install rubocop
120 - rubocop --format junit --out rubocop.xml --format markdown
128 - if: '$CI_COMMIT_BRANCH != "master"'
130 - './bin/test-utils/test-iuk'
134 - if: '$CI_COMMIT_BRANCH != "master"'
136 - 'cat config/chroot_local-packageslists/tails-perl5lib.list
138 | xargs apt-get -qy install'
139 - 'apt-get -qy install
141 libdist-zilla-plugin-test-notabs-perl
142 libdist-zilla-plugin-test-perl-critic-perl
143 libdist-zilla-app-command-authordebs-perl
146 - apt-get update -qq # Take into account APT configuration added by apt-file
147 # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
148 - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
149 - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib
150 - dzil authordebs --install
154 image: debian:testing
156 - apt-get -qy install python3 shellcheck xmlstarlet git
157 - shellcheck --version
158 - 'git ls-files -z | ./bin/test-utils/is-file-type filter --zero shell | xargs --verbose --no-run-if-empty -0 shellcheck --format=checkstyle
159 | xmlstarlet tr config/ci/shellcheck/checkstyle2junit.xslt
164 junit: shellcheck.xml
166 test-persistent-storage-config-file:
168 - apt-get -qy install python3 python3-gi acl
169 - config/chroot_local-includes/usr/lib/python3/dist-packages/tps/configuration/config_file_test.py
173 - apt-get -qy install python3 python3-sh python3-toml python3-requests python3-bs4
174 - config/chroot_local-includes/usr/local/lib/tails-gdm-error-message doctest --verbose
175 - env PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages python3 config/chroot_local-includes/usr/local/bin/tails-documentation --doctest
176 - ./bin/locale-descriptions doctest
180 - if: '$CI_COMMIT_BRANCH != "master"'
182 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
184 | xargs apt-get -qy install'
185 - 'cd config/chroot_local-includes/usr/lib/python3/dist-packages ; find tca -name "*.py" -print0 | xargs -0 -L1 env PYTHONPATH=. python3 -m doctest'
189 - if: '$CI_COMMIT_BRANCH != "master"'
191 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
193 | xargs apt-get -qy install'
194 - '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'
199 - if: '$CI_COMMIT_BRANCH != "master"'
201 - apt-get -qy install python3 python3-atomicwrites python3-sh python3-gi git
202 - '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'
206 - if: '$CI_COMMIT_BRANCH != "master"'
208 - 'cat config/chroot_local-packageslists/whisperback.list | grep -E -v "^#"
209 | xargs apt-get -qy install'
210 - apt-get -qy install python3-pytest
211 - 'PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages
212 pytest-3 --verbose --junit-xml=report.xml
213 config/chroot_local-includes/usr/lib/python3/dist-packages/whisperBack/test.py'
219 apt-snapshots-expiry:
221 - apt-get -qy install curl git
222 - ./bin/apt-snapshots-expiry
224 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
227 - config/APT_snapshots.d/*/serial
228 - vagrant/definitions/tails-builder/config/APT_snapshots.d/*/serial
230 .install-https-get-expired-build-deps: &install-https-get-expired-build-deps
231 - apt-get -qy install --no-install-recommends golang-go ca-certificates
233 .build-https-get-expired: &build-https-get-expired
234 - go build -o ./https-get-expired config/chroot_local-includes/usr/src/https-get-expired.go
236 .test-https-get-expired: &test-https-get-expired
237 - echo "Basic check:"
238 - ./https-get-expired -reject-expired https://tails.net/
239 - echo "Let's pretend we are in the past. Then, this certificate is still good."
240 - ./https-get-expired -current-time 2000-01-01 -reject-expired https://tails.net/
241 - echo "Let's pretend we are in the future. Then, this certificate is expired"
242 - "! ./https-get-expired -current-time 2090-01-01 -reject-expired https://tails.net/"
243 - "! ./https-get-expired -reject-expired https://wrong.host.badssl.com/"
244 - "! ./https-get-expired -reject-expired https://self-signed.badssl.com/"
245 - "! ./https-get-expired -reject-expired https://untrusted-root.badssl.com/"
246 - "! ./https-get-expired -reject-expired https://expired.badssl.com/"
247 - echo "Invalid host"
248 - "! ./https-get-expired -reject-expired https://nxdomain.tails.net/"
249 - "./bin/test-utils/https-get-expired-test-all"
253 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
256 - config/chroot_local-includes/usr/src/https-get-expired.go
257 - config/chroot_local-includes/etc/default/htpdate.pools
259 - *install-https-get-expired-build-deps
260 - *build-https-get-expired
261 - *test-https-get-expired
263 https-get-expired-sid:
264 # this job gives us results using a future version of Golang compared to the one we actually use
267 - if: '$CI_COMMIT_BRANCH == "devel"'
270 - config/chroot_local-includes/usr/src/https-get-expired.go
271 - config/chroot_local-includes/etc/default/htpdate.pools
273 - *install-https-get-expired-build-deps
274 - *build-https-get-expired
275 - *test-https-get-expired