From 7809e008cc559938a35a8b7279c5451edfd8804f Mon Sep 17 00:00:00 2001
From: Patrick MADELA <patrick.madela@synchrotron-soleil.fr>
Date: Mon, 5 Dec 2022 11:08:50 +0100
Subject: [PATCH] Update to cmake 3.25.1 and remove specific build for CentOS 7

---
 .gitlab-ci.yml | 65 ++++++++++++++++----------------------------------
 README.md      |  7 +++---
 2 files changed, 23 insertions(+), 49 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cb3f7a0..b605b87 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,13 @@
 
 variables:
   PREBUILD_CMAKE_VERSION: 3.18.2
-  CMAKE_VERSION: 3.24.2
+  CMAKE_VERSION: 3.25.1
+
+workflow:
+  rules:
+    - if: $CI_PIPELINE_SOURCE == "schedule"
+    - if: $CI_PIPELINE_SOURCE == "web"
+    - if: $CI_COMMIT_TAG
 
 stages:
   - prebuild
@@ -61,66 +67,35 @@ stages:
     - zip -r --symlinks ../${NAME}.zip *
     - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ../${NAME}.zip "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/cmake/${CMAKE_VERSION}/"'
 
-prebuild-el6-i686:
+prebuild-i686:
   extends: [".prebuild"]
   image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-docker-tools/dev-el6-gcc73-x86
   variables:
-    NAME: "cmake-${PREBUILD_CMAKE_VERSION}-linux-el6-i686"
+    NAME: "cmake-${PREBUILD_CMAKE_VERSION}-linux-i686"
     
-linux-el6-i686:
+linux-i686:
   extends: [".build"]
   image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-docker-tools/dev-el6-gcc73-x86
   variables:
-    PREBUILD_NAME: "cmake-${PREBUILD_CMAKE_VERSION}-linux-el6-i686"
-    NAME: "cmake-${CMAKE_VERSION}-linux-el6-i686"
+    PREBUILD_NAME: "cmake-${PREBUILD_CMAKE_VERSION}-linux-i686"
+    NAME: "cmake-${CMAKE_VERSION}-linux-i686"
   needs:
-    - prebuild-el6-i686
+    - prebuild-i686
 
-test-el6-i686:
+test-i686:
   extends: [".test"]
   image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-docker-tools/dev-el6-gcc73-x86
   variables:
-    NAME: "cmake-${CMAKE_VERSION}-linux-el6-i686"
+    NAME: "cmake-${CMAKE_VERSION}-linux-i686"
   needs:
-    - linux-el6-i686
+    - linux-i686
 
-package-el6-i686:
+package-i686:
   extends: [".package"]
   image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-docker-tools/dev-el6-gcc73-x86
   variables:
-    NAME: "cmake-${CMAKE_VERSION}-linux-el6-i686"
-  needs:
-    - linux-el6-i686
-    - test-el6-i686
-
-prebuild-el7-i686:
-  extends: [".prebuild"]
-  image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-docker-tools/dev-el7-gcc73-x86
-  variables:
-    NAME: "cmake-${PREBUILD_CMAKE_VERSION}-linux-el7-i686"
-
-linux-el7-i686:
-  extends: [".build"]
-  image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-docker-tools/dev-el7-gcc73-x86
-  variables:
-    PREBUILD_NAME: "cmake-${PREBUILD_CMAKE_VERSION}-linux-el7-i686"
-    NAME: "cmake-${CMAKE_VERSION}-linux-el7-i686"
+    NAME: "cmake-${CMAKE_VERSION}-linux-i686"
   needs:
-    - prebuild-el7-i686
+    - linux-i686
+    - test-i686
 
-test-el7-i686:
-  extends: [".test"]
-  image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-docker-tools/dev-el7-gcc73-x86
-  variables:
-    NAME: "cmake-${CMAKE_VERSION}-linux-el7-i686"
-  needs:
-    - linux-el7-i686
-
-package-el7-i686:
-  extends: [".package"]
-  image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-docker-tools/dev-el7-gcc73-x86
-  variables:
-    NAME: "cmake-${CMAKE_VERSION}-linux-el7-i686"
-  needs:
-    - linux-el7-i686
-    - test-el7-i686
diff --git a/README.md b/README.md
index 799058e..6c74ede 100644
--- a/README.md
+++ b/README.md
@@ -2,9 +2,8 @@
 
 Pipeline to build recent version of Cmake for our legacy CentOS 32 bits platform.
 
-Cmake provides independent 64 bits Linux distribution that works on CentOS 6 and 7 64 bits but they are not available for 32 bits:
-* https://cmake.org/files/v3.24.2/cmake-3.24.2-Linux-x86_64.tar.gz
+Cmake provides independent 64 bits Linux distribution that works on CentOS 6 64 bits but they are not available for 32 bits:
+* https://cmake.org/files/v3.25/cmake-3.25.1-linux-x86_64.tar.gz
 
 Allows to build Cmake for:
-* CentOS 6.10 32 bits: [cmake-3.24.2-linux-el6-i686.zip](https://gitlab.synchrotron-soleil.fr/software-control-system/devtools/cmake/-/jobs/artifacts/main/download?job=linux-el6-i686)
-* CentOS 7.9 32 bits: [cmake-3.24.2-linux-el7-i686.zip](https://gitlab.synchrotron-soleil.fr/software-control-system/devtools/cmake/-/jobs/artifacts/main/download?job=linux-el7-i686)
+* CentOS 6.10 32 bits: [cmake-3.25.1-linux-i686.zip](https://gitlab.synchrotron-soleil.fr/software-control-system/devtools/cmake/-/jobs/artifacts/3.25.1/download?job=linux-i686)
-- 
GitLab