bedrock/.gitlab-ci.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

102 строки
1.4 KiB
YAML
Исходник Обычный вид История

variables:
CLUSTER_NAME: iowa-a
CONFIG_REPO: git@github.com:mozmeao/www-config
CONFIG_BRANCH: main
stages:
- build
- update-config
build:
stage: build
only:
- main
- stage
- prod
tags:
- mozmeao
- aws
script:
- bin/build-release-image.sh --push
- bin/upload-staticfiles.sh
2020-05-26 16:47:58 +03:00
retry: 2
build-test:
stage: build
only:
- run-integration-tests
tags:
- mozmeao
- aws
script:
- bin/build-release-image.sh --push
2020-05-26 16:47:58 +03:00
retry: 2
update-l10n:
stage: update-config
tags:
- mozmeao
- aws
only:
changes:
- "l10n/**/*"
refs:
- main
script:
Lay in Pocket l10n workflow support (#11576) * [Tiny] Improve error messaging if git repo interaction fails * Override the Fluent repo-related config in Pocket mode Note that for Pocket mode, we don't need an intermediary mozmeao/* repo to hold the translations while we calculate activation metadata via a CI task (which does happen for Mozorg). Why? All locales in Pocket should be 100% ready to go, because they are translated by a vendor, whereas Mozorg has community translation contributions as well, which aren't always exhaustive. As a result, both FLUENT_REPO and FLUENT_L10N_TEAM_REPO point to the same repo * Update Bedrock CI step to try to open a PR against the l10n repo ...if there are changes to the l10n files. Note that we try to update both www-l10n (Mozorg) and pocket-www-l10n (Pocket) each time it's run, with the plan that if it's run against an irrelevant repo no changes will be detected, even though it's running twice (This may need tweaking once it's running in CI properly, of course) * Update settings.get_dev_languages to take params, to make re-use elsewhere easier * Initial pass at setting up DEV and PROD languages for Pocket mode * Ensure Pocket always uses all available production langs All locales in Pocket should be 100% ready to go, because they are translated by a vendor, whereas Mozorg has community translation contributions as well, which aren't always exhaustive. * Wind back "Update settings.get_dev_languages to take params, to make re-use elsewhere easier" This reverts some of the work done in c653640ae56cf21e961c461a421d6dd5fa54efcd. * Make DEV_LANGUAGES the same as PROD_LANGUAGES as there's no need not to * Ensure Pocket-related l10n files are copied into Dockerimage during build * Make the l10n_update command pull from both Mozorg and Pocket Fluent repos * Split out pocket-l10n PR step in CI, so that Mozorg and Pocket steps run separately * Update LANGUAGE_CODE for Pocket mode to be just 'en' * Update output messaging to help keep track of FTL updates * Nitfix: make env setting in Docker consistent * Tidy up l10n-related settings following code review * Nit: updating comments * Fixup: Add quotes around bash variable substitution * Tweak locale fallbacks * Update locale setup for Spanish, but more work needed Just noting some complexity to unpick here. getpocket.com/es-la/ exists, and so does getpocket.com/es/. However it is sounding like /es/ needs to use `es-ES` content from the vendor and /es-la/ needs to use `es` from the vendor. Also note that Pocket currently uses `/es-la/` not `/es-LA/` This all may require some extra wiring, as it feels like it's flipping over the behaviour we have in bedrock. * Move non-official es-la locale to FALLBACK_LOCALES * Drop es-MX, es-CL, es-AR from FALLBACK_LOCALES - unnecessary If the language_REGION locale string doesn't map to a specific locale, we try to map the two-letter locale, so we don't need the variant locales for es. * Drop unnecessary inclusion of en-* locale variants -- they'll fall back to /en/ fine without config
2022-05-11 13:32:38 +03:00
- SITE_MODE=Mozorg bin/open-ftl-pr.sh
retry: 2
update-pocket-l10n:
stage: update-config
tags:
- mozmeao
- aws
only:
changes:
- "l10n-pocket/**/*"
refs:
- main
script:
- SITE_MODE=Pocket bin/open-ftl-pr.sh
2020-05-26 16:47:58 +03:00
retry: 2
.update-config:
stage: update-config
tags:
- mozmeao
- aws
script:
- bin/update_config.sh
2020-05-26 16:47:58 +03:00
retry: 2
dev:
extends: .update-config
only:
- main
variables:
NAMESPACE: bedrock-dev
stage:
extends: .update-config
only:
- stage
variables:
CLUSTERS: iowa-a
NAMESPACE: bedrock-stage
test:
extends: .update-config
only:
- run-integration-tests
variables:
CLUSTERS: iowa-a
NAMESPACE: bedrock-test
prod:
extends: .update-config
only:
- prod
variables:
CLUSTERS: mozmeao-fr iowa-a
NAMESPACE: bedrock-prod