[tor-commits] [manual/master] less build time, we dont need to build the l10n tests page so much

emmapeel at torproject.org emmapeel at torproject.org
Tue Nov 2 20:42:51 UTC 2021


commit 32825581f058f61687269ae3c2f9580cf6215ad8
Author: emma peel <emma.peel at riseup.net>
Date:   Tue Nov 2 21:41:18 2021 +0100

    less build time, we dont need to build the l10n tests page so much
---
 .gitlab-ci.yml | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c62b4b9..35e1548 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -58,16 +58,15 @@ pages:
   stage: build
   script:
     - *apt-template
-    - DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel python3-pip git python3-inifile python3-dev python3-setuptools python3-openssl python3-cryptography i18nspector apt-utils ca-certificates -y
+    - DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-babel python3-pip  python3-inifile python3-dev python3-setuptools python3-openssl python3-cryptography -y
     - pip3 install virtualenv
     - virtualenv venv
     - source venv/bin/activate
     - pip3 install lektor
     - echo 'checking out translations'
     - rm -rf i18n
-    - git clone --branch $TRANSLATION_BRANCH https://git.torproject.org/translation.git i18n
+    - git clone --branch $TRANSLATION_BRANCH --depth=1 https://git.torproject.org/translation.git i18n
     - echo 'reinstall lektor plugins'
-    - lektor project-info --output-path
     - lektor plugins reinstall
     - echo 'building lektor 3 more times to get translations in place'
     - lektor build --output-path public && lektor build --output-path public && lektor build --output-path public
@@ -76,7 +75,10 @@ pages:
       - public
       - i18n
   rules:
-    - when: always
+    - if: $TRANSLATION_BRANCH
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+    - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
+      when: never
 
 new_strings:
   cache:
@@ -87,17 +89,18 @@ new_strings:
       - apt-cache
       - venv
       - .cache/pip
-
   stage: test_l10n
   needs: [pages]
   allow_failure: true
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
-
+    - if: '$CI_COMMIT_BRANCH == "translations"'
+    - if: '$CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS'
+      when: never
   script:
     - *apt-template
-    - DEBIAN_FRONTEND=noninteractive apt-get install gettext git python3-dev python3-setuptools i18nspector python3-polib python3-requests ca-certificates apt-utils -y
+    - DEBIAN_FRONTEND=noninteractive apt-get install gettext  python3-dev python3-setuptools i18nspector python3-polib python3-requests -y
     - git clone --depth=1 https://gitlab.torproject.org/tpo/community/l10n.git
     - echo 'lets see if there are any UPDATES ON THE STRINGS for translation after this changes'
     - l10n/bin/check_po_status.py $TRANSLATION_BRANCH
@@ -123,7 +126,8 @@ l10n_QA:
     - translations
   script:
     - *apt-template
-    - DEBIAN_FRONTEND=noninteractive apt-get install gettext i18nspector python3-polib ca-certificates -y
+    - DEBIAN_FRONTEND=noninteractive apt-get install gettext python3-polib -y
+    - echo '==START Translations QA=='
     - rm -rf l10n
     - git clone --depth=1 https://gitlab.torproject.org/tpo/community/l10n.git
     - echo 'lets see if there are any BROKEN LINKS on the translations'
@@ -135,5 +139,4 @@ build_tests_page:
   trigger: tpo/community/l10n
   rules:
     - changes:
-      - content/**/*.lr
       - i18n/contents.pot





More information about the tor-commits mailing list