Commit 8698c335 authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

circleci: Retire CentOS jobs

With CentOS reaching EOL at the end of the month and CentOS Stream 9
flaky packaging jobs, we don't need to keep them around. For el9 builds
we rely on the almalinux:9 image.
parent e73d6163
...@@ -123,7 +123,7 @@ jobs: ...@@ -123,7 +123,7 @@ jobs:
package: package:
parameters: parameters:
platform: platform:
description: the Linux distribution, with release, e.g. debian:buster, centos:7 description: the Linux distribution, with release, e.g. debian:buster, fedora:latest
type: string type: string
rclass: rclass:
description: the resource class to use, usually arm.medium or medium description: the resource class to use, usually arm.medium or medium
...@@ -163,20 +163,14 @@ jobs: ...@@ -163,20 +163,14 @@ jobs:
command: | command: |
mkdir -p packages mkdir -p packages
case "<< parameters.platform >>" in case "<< parameters.platform >>" in
debian:*|ubuntu:*) EXT=deb ;; debian:*|ubuntu:*) EXT=deb ;;
centos:*|fedora:*) EXT=rpm ;; almalinux:*|fedora:*) EXT=rpm ;;
almalinux:*) EXT=rpm ;; alpine:*) EXT=apk ;;
alpine:*) EXT=apk ;;
*) *)
echo "unrecognized platform: << parameters.platform >>" echo "unrecognized platform: << parameters.platform >>"
exit 1 exit 1
esac esac
case "<< parameters.platform >>" in
centos:stream9) REPO=quay.io/centos/ ;;
*) REPO= ;;
esac
case "<< parameters.rclass >>" in case "<< parameters.rclass >>" in
arm.*) ARCH=arm64 ;; arm.*) ARCH=arm64 ;;
*) ARCH=amd64 ;; *) ARCH=amd64 ;;
...@@ -190,7 +184,7 @@ jobs: ...@@ -190,7 +184,7 @@ jobs:
-e PARAM_RELEASE=$(echo "<< parameters.platform >>" | cut -d: -f2) \ -e PARAM_RELEASE=$(echo "<< parameters.platform >>" | cut -d: -f2) \
-v$(pwd):/varnish-cache \ -v$(pwd):/varnish-cache \
--platform linux/$ARCH \ --platform linux/$ARCH \
${REPO}<< parameters.platform >> \ << parameters.platform >> \
/varnish-cache/.circleci/make-$EXT-packages.sh /varnish-cache/.circleci/make-$EXT-packages.sh
- run: - run:
name: List created packages name: List created packages
...@@ -240,26 +234,23 @@ jobs: ...@@ -240,26 +234,23 @@ jobs:
docker cp /workspace workspace:/ docker cp /workspace workspace:/
docker run --volumes-from workspace -w /workspace << parameters.prefix >><< parameters.dist >>:<< parameters.release >> sh -c ' docker run --volumes-from workspace -w /workspace << parameters.prefix >><< parameters.dist >>:<< parameters.release >> sh -c '
case "<< parameters.dist >>" in case "<< parameters.dist >>" in
centos|almalinux|fedora) almalinux|fedora)
yum groupinstall -y "Development Tools" dnf -y groupinstall "Development Tools"
case "<< parameters.dist >>:<< parameters.release >>" in case "<< parameters.dist >>:<< parameters.release >>" in
centos:stream9|almalinux:9) almalinux:9)
dnf install -y "dnf-command(config-manager)" dnf -y install "dnf-command(config-manager)"
yum config-manager --set-enabled crb dnf config-manager --set-enabled crb
yum install -y diffutils dnf -y install diffutils
yum install -y epel-release dnf -y install epel-release
;; ;;
almalinux:8) almalinux:8)
dnf install -y "dnf-command(config-manager)" dnf -y install "dnf-command(config-manager)"
yum config-manager --set-enabled powertools dnf config-manager --set-enabled powertools
yum install -y diffutils dnf -y install diffutils
yum install -y epel-release dnf -y install epel-release
;;
centos:7)
yum install -y epel-release
;; ;;
esac esac
yum install -y \ dnf -y install \
cpio \ cpio \
automake \ automake \
git \ git \
...@@ -335,7 +326,7 @@ jobs: ...@@ -335,7 +326,7 @@ jobs:
archlinux) archlinux)
useradd varnish useradd varnish
;; ;;
centos|almalinux|fedora) almalinux|fedora)
adduser varnish adduser varnish
;; ;;
*) *)
...@@ -387,15 +378,6 @@ workflows: ...@@ -387,15 +378,6 @@ workflows:
- << pipeline.parameters.build-pkgs >> - << pipeline.parameters.build-pkgs >>
- << pipeline.parameters.dist-url >> - << pipeline.parameters.dist-url >>
jobs: jobs:
- build:
name: build_centos_7
dist: centos
release: "7"
- build:
name: build_centos_stream_9
prefix: quay.io/centos/
dist: centos
release: stream9
- build: - build:
name: build_almalinux_8 name: build_almalinux_8
dist: almalinux dist: almalinux
...@@ -469,8 +451,6 @@ workflows: ...@@ -469,8 +451,6 @@ workflows:
- debian:buster - debian:buster
- debian:bullseye - debian:bullseye
- debian:bookworm - debian:bookworm
- centos:7
- centos:stream9
- almalinux:8 - almalinux:8
- almalinux:9 - almalinux:9
- fedora:latest - fedora:latest
......
...@@ -6,30 +6,27 @@ echo "PARAM_RELEASE: $PARAM_RELEASE" ...@@ -6,30 +6,27 @@ echo "PARAM_RELEASE: $PARAM_RELEASE"
echo "PARAM_DIST: $PARAM_DIST" echo "PARAM_DIST: $PARAM_DIST"
if [ -z "$PARAM_RELEASE" ]; then if [ -z "$PARAM_RELEASE" ]; then
echo "Env variable PARAM_RELEASE is not set! For example PARAM_RELEASE=stream, for CentOS stream" echo "Env variable PARAM_RELEASE is not set! For example PARAM_RELEASE=9, for almalinux"
exit 1 exit 1
elif [ -z "$PARAM_DIST" ]; then elif [ -z "$PARAM_DIST" ]; then
echo "Env variable PARAM_DIST is not set! For example PARAM_DIST=centos" echo "Env variable PARAM_DIST is not set! For example PARAM_DIST=fedora"
exit 1 exit 1
fi fi
case "$PARAM_DIST:$PARAM_RELEASE" in case "$PARAM_DIST:$PARAM_RELEASE" in
almalinux:9) almalinux:9)
dnf install -y 'dnf-command(config-manager)' dnf -y install 'dnf-command(config-manager)'
yum config-manager --set-enabled crb dnf config-manager --set-enabled crb
yum install -y epel-release dnf -y install epel-release
;; ;;
centos:stream|almalinux:8) almalinux:8)
dnf install -y 'dnf-command(config-manager)' dnf -y install 'dnf-command(config-manager)'
yum config-manager --set-enabled powertools dnf config-manager --set-enabled powertools
yum install -y epel-release dnf -y install epel-release
;;
centos:7)
yum install -y epel-release
;; ;;
esac esac
yum install -y rpm-build yum-utils dnf -y install rpm-build dnf-utils
export DIST_DIR=build export DIST_DIR=build
...@@ -73,7 +70,7 @@ rpmbuild() { ...@@ -73,7 +70,7 @@ rpmbuild() {
"$@" "$@"
} }
yum-builddep -y "$DIST_DIR"/redhat/varnish.spec dnf builddep -y "$DIST_DIR"/redhat/varnish.spec
rpmbuild -bs "$DIST_DIR"/redhat/varnish.spec rpmbuild -bs "$DIST_DIR"/redhat/varnish.spec
rpmbuild --rebuild "$RESULT_DIR"/varnish-*.src.rpm rpmbuild --rebuild "$RESULT_DIR"/varnish-*.src.rpm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment