From 0ec7f1d61d7a8a17ddb79ba3589f950c53c4a44e Mon Sep 17 00:00:00 2001
From: Bastien Le Querrec <blq@laquadrature.net>
Date: Thu, 28 Mar 2024 14:51:12 +0100
Subject: [PATCH] =?UTF-8?q?ci:=20utilise=20le=20cache=20au=20lieu=20de=20l?=
 =?UTF-8?q?'art=C3=A9fact=20pour=20conserver=20les=20r=C3=A9sultats=20des?=
 =?UTF-8?q?=20pr=C3=A9c=C3=A9dentes=20analyses?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .gitlab-ci.yml | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9767491..2216434 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -75,24 +75,25 @@ pep8:
   - unprivileged
   needs: [install]
   script:
-  - curl --location --output artifacts.zip "${CI_SERVER_PROTOCOL}://${CI_SERVER_HOST}:${CI_SERVER_PORT}/api/v4/projects/${CI_PROJECT_ID}/jobs/artifacts/${CI_COMMIT_BRANCH}/download?job=${CI_JOB_NAME}&job_token=${CI_JOB_TOKEN}" || true
-  - unzip -q artifacts.zip data/"${PREF}"/* || true
-  - rm artifacts.zip || true
   - source bin/activate
+  - pip install --upgrade -r requirements.txt
   - /etc/init.d/tor start
   - python ./cli.py --pref "${PREF}"
   retry: 2
   cache:
-    key: $CI_COMMIT_REF_SLUG
+    key: $CI_COMMIT_REF_SLUG-$CI_JOB_NAME_SLUG
+    fallback_keys:
+    - $CI_COMMIT_REF_SLUG
     paths:
     - bin/
     - lib/
     - pyvenv.cfg
+    - data/${PREF}/*.txt
   artifacts:
     paths:
     - data/${PREF}/*.txt
     - output_${PREF}.log
-    expire_in: 1 week
+    expire_in: 2 days
   rules:
     - if: $CI_PIPELINE_SOURCE == "schedule" && $COMPILE_DOCKER == null
 
-- 
GitLab