Skip to content

Commit

Permalink
fix(cd): build package always runs on ubuntu-22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion committed Aug 2, 2023
1 parent d470208 commit 36f9887
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
16 changes: 0 additions & 16 deletions .github/matrix-full.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
build-packages:
# label: used to distinguish artifacts for later use
# os: the github actions runner label to pick from
# 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
Expand All @@ -9,83 +8,68 @@ build-packages:

# Ubuntu
- label: ubuntu-20.04
os: ubuntu-22.04
image: ubuntu:20.04
package: deb
check-manifest-suite: ubuntu-20.04-amd64
- label: ubuntu-22.04
os: ubuntu-22.04
package: deb
check-manifest-suite: ubuntu-22.04-amd64
- label: ubuntu-22.04-arm64
os: ubuntu-22.04
package: deb
bazel-args: --platforms=//:generic-crossbuild-aarch64
check-manifest-suite: ubuntu-22.04-arm64

# Debian
- label: debian-10
os: ubuntu-22.04
image: debian:10
package: deb
check-manifest-suite: debian-10-amd64
- label: debian-11
os: ubuntu-22.04
image: debian:11
package: deb
check-manifest-suite: debian-11-amd64

# CentOS
- label: centos-7
os: ubuntu-22.04
image: centos:7
package: rpm
package-type: el7
check-manifest-suite: el7-amd64

# RHEL
- label: rhel-7
os: ubuntu-22.04
image: centos:7
package: rpm
package-type: el7
check-manifest-suite: el7-amd64
- label: rhel-8
os: ubuntu-22.04
image: rockylinux:8
package: rpm
package-type: el8
check-manifest-suite: el8-amd64
- label: rhel-9
os: ubuntu-22.04
image: rockylinux:9
package: rpm
package-type: el9
check-manifest-suite: el9-amd64
- label: rhel-9-arm64
os: ubuntu-22.04
image: rockylinux:9
package: rpm
package-type: el9
bazel-args: --platforms=//:rhel9-crossbuild-aarch64
check-manifest-suite: el9-arm64

# Amazon Linux
- label: amazonlinux-2
os: ubuntu-22.04
image: amazonlinux:2
package: rpm
package-type: aws2
check-manifest-suite: amazonlinux-2-amd64
- label: amazonlinux-2023
os: ubuntu-22.04
image: amazonlinux:2023
package: rpm
package-type: aws2023
check-manifest-suite: amazonlinux-2023-amd64
- label: amazonlinux-2023-arm64
os: ubuntu-22.04
image: amazonlinux:2023
package: rpm
package-type: aws2023
bazel-args: --platforms=//:aws2023-crossbuild-aarch64
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ jobs:
matrix:
include: "${{ fromJSON(needs.metadata.outputs.matrix)['build-packages'] }}"

runs-on: ${{ matrix.os }}
runs-on: ubuntu-22.04
container:
image: ${{ matrix.image }}
options: --privileged

steps:
- name: Early Rpm Setup
if: matrix.package == 'rpm'
if: matrix.package == 'rpm' && matrix.image != ''
run: |
# tar/gzip is needed to restore git cache (if available)
yum install -y tar gzip which file zlib-devel
Expand All @@ -123,15 +123,15 @@ jobs:
- name: Cache Git
id: cache-git
if: matrix.package == 'rpm' || matrix.image == 'debian:10'
if: (matrix.package == 'rpm' || matrix.image == 'debian:10') && matrix.image != ''
uses: actions/cache@v3
with:
path: /usr/local/git
key: ${{ matrix.label }}-git-2.41.0

# el-7,8, amazonlinux-2,2023, debian-10 doesn't have git 2.18+, so we need to install it manually
- name: Install newer Git
if: (matrix.package == 'rpm' || matrix.image == 'debian:10') && steps.cache-git.outputs.cache-hit != 'true'
if: (matrix.package == 'rpm' || matrix.image == 'debian:10') && matrix.image != '' && steps.cache-git.outputs.cache-hit != 'true'
run: |
if which apt 2>/dev/null; then
apt update
Expand All @@ -150,7 +150,7 @@ jobs:
make install
- name: Add Git to PATH
if: matrix.package == 'rpm' || matrix.image == 'debian:10'
if: (matrix.package == 'rpm' || matrix.image == 'debian:10') && matrix.image != ''
run: |
echo "/usr/local/git/bin" >> $GITHUB_PATH
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
sudo apt-get install crossbuild-essential-arm64 -y
- name: Install Rpm Dependencies
if: matrix.package == 'rpm'
if: matrix.package == 'rpm' && matrix.image != ''
run: |
yum groupinstall -y 'Development Tools'
dnf config-manager --set-enabled powertools || true # enable devel packages on rockylinux:8
Expand Down

0 comments on commit 36f9887

Please sign in to comment.