[manual/translations] add apt cache from tor gitlabci, thanks!

commit 17868516b3fe45c814d1e9b2bb8d7e032a4c2366 Author: emma peel <emma.peel@riseup.net> Date: Sun Apr 25 07:24:26 2021 +0000 add apt cache from tor gitlabci, thanks! --- .gitlab-ci.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c6b097..2f728f1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,18 +3,37 @@ image: python:3.9-slim-buster cache: key: $CI_PROJECT_PATH_SLUG.${CI_COMMIT_REF_SLUG} paths: - - .cache/pip - packages - venv - i18n - lego + - apt-cache + +# This template should be usable on any system that's based on apt. +# taken from tor gitlabci + +.apt-template: &apt-template | + export LC_ALL=C.UTF-8 + echo Etc/UTC > /etc/timezone + mkdir -p apt-cache + export APT_CACHE_DIR="$(pwd)/apt-cache" + echo 'quiet "1";' \ + 'APT::Install-Recommends "0";' \ + 'APT::Install-Suggests "0";' \ + 'APT::Acquire::Retries "20";' \ + 'APT::Get::Assume-Yes "true";' \ + 'Dpkg::Use-Pty "0";' \ + "Dir::Cache::Archives \"${APT_CACHE_DIR}\"; " \ + >> /etc/apt/apt.conf.d/99gitlab + apt-get update -qq + apt-get upgrade -qy variables: GIT_SUBMODULE_STRATEGY: recursive 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-openssl python3-cryptography i18nspector -y + - *.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 -y - pip3 install virtualenv - virtualenv venv - source venv/bin/activate
participants (1)
-
emmapeel@torproject.org