Skip to content

Commit 2b34eda

Browse files
authored
CI: update to CentOS Stream 9 and start integrating universal target (algorand#6080)
1 parent f6fa590 commit 2b34eda

File tree

17 files changed

+38
-93
lines changed

17 files changed

+38
-93
lines changed

docker/build/cicd.centos.Dockerfile

Lines changed: 0 additions & 28 deletions
This file was deleted.

docker/build/cicd.centos8.Dockerfile renamed to docker/build/cicd.centos9.Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
ARG ARCH="amd64"
22

3-
FROM quay.io/centos/centos:stream8
3+
FROM quay.io/centos/centos:stream9
44
ARG GOLANG_VERSION
55
ARG ARCH="amd64"
6-
RUN dnf update rpm -y && \
7-
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
6+
RUN dnf install -y epel-release epel-next-release && dnf config-manager --set-enabled crb && \
87
dnf update -y && \
98
dnf install -y autoconf wget awscli git gnupg2 nfs-utils python3-devel expect jq \
109
libtool gcc-c++ libstdc++-devel rpmdevtools createrepo rpm-sign bzip2 which \
11-
libffi-devel openssl-devel
12-
RUN dnf install -y epel-release && \
13-
dnf update && \
14-
dnf -y --enablerepo=powertools install libstdc++-static && \
15-
dnf -y install make
10+
libffi-devel openssl-devel libstdc++-static
1611
RUN echo "${BOLD}Downloading and installing binaries...${RESET}" && \
1712
curl -Of https://shellcheck.storage.googleapis.com/shellcheck-v0.7.0.linux.x86_64.tar.xz && \
1813
tar -C /usr/local/bin/ -xf shellcheck-v0.7.0.linux.x86_64.tar.xz --no-anchored 'shellcheck' --strip=1

package-deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ agents:
4545
workDir: $HOME/projects/go-algorand
4646

4747
- name: rpm
48-
dockerFilePath: docker/build/cicd.centos8.Dockerfile
49-
image: algorand/go-algorand-ci-linux-centos8
48+
dockerFilePath: docker/build/cicd.centos9.Dockerfile
49+
image: algorand/go-algorand-ci-linux-centos9
5050
version: scripts/configure_dev-deps.sh
5151
buildArgs:
5252
- GOLANG_VERSION=`./scripts/get_golang_version.sh`

package-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ agents:
1616
workDir: $HOME/projects/go-algorand
1717

1818
- name: rpm
19-
dockerFilePath: docker/build/cicd.centos.Dockerfile
20-
image: algorand/mule-linux-centos
19+
dockerFilePath: docker/build/cicd.centos9.Dockerfile
20+
image: algorand/mule-linux-centos9
2121
version: scripts/configure_dev-deps.sh
2222
buildArgs:
2323
- GOLANG_VERSION=`./scripts/get_golang_version.sh`

package.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ agents:
1111
workDir: $HOME/projects/go-algorand
1212

1313
- name: rpm
14-
dockerFilePath: docker/build/cicd.centos.Dockerfile
15-
image: algorand/go-algorand-ci-linux-centos
14+
dockerFilePath: docker/build/cicd.centos9.Dockerfile
15+
image: algorand/go-algorand-ci-linux-centos9
1616
version: scripts/configure_dev-deps.sh
1717
buildArgs:
1818
- GOLANG_VERSION=`./scripts/get_golang_version.sh`

scripts/release/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This section briefly describes the expected outcomes of the current build pipeli
5050

5151
1. build
5252

53-
1. Build (compile) the binaries in a Centos 7 & 8 docker container that will then be used by both `deb` and `rpm` packaging.
53+
1. Build (compile) the binaries in a Centos 9 docker container that will then be used by both `deb` and `rpm` packaging.
5454

5555
1. Docker containers will package `deb` and `rpm` artifacts inside of Ubuntu 20.04 and Centos 7 & 8, respectively.
5656

@@ -69,9 +69,9 @@ This section briefly describes the expected outcomes of the current build pipeli
6969
- The signatures are correct.
7070
- The packages are built from the correct branch and channel and are the correct version. This done by running `algod -v`.
7171
+ This is done for the following docker containers:
72-
- centos:7
73-
- quay.io/centos/centos:stream8
74-
- fedora:38
72+
- quay.io/centos/centos:stream9
73+
- fedora:39
74+
- fedora:40
7575
- ubuntu:20.04
7676
- ubuntu:22.04
7777

scripts/release/build/stage/build/task.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ else
3030
echo ${BUILD_NUMBER} > "${REPO_ROOT}"/buildnumber.dat
3131
fi
3232

33-
# Run RPM build in Centos 7 & 8 Docker container
34-
sg docker "docker build -t algocentosbuild - < $HOME/go/src/github.com/algorand/go-algorand/scripts/release/common/docker/centos.Dockerfile"
33+
# Run RPM build in Centos 9 Docker container
34+
sg docker "docker build -t algocentosbuild - < $HOME/go/src/github.com/algorand/go-algorand/scripts/release/common/docker/centos9.Dockerfile"
3535
sg docker "docker run --rm --env-file ${HOME}/build_env_docker --mount type=bind,src=${HOME},dst=/root/subhome algocentosbuild /root/subhome/go/src/github.com/algorand/go-algorand/scripts/release/build/rpm/build.sh"
3636

3737
echo

scripts/release/common/docker/centos.Dockerfile

Lines changed: 0 additions & 8 deletions
This file was deleted.

scripts/release/common/docker/centos8.Dockerfile renamed to scripts/release/common/docker/centos9.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM quay.io/centos/centos:stream8
1+
FROM quay.io/centos/centos:stream9
22

33
WORKDIR /root
4-
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \
4+
RUN dnf install -y epel-release epel-next-release && dnf config-manager --set-enabled crb && \
5+
dnf update -y && \
56
dnf install -y autoconf awscli curl git gnupg2 nfs-utils python36 expect jq libtool gcc-c++ libstdc++-devel rpmdevtools createrepo rpm-sign bzip2 which && \
67
dnf -y --enablerepo=powertools install libstdc++-static
78

scripts/release/common/setup.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ else
104104
fi
105105

106106
sudo usermod -a -G docker ubuntu
107-
sg docker "docker pull centos:7"
108-
sg docker "docker pull quay.io/centos/centos:stream8"
107+
sg docker "docker pull quay.io/centos/centos:stream9"
109108
sg docker "docker pull ubuntu:22.04"
110109

111110
cat << EOF >> "${HOME}/.bashrc"

scripts/release/mule/common/ensure_centos8_image.sh renamed to scripts/release/mule/common/ensure_centos9_image.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
set -exo pipefail
44

5-
# Ensure the centos8 docker image is built and available
5+
# Ensure the centos docker image is built and available
66

7-
DOCKER_IMAGE="algorand/go-algorand-ci-linux-centos8:amd64-$(sha1sum scripts/configure_dev-deps.sh | cut -f1 -d' ')"
7+
DOCKER_IMAGE="algorand/go-algorand-ci-linux-centos9:amd64-$(sha1sum scripts/configure_dev-deps.sh | cut -f1 -d' ')"
88
MATCH=${DOCKER_IMAGE/:*/}
99

1010
echo "Checking for RPM image"
@@ -13,5 +13,5 @@ if docker images $DOCKER_IMAGE | grep -qs $MATCH > /dev/null 2>&1; then
1313
else
1414
echo "RPM image doesn't exist, building"
1515
docker build --platform=linux/amd64 --build-arg ARCH=amd64 \
16-
--build-arg GOLANG_VERSION=$(./scripts/get_golang_version.sh) -t $DOCKER_IMAGE -f docker/build/cicd.centos8.Dockerfile .
16+
--build-arg GOLANG_VERSION=$(./scripts/get_golang_version.sh) -t $DOCKER_IMAGE -f docker/build/cicd.centos9.Dockerfile .
1717
fi

scripts/release/mule/package/rpm/package.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ find tmp/node_pkgs -name "*${CHANNEL}*linux*${VERSION}*.tar.gz" | cut -d '/' -f3
5050
-e "s,@REQUIRED_ALGORAND_PKG@,$REQUIRED_ALGORAND_PACKAGE," \
5151
> "$TEMPDIR/$ALGORAND_PACKAGE_NAME.spec"
5252

53-
rpmbuild --buildroot "$HOME/foo" --define "_rpmdir $RPMTMP" --define "RELEASE_GENESIS_PROCESS xtrue" --define "LICENSE_FILE ./COPYING" -bb "$TEMPDIR/$ALGORAND_PACKAGE_NAME.spec" --target $ARCH_UNAME
53+
rpmbuild --buildroot "$HOME/foo" --define "_rpmdir $RPMTMP" --define "RELEASE_GENESIS_PROCESS \"xtrue\"" --define "LICENSE_FILE ./COPYING" -bb "$TEMPDIR/$ALGORAND_PACKAGE_NAME.spec" --target $ARCH_UNAME
5454

5555
cp -p "$RPMTMP"/*/*.rpm "./tmp/node_pkgs/$OS_TYPE/$ARCH_TYPE"
5656
echo "${RPMTMP}"

scripts/release/prod/rpm/run_centos.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ set -ex
55

66
. "${HOME}"/build_env
77

8-
# Run RPM build in Centos 7 & 8 Docker container
9-
sg docker "docker build -t algocentosbuild - < ${HOME}/go/src/github.com/algorand/go-algorand/scripts/release/common/docker/centos.Dockerfile"
8+
# Run RPM build in Centos 9 Docker container
9+
sg docker "docker build -t algocentosbuild - < ${HOME}/go/src/github.com/algorand/go-algorand/scripts/release/common/docker/centos9.Dockerfile"
1010

1111
sg docker "docker run --rm --env-file ${HOME}/build_env_docker --mount type=bind,src=/run/user/1000/gnupg/S.gpg-agent,dst=/root/S.gpg-agent --mount type=bind,src=${HOME}/prodrepo,dst=/root/prodrepo --mount type=bind,src=${HOME}/keys,dst=/root/keys --mount type=bind,src=${HOME},dst=/root/subhome algocentosbuild /root/subhome/go/src/github.com/algorand/go-algorand/scripts/release/prod/rpm/snapshot.sh"
1212

scripts/release/test/rpm/run_centos.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ if [ "$CHANNEL" = beta ]; then
1414
exit 0
1515
fi
1616

17-
# Run RPM build in Centos 7 & 8 Docker container
18-
sg docker "docker build -t algocentosbuild - < ${HOME}/go/src/github.com/algorand/go-algorand/scripts/release/common/docker/centos.Dockerfile"
17+
# Run RPM build in Centos 9 Docker container
18+
sg docker "docker build -t algocentosbuild - < ${HOME}/go/src/github.com/algorand/go-algorand/scripts/release/common/docker/centos9.Dockerfile"
1919

2020
cat <<EOF>"${HOME}"/dummyrepo/algodummy.repo
2121
[algodummy]

scripts/release/test/util/test_package.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ set -ex
88
. "${HOME}"/build_env
99

1010
OS_LIST=(
11-
centos:7
12-
quay.io/centos/centos:stream8
13-
fedora:38
11+
quay.io/centos/centos:stream9
12+
fedora:39
13+
fedora:40
1414
ubuntu:20.04
1515
ubuntu:22.04
1616
)

test/muleCI/mule.yaml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,9 @@ agents:
1515
- GOLANG_VERSION=`./scripts/get_golang_version.sh`
1616
- ARCH=amd64
1717
- GOARCH=amd64
18-
- name: cicd.centos.amd64
19-
dockerFilePath: docker/build/cicd.centos.Dockerfile
20-
image: algorand/go-algorand-ci-linux-centos
21-
version: scripts/configure_dev-deps.sh
22-
arch: amd64
23-
env:
24-
- TRAVIS_BRANCH=${GIT_BRANCH}
25-
- NETWORK=$NETWORK
26-
- VERSION=$VERSION
27-
- BUILD_NUMBER=$BUILD_NUMBER
28-
- GOHOSTARCH=amd64
29-
buildArgs:
30-
- GOLANG_VERSION=`./scripts/get_golang_version.sh`
31-
- ARCH=amd64
32-
- name: cicd.centos8.amd64
33-
dockerFilePath: docker/build/cicd.centos8.Dockerfile
34-
image: algorand/go-algorand-ci-linux-centos8
18+
- name: cicd.centos9.amd64
19+
dockerFilePath: docker/build/cicd.centos9.Dockerfile
20+
image: algorand/go-algorand-ci-linux-centos9
3521
version: scripts/configure_dev-deps.sh
3622
arch: amd64
3723
env:
@@ -106,12 +92,12 @@ tasks:
10692

10793
- task: docker.Make
10894
name: archive
109-
agent: cicd.centos8.amd64
95+
agent: cicd.centos9.amd64
11096
target: archive
11197

11298
- task: docker.Make
11399
name: rpm.amd64
114-
agent: cicd.centos.amd64
100+
agent: cicd.centos9.amd64
115101
target: mule-package-rpm
116102

117103
- task: docker.Make

test/platform/test_linux_amd64_compatibility.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ BLUE_FG=$(tput setaf 4 2>/dev/null)
77
END_FG_COLOR=$(tput sgr0 2>/dev/null)
88

99
OS_LIST=(
10-
centos:7
11-
quay.io/centos/centos:stream8
12-
fedora:38
10+
quay.io/centos/centos:stream9
11+
fedora:39
12+
fedora:40
1313
ubuntu:20.04
1414
ubuntu:22.04
1515
)

0 commit comments

Comments
 (0)