From 51f5a4beb31a7d30c3e526b6f82b63438fc97f77 Mon Sep 17 00:00:00 2001 From: Water-Melon Date: Tue, 10 Sep 2024 08:03:35 +0000 Subject: [PATCH] full matrix --- .github/matrix-commitly.yml | 191 +++++++++++++++++- build/toolchain/repositories.bzl | 4 +- .../fixtures/amazonlinux-2-amd64.txt | 2 +- .../fixtures/amazonlinux-2023-arm64.txt | 3 +- .../explain_manifest/fixtures/el9-arm64.txt | 3 +- .../fixtures/ubuntu-22.04-arm64.txt | 2 +- 6 files changed, 197 insertions(+), 8 deletions(-) diff --git a/.github/matrix-commitly.yml b/.github/matrix-commitly.yml index 1a2962ab225f..72822d0a94e7 100644 --- a/.github/matrix-commitly.yml +++ b/.github/matrix-commitly.yml @@ -1,25 +1,212 @@ -# please see matrix-full.yml for meaning of each field build-packages: +# 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 + +# Ubuntu +- label: ubuntu-20.04 + image: ubuntu:20.04 + package: deb + check-manifest-suite: ubuntu-20.04-amd64 +- label: ubuntu-22.04 + image: ubuntu:22.04 + package: deb + check-manifest-suite: ubuntu-22.04-amd64 +- label: ubuntu-22.04-arm64 + image: ubuntu:22.04 + package: deb + bazel-args: --platforms=//:generic-crossbuild-aarch64 + check-manifest-suite: ubuntu-22.04-arm64 - label: ubuntu-24.04 image: ubuntu:24.04 package: deb check-manifest-suite: ubuntu-24.04-amd64 +- label: ubuntu-24.04-arm64 + image: ubuntu:24.04 + package: deb + bazel-args: --platforms=//:generic-crossbuild-aarch64 + check-manifest-suite: ubuntu-24.04-arm64 + +# Debian +- label: debian-11 + image: debian:11 + package: deb + check-manifest-suite: debian-11-amd64 +- label: debian-12 + image: debian:12 + package: deb + check-manifest-suite: debian-12-amd64 + +# RHEL +- label: rhel-8 + image: rockylinux:8 + package: rpm + package-type: el8 + check-manifest-suite: el8-amd64 +- label: rhel-9 + image: rockylinux:9 + package: rpm + package-type: el9 + check-manifest-suite: el9-amd64 +- label: rhel-9-arm64 + package: rpm + package-type: el9 + bazel-args: --platforms=//:rhel9-crossbuild-aarch64 --//:brotli=False + check-manifest-suite: el9-arm64 + + # Amazon Linux +- label: amazonlinux-2 + package: rpm + package-type: aws2 + check-manifest-suite: amazonlinux-2-amd64 + # simdjson doesn't compile on gcc7.3.1 (needs 7.4) + bazel-args: --platforms=//:aws2-crossbuild-x86_64 --//:simdjson=False +- label: amazonlinux-2023 + image: amazonlinux:2023 + package: rpm + package-type: aws2023 + check-manifest-suite: amazonlinux-2023-amd64 +- label: amazonlinux-2023-arm64 + package: rpm + package-type: aws2023 + bazel-args: --platforms=//:aws2023-crossbuild-aarch64 --//:brotli=False + check-manifest-suite: amazonlinux-2023-arm64 build-images: +# 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 + +# Ubuntu - label: ubuntu base-image: ubuntu:24.04 package: deb artifact-from: ubuntu-24.04 + artifact-from-alt: ubuntu-24.04-arm64 + docker-platforms: linux/amd64, linux/arm64 check-manifest-suite: docker-image-ubuntu-24.04 +# Debian +- label: debian + base-image: debian:12-slim + package: deb + artifact-from: debian-12 + +# RHEL +- label: rhel + base-image: registry.access.redhat.com/ubi9 + package: rpm + rpm_platform: el9 + artifact-from: rhel-9 + artifact-from-alt: rhel-9-arm64 + docker-platforms: linux/amd64, linux/arm64 + smoke-tests: - label: ubuntu +- label: debian +- label: rhel scan-vulnerabilities: - label: ubuntu +- label: debian +- label: rhel release-packages: +# Ubuntu +- label: ubuntu-20.04 + package: deb + artifact-from: ubuntu-20.04 + artifact-version: 20.04 + artifact-type: ubuntu + artifact: kong.amd64.deb +- label: ubuntu-22.04 + package: deb + artifact-from: ubuntu-22.04 + artifact-version: 22.04 + artifact-type: ubuntu + artifact: kong.amd64.deb +- label: ubuntu-22.04-arm64 + package: deb + artifact-from: ubuntu-22.04-arm64 + artifact-version: 22.04 + artifact-type: ubuntu + artifact: kong.arm64.deb +- label: ubuntu-24.04 + package: deb + artifact-from: ubuntu-24.04 + artifact-version: 24.04 + artifact-type: ubuntu + artifact: kong.amd64.deb +- label: ubuntu-24.04-arm64 + package: deb + artifact-from: ubuntu-24.04-arm64 + artifact-version: 24.04 + artifact-type: ubuntu + artifact: kong.arm64.deb + +# Debian +- label: debian-11 + package: deb + artifact-from: debian-11 + artifact-version: 11 + artifact-type: debian + artifact: kong.amd64.deb +- label: debian-12 + package: deb + artifact-from: debian-12 + artifact-version: 12 + artifact-type: debian + artifact: kong.amd64.deb + +# RHEL +- label: rhel-8 + package: rpm + artifact-from: rhel-8 + artifact-version: 8 + artifact-type: rhel + artifact: kong.el8.amd64.rpm +- label: rhel-9 + package: rpm + artifact-from: rhel-9 + artifact-version: 9 + artifact-type: rhel + artifact: kong.el9.amd64.rpm +- label: rhel-9-arm64 + package: rpm + artifact-from: rhel-9-arm64 + artifact-version: 9 + artifact-type: rhel + artifact: kong.el9.arm64.rpm + +# Amazon Linux +- label: amazonlinux-2 + package: rpm + artifact-from: amazonlinux-2 + artifact-version: 2 + artifact-type: amazonlinux + artifact: kong.aws2.amd64.rpm +- label: amazonlinux-2023 + package: rpm + artifact-from: amazonlinux-2023 + artifact-version: 2023 + artifact-type: amazonlinux + artifact: kong.aws2023.amd64.rpm +- label: amazonlinux-2023-arm64 + package: rpm + artifact-from: amazonlinux-2023-arm64 + artifact-version: 2023 + artifact-type: amazonlinux + artifact: kong.aws2023.arm64.rpm release-images: - label: ubuntu - package: deb +- label: debian +- label: rhel diff --git a/build/toolchain/repositories.bzl b/build/toolchain/repositories.bzl index 8c1aefdfb6b5..4a91eb868ff9 100644 --- a/build/toolchain/repositories.bzl +++ b/build/toolchain/repositories.bzl @@ -24,7 +24,7 @@ def toolchain_repositories(): http_archive( name = "aarch64-rhel9-linux-gnu-gcc-11", url = "https://github.com/Kong/crosstool-ng-actions/releases/download/0.8.0/aarch64-rhel9-linux-gnu-glibc-2.34-gcc-11.tar.gz", - sha256 = "4b5ef1511035fcb4b95c543485dc7a72675abcb27c4d2b6a20ac4598f2717a9f", + sha256 = "b8f9573cb71d5556aea5a0e13c205786b5817f54273e2efcde71548e9eb297a2", strip_prefix = "aarch64-rhel9-linux-gnu", build_file_content = build_file_content, ) @@ -40,7 +40,7 @@ def toolchain_repositories(): http_archive( name = "aarch64-aws2023-linux-gnu-gcc-11", url = "https://github.com/Kong/crosstool-ng-actions/releases/download/0.8.0/aarch64-aws2023-linux-gnu-glibc-2.34-gcc-11.tar.gz", - sha256 = "b8f9573cb71d5556aea5a0e13c205786b5817f54273e2efcde71548e9eb297a2", + sha256 = "4b5ef1511035fcb4b95c543485dc7a72675abcb27c4d2b6a20ac4598f2717a9f", strip_prefix = "aarch64-aws2023-linux-gnu", build_file_content = build_file_content, ) diff --git a/scripts/explain_manifest/fixtures/amazonlinux-2-amd64.txt b/scripts/explain_manifest/fixtures/amazonlinux-2-amd64.txt index f75994009046..b22d4daf4ec4 100644 --- a/scripts/explain_manifest/fixtures/amazonlinux-2-amd64.txt +++ b/scripts/explain_manifest/fixtures/amazonlinux-2-amd64.txt @@ -49,8 +49,8 @@ - Path : /usr/local/kong/lib/libada.so Needed : - - libstdc++.so.6 - libm.so.6 + - libstdc++.so.6 - libgcc_s.so.1 - libc.so.6 diff --git a/scripts/explain_manifest/fixtures/amazonlinux-2023-arm64.txt b/scripts/explain_manifest/fixtures/amazonlinux-2023-arm64.txt index 807cec769697..1a499b6cda55 100644 --- a/scripts/explain_manifest/fixtures/amazonlinux-2023-arm64.txt +++ b/scripts/explain_manifest/fixtures/amazonlinux-2023-arm64.txt @@ -47,10 +47,11 @@ - Path : /usr/local/kong/lib/libada.so Needed : - - libstdc++.so.6 - libm.so.6 + - libstdc++.so.6 - libgcc_s.so.1 - libc.so.6 + - ld-linux-aarch64.so.1 - Path : /usr/local/kong/lib/libcrypto.so.3 Needed : diff --git a/scripts/explain_manifest/fixtures/el9-arm64.txt b/scripts/explain_manifest/fixtures/el9-arm64.txt index 807cec769697..1a499b6cda55 100644 --- a/scripts/explain_manifest/fixtures/el9-arm64.txt +++ b/scripts/explain_manifest/fixtures/el9-arm64.txt @@ -47,10 +47,11 @@ - Path : /usr/local/kong/lib/libada.so Needed : - - libstdc++.so.6 - libm.so.6 + - libstdc++.so.6 - libgcc_s.so.1 - libc.so.6 + - ld-linux-aarch64.so.1 - Path : /usr/local/kong/lib/libcrypto.so.3 Needed : diff --git a/scripts/explain_manifest/fixtures/ubuntu-22.04-arm64.txt b/scripts/explain_manifest/fixtures/ubuntu-22.04-arm64.txt index cb06affdd985..6b1664c89895 100644 --- a/scripts/explain_manifest/fixtures/ubuntu-22.04-arm64.txt +++ b/scripts/explain_manifest/fixtures/ubuntu-22.04-arm64.txt @@ -34,9 +34,9 @@ - Path : /usr/local/kong/lib/libada.so Needed : - libstdc++.so.6 - - libm.so.6 - libgcc_s.so.1 - libc.so.6 + - ld-linux-aarch64.so.1 - Path : /usr/local/kong/lib/libcrypto.so.3 Needed :