Skip to content

Commit

Permalink
feat: Re-enable CentOS 7 builds
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Jan 15, 2025
1 parent feb2f6b commit 376d53e
Show file tree
Hide file tree
Showing 19 changed files with 305 additions and 361 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
!shell.nix
!vcpkg-configuration.json
!vcpkg.json
!dockerfiles/CentOS-Base.repo
2 changes: 1 addition & 1 deletion .github/workflows/prebuild-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
"ubuntu-22.04",
"ubuntu-20.04",
"rockylinux-8",
"centos-8",
"centos-7"
]
fail-fast: false

Expand Down
44 changes: 44 additions & 0 deletions dockerfiles/CentOS-Base.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# /etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/7.9.2009/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[updates]
name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/7.9.2009/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[extras]
name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/7.9.2009/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://vault.centos.org/7.9.2009/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://vault.centos.org/7.9.2009/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

[centos-sclo-sclo]
name=CentOS-7 - SCLo sclo
baseurl=https://vault.centos.org/7.9.2009/sclo/$basearch/sclo/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

[centos-sclo-rh]
name=CentOS-7 - SCLo rh
baseurl=https://vault.centos.org/7.9.2009/sclo/$basearch/rh/
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
174 changes: 0 additions & 174 deletions dockerfiles/amazonlinux.dockerfile

This file was deleted.

50 changes: 25 additions & 25 deletions dockerfiles/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,22 @@ echo "DOCKER_PASSWORD: $DOCKER_PASSWORD"
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD

function doBuild() {
docker pull "hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF" || true
docker pull "hpccsystems/platform-build-vcpkg-$1:$GITHUB_BRANCH" || true
docker pull "hpccsystems/platform-build-base-$1:$GITHUB_REF" || true
docker pull "hpccsystems/platform-build-base-$1:$GITHUB_BRANCH" || true

docker build --progress plain --rm -f "$SCRIPT_DIR/$1.dockerfile" \
--target vcpkg_build \
docker buildx build --progress plain -f "$SCRIPT_DIR/$1.dockerfile" \
--build-arg NUGET_MODE=readwrite \
--build-arg GITHUB_ACTOR=$GITHUB_ACTOR \
--build-arg GITHUB_TOKEN=$GITHUB_TOKEN \
--cache-from hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF \
--cache-from hpccsystems/platform-build-vcpkg-$1:$GITHUB_BRANCH \
-t hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF \
-t hpccsystems/platform-build-vcpkg-$1:$GITHUB_BRANCH \
--cache-from hpccsystems/platform-build-base-$1:$GITHUB_REF \
--cache-from hpccsystems/platform-build-base-$1:$GITHUB_BRANCH \
-t hpccsystems/platform-build-base-$1:$GITHUB_REF \
-t hpccsystems/platform-build-base-$1:$GITHUB_BRANCH \
"$SCRIPT_DIR/.."

# docker push "hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF" &
# docker push "hpccsystems/platform-build-vcpkg-$1:$GITHUB_BRANCH" &

# mkdir -p build-$1
# docker run --rm --mount source="$(pwd)",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF \
# "rm -rf /hpcc-dev/HPCC-Platform/build-$1/vcpkg_installed || true && \
# cp -r /hpcc-dev/vcpkg_installed /hpcc-dev/HPCC-Platform/build-$1"
# docker push "hpccsystems/platform-build-base-$1:$GITHUB_REF" &
# docker push "hpccsystems/platform-build-base-$1:$GITHUB_BRANCH" &

# docker pull "hpccsystems/platform-build-base-$1:$GITHUB_REF" || true
# docker pull "hpccsystems/platform-build-base-$1:$GITHUB_BRANCH" || true
Expand All @@ -58,18 +53,23 @@ function doBuild() {
# -t hpccsystems/platform-build-base-$1:$GITHUB_BRANCH \
# "$SCRIPT_DIR/.."

# docker push hpccsystems/platform-build-base-$1:$GITHUB_REF
# docker push hpccsystems/platform-build-base-$1:$GITHUB_BRANCH
# docker push "hpccsystems/platform-build-base-$1:$GITHUB_REF" &
# docker push "hpccsystems/platform-build-base-$1:$GITHUB_BRANCH" &
}

# doBuild ubuntu-24.04
# doBuild amazonlinux
# doBuild centos-7 &
doBuild centos-8 &
# doBuild rockylinux-8 &
# doBuild ubuntu-24.04 &
# doBuild ubuntu-23.04 &
# doBuild ubuntu-22.04 &
# doBuild ubuntu-20.04 &
trap 'kill $(jobs -p)' EXIT

# ./vcpkg/bootstrap-vcpkg.sh
mkdir -p ./vcpkg-logs

if [ "$1" != "" ]; then
doBuild $1
else
doBuild ubuntu-24.04 &> vcpkg-logs/ubuntu-24.04.log &
doBuild ubuntu-22.04 &> vcpkg-logs/ubuntu-22.04.log &
doBuild ubuntu-20.04 &> vcpkg-logs/ubuntu-20.04.log &
doBuild rockylinux-8 &> vcpkg-logs/rockylinux-8.log &
doBuild centos-7 &> vcpkg-logs/centos-7.log &
fi

wait
26 changes: 16 additions & 10 deletions dockerfiles/centos-7.dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
FROM centos:centos7.9.2009 AS base_build

COPY dockerfiles/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo

# Build Tools ---
RUN yum update -y && yum install -y \
centos-release-scl \
https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm && \
RUN yum clean all && yum update -y && yum install -y \
https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm \
yum group install -y "Development Tools" && yum install -y \
autoconf \
autoconf-archive \
automake \
bison \
curl \
flex \
git \
kernel-devel \
libtool \
Expand All @@ -18,10 +21,9 @@ RUN yum update -y && yum install -y \
unzip \
yum-utils \
zip && \
yum install -y devtoolset-11 && \
yum -y clean all && rm -rf /var/cache

RUN yum install -y devtoolset-11

RUN echo "source /opt/rh/devtoolset-11/enable" >> /etc/bashrc
SHELL ["/bin/bash", "--login", "-c"]

Expand Down Expand Up @@ -126,10 +128,14 @@ RUN mono `./vcpkg fetch nuget | tail -n 1` \
RUN mkdir /hpcc-dev/build
RUN ./vcpkg install \
--x-abi-tools-use-exact-versions \
--x-install-root=/hpcc-dev/build/vcpkg_installed \
--host-triplet=x64-centos-7-dynamic \
--triplet=x64-centos-7-dynamic
# ./vcpkg install --x-abi-tools-use-exact-versions --x-install-root=/hpcc-dev/build/vcpkg_installed --triplet=x64-centos-7-dynamic
--downloads-root=/hpcc-dev/vcpkg_downloads \
--x-buildtrees-root=/hpcc-dev/vcpkg_buildtrees \
--x-packages-root=/hpcc-dev/vcpkg_packages \
--x-install-root=/hpcc-dev/vcpkg_installed \
--host-triplet=x64-linux-dynamic \
--triplet=x64-linux-dynamic

# ./vcpkg install --x-abi-tools-use-exact-versions --x-install-root=/hpcc-dev/build/vcpkg_installed --host-triplet=x64-linux-dynamic --triplet=x64-linux-dynamic

RUN mkdir -p /hpcc-dev/tools/cmake
RUN cp -r $(dirname $(dirname `./vcpkg fetch cmake | tail -n 1`))/* /hpcc-dev/tools/cmake
Expand Down Expand Up @@ -160,7 +166,7 @@ RUN wget https://cran.r-project.org/src/contrib/Archive/Rcpp/${Rcpp_package} &&

WORKDIR /hpcc-dev

COPY --from=vcpkg_build /hpcc-dev/build/vcpkg_installed /hpcc-dev/vcpkg_installed
COPY --from=vcpkg_build /hpcc-dev/vcpkg_installed /hpcc-dev/vcpkg_installed
COPY --from=vcpkg_build /hpcc-dev/tools /hpcc-dev/tools

RUN cp -rs /hpcc-dev/tools/cmake/bin /usr/local/ && \
Expand Down
Loading

0 comments on commit 376d53e

Please sign in to comment.