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
42 ruff-lint-changed-files:
49 - apt-get -qy install ruff findutils git python3
51 - git fetch origin "${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:?}"
52 - ./bin/test-utils/ruff "origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:?}" check --output-format=junit --output-file=ruff.xml
58 ruff-format-changed-files:
65 - apt-get -qy install ruff findutils git python3
67 - git fetch origin "${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:?}"
68 - ./bin/test-utils/ruff "origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:?}" format --check
70 check-website-core-pages:
72 - apt-get -qy install git
73 - ./bin/check-core-pages
77 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
82 - apt-get -qy install python3 gettext
83 - ./bin/check-po-msgfmt
87 - if: '$CI_COMMIT_BRANCH =~ /^master|stable|testing|devel$/'
92 - apt-get -qy install git ruby
93 - ./bin/sanity-check-website
95 check-translatable-live-website-urls:
97 - apt-get -qy install python3-polib
98 - ./bin/check-translatable-live-website-urls po/tails.pot
100 check-locale-descriptions:
102 - apt-get -qy install python3 python3-requests python3-toml python3-bs4
103 - echo 'If this fails, look at https://tails.net/contribute/release_process/update_locale_descriptions/'
104 - ./bin/locale-descriptions suggest
107 image: debian:bookworm
109 - apt-get -qy install rubocop
111 - rubocop --format junit --out rubocop.xml --format markdown
119 - if: '$CI_COMMIT_BRANCH != "master"'
121 - './bin/test-utils/test-iuk'
125 - if: '$CI_COMMIT_BRANCH != "master"'
127 - 'cat config/chroot_local-packageslists/tails-perl5lib.list
129 | xargs apt-get -qy install'
130 - 'apt-get -qy install
132 libdist-zilla-plugin-test-notabs-perl
133 libdist-zilla-plugin-test-perl-critic-perl
134 libdist-zilla-app-command-authordebs-perl
137 - apt-get update -qq # Take into account APT configuration added by apt-file
138 # Otherwise, apt-get called by "dzil authordebs --install" asks confirmation
139 - echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/yes
140 - cd $CI_PROJECT_DIR/config/chroot_local-includes/usr/src/perl5lib
141 - dzil authordebs --install
145 image: debian:testing
147 - apt-get -qy install python3 shellcheck xmlstarlet git
148 - shellcheck --version
149 - 'git ls-files -z | ./bin/test-utils/is-file-type filter --zero shell | xargs --verbose --no-run-if-empty -0 shellcheck --format=checkstyle
150 | xmlstarlet tr config/ci/shellcheck/checkstyle2junit.xslt
155 junit: shellcheck.xml
157 test-persistent-storage-config-file:
159 - apt-get -qy install python3 python3-gi acl
160 - config/chroot_local-includes/usr/lib/python3/dist-packages/tps/configuration/config_file_test.py
164 - apt-get -qy install python3 python3-sh python3-toml python3-requests python3-bs4
165 - config/chroot_local-includes/usr/local/lib/tails-gdm-error-message doctest --verbose
166 - env PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages python3 config/chroot_local-includes/usr/local/bin/tails-documentation --doctest
167 - ./bin/locale-descriptions doctest
171 - if: '$CI_COMMIT_BRANCH != "master"'
173 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
175 | xargs apt-get -qy install'
176 - 'cd config/chroot_local-includes/usr/lib/python3/dist-packages ; find tca -name "*.py" -print0 | xargs -0 -L1 env PYTHONPATH=. python3 -m doctest'
180 - if: '$CI_COMMIT_BRANCH != "master"'
182 - 'cat config/chroot_local-packageslists/tor-connection-assistant.list
184 | xargs apt-get -qy install'
185 - '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'
190 - if: '$CI_COMMIT_BRANCH != "master"'
192 - apt-get -qy install python3 python3-atomicwrites python3-sh python3-gi git
193 - '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'
197 - if: '$CI_COMMIT_BRANCH != "master"'
199 - 'cat config/chroot_local-packageslists/whisperback.list | grep -E -v "^#"
200 | xargs apt-get -qy install'
201 - apt-get -qy install python3-pytest
202 - 'PYTHONPATH=config/chroot_local-includes/usr/lib/python3/dist-packages
203 pytest-3 --verbose --junit-xml=report.xml
204 config/chroot_local-includes/usr/lib/python3/dist-packages/whisperBack/test.py'
210 apt-snapshots-expiry:
212 - apt-get -qy install curl git
213 - ./bin/apt-snapshots-expiry
215 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
218 - config/APT_snapshots.d/*/serial
219 - vagrant/definitions/tails-builder/config/APT_snapshots.d/*/serial
221 .install-https-get-expired-build-deps: &install-https-get-expired-build-deps
222 - apt-get -qy install --no-install-recommends golang-go ca-certificates
224 .build-https-get-expired: &build-https-get-expired
225 - go build -o ./https-get-expired config/chroot_local-includes/usr/src/https-get-expired.go
227 .test-https-get-expired: &test-https-get-expired
228 - echo "Basic check:"
229 - ./https-get-expired -reject-expired https://tails.net/
230 - echo "Let's pretend we are in the past. Then, this certificate is still good."
231 - ./https-get-expired -current-time 2000-01-01 -reject-expired https://tails.net/
232 - echo "Let's pretend we are in the future. Then, this certificate is expired"
233 - "! ./https-get-expired -current-time 2090-01-01 -reject-expired https://tails.net/"
234 - "! ./https-get-expired -reject-expired https://wrong.host.badssl.com/"
235 - "! ./https-get-expired -reject-expired https://self-signed.badssl.com/"
236 - "! ./https-get-expired -reject-expired https://untrusted-root.badssl.com/"
237 - "! ./https-get-expired -reject-expired https://expired.badssl.com/"
238 - echo "Invalid host"
239 - "! ./https-get-expired -reject-expired https://nxdomain.tails.net/"
240 - "./bin/test-utils/https-get-expired-test-all"
244 - if: '$CI_COMMIT_BRANCH =~ /^stable|testing|devel$/'
247 - config/chroot_local-includes/usr/src/https-get-expired.go
248 - config/chroot_local-includes/etc/default/htpdate.pools
250 - *install-https-get-expired-build-deps
251 - *build-https-get-expired
252 - *test-https-get-expired
254 https-get-expired-sid:
255 # this job gives us results using a future version of Golang compared to the one we actually use
258 - if: '$CI_COMMIT_BRANCH == "devel"'
261 - config/chroot_local-includes/usr/src/https-get-expired.go
262 - config/chroot_local-includes/etc/default/htpdate.pools
264 - *install-https-get-expired-build-deps
265 - *build-https-get-expired
266 - *test-https-get-expired