[gimp/wip/schumaml/crossraods-optimization: 310/311] gitlab-ci: introduce variables for expiry times




commit 8193f8ab94c4111846bed71b3509466b14aa9dbe
Author: Michael Schumacher <schumaml gmx de>
Date:   Thu Dec 10 02:01:20 2020 +0100

    gitlab-ci: introduce variables for expiry times
    
    Helps to cut down storage consumption for experimental branches by lowering the values from their 
defaults.

 .gitlab-ci.yml | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a9ba951b31..eabd03fce0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,7 +12,9 @@ variables:
   INSTALL_DIR: "_install"
   INSTALL_PREFIX: "${CI_PROJECT_DIR}/${INSTALL_DIR}"
   APT_CACHE: "${CI_PROJECT_DIR}/apt-cache"
-
+  ARTIFACT_EXPIRY_DEPS: "2 hours"
+  ARTIFACT_EXPIRY_GIMP: "2 hours"
+  
 ## prepare docker images ##
 
 build-image:
@@ -72,7 +74,7 @@ deps-debian:
     paths:
     - apt-cache
   artifacts:
-    expire_in: 2 hours
+    expire_in: ${ARTIFACT_EXPIRY_DEPS}
     when: always
     paths:
     - "${INSTALL_DIR}"
@@ -106,7 +108,7 @@ deps-debian:
     paths:
     - apt-cache
   artifacts:
-    expire_in: 1 days
+    expire_in: ${ARTIFACT_EXPIRY_GIMP}
     when: always
     name: "app-build-${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     paths:
@@ -188,8 +190,8 @@ deps-win64:
   script:
     - export PATH="/usr/local/bin:$PATH"
     - mkdir _deps && cd _deps
-    - git clone --depth 1 https://gitlab.gnome.org/GNOME/babl.git
-    - git clone --depth 1 https://gitlab.gnome.org/GNOME/gegl.git
+    - git clone --depth ${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git
+    - git clone --depth ${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git
     - cd babl
     - echo 'crossroad meson _build/ -Denable-gir=false -Dlibdir=lib --prefix=$PREFIX' | crossroad w64 gimp 
--run="-"
     - echo 'ninja -C _build install' | crossroad w64 gimp --run="-"
@@ -201,7 +203,7 @@ deps-win64:
   artifacts:
     name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
-    expire_in: 2 hours
+    expire_in: ${ARTIFACT_EXPIRY_DEPS}
     paths:
       - .local/
       - _deps/
@@ -238,7 +240,7 @@ gimp-win64:
   artifacts:
     name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
-    expire_in: 1 day
+    expire_in: ${ARTIFACT_EXPIRY_GIMP}
     paths:
       - _build/
       - gimp-prefix/
@@ -264,8 +266,8 @@ deps-win32:
   script:
     - export PATH="`pwd`/.local/bin:$PATH"
     - mkdir _deps && cd _deps
-    - git clone --depth 1 https://gitlab.gnome.org/GNOME/babl.git
-    - git clone --depth 1 https://gitlab.gnome.org/GNOME/gegl.git
+    - git clone --depth ${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git
+    - git clone --depth ${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gegl.git
     - cd babl
     - echo 'crossroad meson _build/ -Denable-gir=false -Dlibdir=lib --prefix=$PREFIX' | crossroad w32 gimp 
--run="-"
     - echo 'ninja -C _build install' | crossroad w32 gimp --run="-"
@@ -277,7 +279,7 @@ deps-win32:
   artifacts:
     name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
-    expire_in: 2 hours
+    expire_in: ${ARTIFACT_EXPIRY_DEPS}
     paths:
       - .local/
       - _deps/
@@ -314,7 +316,7 @@ gimp-win32:
   artifacts:
     name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
     when: always
-    expire_in: 1 day
+    expire_in: ${ARTIFACT_EXPIRY_GIMP}
     paths:
       - _build/
       - gimp-prefix/
@@ -331,7 +333,7 @@ cppcheck:
     - cppcheck-htmlreport --source-dir=. --title=gimp --file=cppcheck.xml --report-dir=report
   artifacts:
     name: "${CI_JOB_NAME}-${CI_COMMIT_REF_SLUG}"
-    expire_in: 1 week
+    expire_in: ${ARTIFACT_EXPIRY_GIMP}
     when: always
     paths:
       - report
@@ -346,7 +348,7 @@ sources:
   artifacts:
     name: "GIMP-sources-${CI_COMMIT_SHORT_SHA}"
     when: always
-    expire_in: 2 days
+    expire_in: ${ARTIFACT_EXPIRY_GIMP}
     paths:
     - gimp-*.tar.*
     - SHA256SUMS
@@ -365,7 +367,7 @@ win64-nightly:
   artifacts:
     name: "GIMP-Win64-CI-${CI_COMMIT_SHORT_SHA}"
     when: always
-    expire_in: 2 days
+    expire_in: ${ARTIFACT_EXPIRY_GIMP}
     paths:
     - gimp-w64
   script:
@@ -442,7 +444,7 @@ win32-nightly:
   artifacts:
     name: "GIMP-Win32-${CI_COMMIT_SHORT_SHA}"
     when: always
-    expire_in: 2 days
+    expire_in: ${ARTIFACT_EXPIRY_GIMP}
     paths:
     - gimp-w32
   script:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]