[tor-commits] [manual/translations] improve caching & use docker python image to save resources
emmapeel at torproject.org
emmapeel at torproject.org
Fri Apr 23 14:48:27 UTC 2021
commit 909801037f181362a6bf2dd8f76511a3f4cc5289
Author: emma peel <emma.peel at riseup.net>
Date: Fri Apr 23 14:48:12 2021 +0000
improve caching & use docker python image to save resources
---
.gitlab-ci.yml | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c75112e..793628c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,15 +1,28 @@
-image: debian:buster-slim
+image: python:3.9-slim-buster
+
+cache:
+ key: ${CI_COMMIT_REF_SLUG}
+ paths:
+ - .cache/pip
+ - venv/
+ - i18n
+ - lego
+
+variables:
+ GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- test
+ - deploy
pages:
stage: build
- script:
+ before_script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends gettext python3-babel python3-pip git python3-inifile python3-dev python3-setuptools python3-venv python3-openssl python3-cryptography i18nspector -y
- - pip3 install babel
+ - virtualenv venv
+ - source venv/bin/activate
- pip3 install wheel
- pip3 install lektor
- echo 'checking out translations'
@@ -21,6 +34,7 @@ pages:
- git clone https://git.torproject.org/project/web/lego.git lego
- cd lego && git checkout master && git pull && cd ..
- rm -rf public
+ script:
- echo 'building lektor 3 times to get translations in place'
- lektor build --output-path public && lektor build --output-path public && lektor build --output-path public
- git clone https://gitlab.torproject.org/tpo/community/l10n.git
More information about the tor-commits
mailing list