Skip to content
Snippets Groups Projects
Verified Commit 7d1b1793 authored by Beatriz Rizental's avatar Beatriz Rizental Committed by Pier Angelo Vendrame
Browse files

Add CI for Tor Browser

parent 8654ef3c
Branches
Tags
1 merge request!1061Bug 42998: Rebased stable onto 115.14.0esr
stages:
- lint
- update-translations
include:
- local: '.gitlab/ci/lint.yml'
- local: '.gitlab/ci/update-translations.yml'
.update-translation-base:
stage: update-translations
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- "**/*.ftl"
- "**/*.properties"
- "**/*.dtd"
- if: $FORCE_UPDATE_TRANSLATIONS == "true"
variables:
TOR_BROWSER_COMBINED_FILES_JSON: "combined-translation-files.json"
combine-en-US-translations:
extends: .update-translation-base
image: python
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
TRANSLATION_FILES: '
tor-browser:tor-browser.ftl
tor-browser:aboutDialog.dtd
tor-browser:aboutTBUpdate.dtd
tor-browser:aboutTor.dtd
tor-browser:torbutton.dtd
tor-browser:browserOnboarding.properties
tor-browser:cryptoSafetyPrompt.properties
tor-browser:onboarding.properties
tor-browser:onionLocation.properties
tor-browser:rulesets.properties
tor-browser:settings.properties
tor-browser:torbutton.properties
tor-browser:torConnect.properties
tor-browser:torlauncher.properties
base-browser:base-browser.ftl
base-browser:newIdentity.properties
base-browser:securityLevel.properties
'
cache:
paths:
- .cache/pip
# Artifact is for translation project job
artifacts:
paths:
- "$TOR_BROWSER_COMBINED_FILES_JSON"
expire_in: "60 min"
reports:
dotenv: job_id.env
# Don't load artifacts for this job.
dependencies: []
script:
# Save this CI_JOB_ID to the dotenv file to be used in the variables for the
# push-en-US-translations job.
- echo 'COMBINE_TRANSLATIONS_JOB_ID='"$CI_JOB_ID" >job_id.env
- pip install compare_locales
- python ./tools/torbrowser/l10n/combine-translation-versions.py "$CI_COMMIT_BRANCH" "$TRANSLATION_FILES" "$TOR_BROWSER_COMBINED_FILES_JSON"
push-en-US-translations:
extends: .update-translation-base
needs:
- job: combine-en-US-translations
variables:
TOR_BROWSER_COMBINED_FILES_JSON_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs/${COMBINE_TRANSLATIONS_JOB_ID}/artifacts/${TOR_BROWSER_COMBINED_FILES_JSON}"
trigger:
strategy: depend
project: tor-browser-translation-bot/translation
branch: tor-browser-ci
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment