diff --git a/.github/matrix-commitly.yml b/.github/matrix-commitly.yml index 7685340597c..38753ab61ba 100644 --- a/.github/matrix-commitly.yml +++ b/.github/matrix-commitly.yml @@ -1,24 +1,49 @@ -# please see matrix-full.yml for meaning of each field build-packages: -- label: ubuntu-22.04 - os: ubuntu-22.04 - package: deb - check-manifest-suite: ubuntu-22.04-amd64 +# label: used to distinguish artifacts for later use +# image: docker image name if the build is running in side a container +# package: package type +# package-type: the nfpm packaging target, //:kong_{package} target; only used when package is rpm +# bazel-args: additional bazel build flags +# check-manifest-suite: the check manifest suite as defined in scripts/explain_manifest/config.py + + # Amazon Linux +- label: amazonlinux-2 + image: amazonlinux:2 + package: rpm + package-type: aws2 + check-manifest-suite: amazonlinux-2-amd64 build-images: -- label: ubuntu - base-image: ubuntu:22.04 - package: deb - artifact-from: ubuntu-22.04 +# Only build images for the latest version of each major release. + +# label: used as compose docker image label ${github.sha}-${label} +# base-image: docker image to use as base +# package: package type +# artifact-from: label of build-packages to use +# artifact-from-alt: another label of build-packages to use for downloading package (to build multi-arch image) +# docker-platforms: comma separated list of docker buildx platforms to build for + +# RHEL +- label: rhel + base-image: registry.access.redhat.com/ubi8 + package: rpm + package-distro: el8 + artifact-from: rhel-8 smoke-tests: -- label: ubuntu +- label: rhel scan-vulnerabilities: -- label: ubuntu +- label: rhel release-packages: +# Amazon Linux +- label: amazonlinux-2 + package: rpm + artifact-from: amazonlinux-2 + artifact-version: 2 + artifact-type: amazonlinux + artifact: kong.aws2.amd64.rpm release-images: -- label: ubuntu - package: deb +- label: rhel diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 517eb7e1b03..8f8f2443c17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -128,6 +128,22 @@ jobs: apt-get update apt-get install -y git tar gzip file sudo + - name: Install GLibc + if: matrix.label == 'amazonlinux-2' + run: | + yum groupinstall -y "Development Tools" && yum install -y nss_nis + curl -o gcc-8.2.0.tar.gz http://ftp.gnu.org/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.gz && tar -xzf gcc-8.2.0.tar.gz + cd gcc-8.2.0 && ./contrib/download_prerequisites && mkdir build && cd build + ../configure --prefix=/usr/local/gcc-8.2.0 --enable-bootstrap --enable-checking=release --enable-languages=c,c++ --disable-multilib + make -j 8 && make install && ln -sv /usr/local/gcc-8.2.0/include/ /usr/include/gcc && ln -sv /usr/lib/gcc/aarch64-redhat-linux/7/include /usr/include/linux/ + export PATH=/usr/local/gcc-8.2.0/bin:$PATH && echo "PATH=/usr/local/gcc-8.2.0/bin:$PATH" >> $GITHUB_ENV + cd ../../ && curl -o make-4.0.tar.gz http://ftp.gnu.org/gnu/make/make-4.0.tar.gz && tar -xzf make-4.0.tar.gz + cd make-4.0 && ./configure && make && make install && yum remove -y make && ln -s /usr/local/bin/make /bin/make + cd .. && curl -o glibc-2.28.tar.gz https://ftp.gnu.org/gnu/libc/glibc-2.28.tar.gz && tar -xzf glibc-2.28.tar.gz + cd glibc-2.28 && mkdir build && cd build + ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/ + make -j 8 && make install + - name: Cache Git id: cache-git if: (matrix.package == 'rpm' || matrix.image == 'debian:10') && matrix.image != ''