From e15e61fe3586dbf77608b3bec7889fc913b3eb28 Mon Sep 17 00:00:00 2001
From: Konrad Botor <kbotor@syncad.com>
Date: Wed, 7 Dec 2022 11:11:56 +0100
Subject: [PATCH] Fixed artifact expiration

---
 .gitlab-ci.yml                          |  1 +
 templates/data_image_jobs.gitlab-ci.yml |  2 +-
 templates/test_jobs.gitlab-ci.yml       | 11 +++++------
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 77a745c..92a0108 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -23,6 +23,7 @@ include:
   artifacts:
     name: validation-results
     when: always
+    expire_in: 6 hours
   tags:
     - public-runner-docker
 
diff --git a/templates/data_image_jobs.gitlab-ci.yml b/templates/data_image_jobs.gitlab-ci.yml
index 8745b8c..af63a02 100644
--- a/templates/data_image_jobs.gitlab-ci.yml
+++ b/templates/data_image_jobs.gitlab-ci.yml
@@ -25,7 +25,6 @@ variables:
   script:
     - echo "Attempting to cleanup an image $IMAGE_PATH using tag $IMAGE_TAG from $REGISTRY"
     - python /delete-image.py "$REGISTRY_PASS" "$CI_PROJECT_ID" "$IMAGE_PATH" "$IMAGE_TAG"
-
   when: always
 
 .prepare_data_5m_image:
@@ -53,6 +52,7 @@ variables:
     paths:
       - ./hived-mainnet-binaries/*
     expire_in: 6 hours
+    when: always
 
 .prepare_hived_data_5m_image:
   extends: .prepare_data_5m_image
diff --git a/templates/test_jobs.gitlab-ci.yml b/templates/test_jobs.gitlab-ci.yml
index 49fadba..600be3c 100644
--- a/templates/test_jobs.gitlab-ci.yml
+++ b/templates/test_jobs.gitlab-ci.yml
@@ -2,15 +2,12 @@ variables:
   BENCHMARK_IMAGE_TAG: "latest"
   TOX_IMAGE_TAG: "latest"
 
-.artifact_config:
+.jmeter_benchmark_job:
+  image: registry.gitlab.syncad.com/hive/common-ci-configuration/benchmark-test-runner:${BENCHMARK_IMAGE_TAG}
   artifacts:
     when: always
     expire_in: 6 hours
 
-.jmeter_benchmark_job:
-  image: registry.gitlab.syncad.com/hive/common-ci-configuration/benchmark-test-runner:${BENCHMARK_IMAGE_TAG}
-  artifacts: !reference [.artifact_config, artifacts]
-
 .jmeter_benchmark_with_haf_job:
   extends: .jmeter_benchmark_job
   services:
@@ -24,7 +21,9 @@ variables:
 
 .tox_test_job:
   image: registry.gitlab.syncad.com/hive/common-ci-configuration/tox-test-runner:${TOX_IMAGE_TAG}
-  artifacts: !reference [.artifact_config, artifacts]
+  artifacts:
+    when: always
+    expire_in: 6 hours
 
 .pattern_tests:
   extends: .tox_test_job
-- 
GitLab