Skip to content

Commit cbf9796

Browse files
authored
feat: build deb package for ubuntu 24.04 (#435)
Signed-off-by: Nic <[email protected]>
1 parent a2e6806 commit cbf9796

File tree

5 files changed

+31
-24
lines changed

5 files changed

+31
-24
lines changed

.github/workflows/package-apisix-deb-ubuntu20.04.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: package apisix deb for ubuntu 20.04(Focal Fossa)
1+
name: package apisix deb for ubuntu 24.04
22

33
on:
44
push:
@@ -34,11 +34,11 @@ jobs:
3434
- name: run apisix packaging
3535
run: |
3636
wget https://raw.githubusercontent.com/apache/apisix/${APISIX_VERSION}/.requirements && source .requirements
37-
make package type=deb app=apisix version=${PACKAGE_APISIX_VERSION} runtime_version=${APISIX_RUNTIME} checkout=${APISIX_VERSION} image_base=ubuntu image_tag=20.04
37+
make package type=deb app=apisix version=${PACKAGE_APISIX_VERSION} runtime_version=${APISIX_RUNTIME} checkout=${APISIX_VERSION} image_base=ubuntu image_tag=24.04
3838
3939
- name: install apisix deb into container
4040
run: |
41-
docker build -t apache/apisix:${PACKAGE_APISIX_VERSION}-deb-test --build-arg APISIX_VERSION=${PACKAGE_APISIX_VERSION} -f test/apisix/Dockerfile.test.apisix.deb.ubuntu20.04 .
41+
docker build -t apache/apisix:${PACKAGE_APISIX_VERSION}-deb-test --build-arg APISIX_VERSION=${PACKAGE_APISIX_VERSION} -f test/apisix/Dockerfile.test.apisix.deb.ubuntu24.04 .
4242
4343
- name: start apisix and test
4444
run: |
@@ -74,7 +74,7 @@ jobs:
7474
- name: Publish Artifact
7575
uses: actions/[email protected]
7676
with:
77-
name: apisix_${{ env.PACKAGE_APISIX_VERSION }}-0~ubuntu20.04_amd64.deb
78-
path: output/apisix_${{ env.PACKAGE_APISIX_VERSION }}-0~ubuntu20.04_amd64.deb
77+
name: apisix_${{ env.PACKAGE_APISIX_VERSION }}-0~ubuntu24.04_amd64.deb
78+
path: output/apisix_${{ env.PACKAGE_APISIX_VERSION }}-0~ubuntu24.04_amd64.deb
7979
retention-days: 5
8080
if-no-files-found: error

.github/workflows/package-apisix-runtime-deb-ubuntu20.04.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: package apisix-runtime deb for ubuntu 20.04(Focal Fossa)
1+
name: package apisix-runtime deb for ubuntu 24.04
22

33
on:
44
push:
@@ -29,26 +29,26 @@ jobs:
2929
3030
- name: build apisix-runtime deb
3131
run: |
32-
make package type=deb app=apisix-runtime runtime_version=${BUILD_APISIX_RUNTIME_VERSION} image_base=ubuntu image_tag=20.04
32+
make package type=deb app=apisix-runtime runtime_version=${BUILD_APISIX_RUNTIME_VERSION} image_base=ubuntu image_tag=24.04
3333
34-
- name: run ubuntu 20.04 docker and mapping apisix-runtime deb into container
34+
- name: run ubuntu 24.04 docker and mapping apisix-runtime deb into container
3535
run: |
36-
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name ubuntu20.04Instance --net="host" docker.io/ubuntu:20.04 /bin/bash
36+
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name ubuntu24.04Instance --net="host" docker.io/ubuntu:24.04 /bin/bash
3737
3838
- name: install deb in container
3939
run: |
40-
docker exec ubuntu20.04Instance bash -c "dpkg -i /output/apisix-runtime_${BUILD_APISIX_RUNTIME_VERSION}-0~ubuntu20.04_amd64.deb"
40+
docker exec ubuntu24.04Instance bash -c "dpkg -i /output/apisix-runtime_${BUILD_APISIX_RUNTIME_VERSION}-0~ubuntu24.04_amd64.deb"
4141
4242
- name: check and ensure apisix-runtime is installed
4343
run: |
44-
docker exec ubuntu20.04Instance bash -c "/usr/local/openresty/bin/etcdctl -h" || exit 1
45-
export APISIX_RUNTIME_VER=$(docker exec ubuntu20.04Instance bash -c "openresty -V" 2>&1 | awk '/-O2 -DAPISIX_RUNTIME_VER=/{print $5}' | awk -v FS="=" '{print $2}')
44+
docker exec ubuntu24.04Instance bash -c "/usr/local/openresty/bin/etcdctl -h" || exit 1
45+
export APISIX_RUNTIME_VER=$(docker exec ubuntu24.04Instance bash -c "openresty -V" 2>&1 | awk '/-O2 -DAPISIX_RUNTIME_VER=/{print $5}' | awk -v FS="=" '{print $2}')
4646
if [ "$APISIX_RUNTIME_VER" != "${BUILD_APISIX_RUNTIME_VERSION}" ]; then exit 1; fi
4747
4848
- name: Publish Artifact
4949
uses: actions/[email protected]
5050
with:
51-
name: apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~ubuntu20.04_amd64.deb
52-
path: output/apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~ubuntu20.04_amd64.deb
51+
name: apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~ubuntu24.04_amd64.deb
52+
path: output/apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~ubuntu24.04_amd64.deb
5353
retention-days: 5
5454
if-no-files-found: error

.github/workflows/publish-deb.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,26 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
platform:
19-
- runner: ubuntu-latest
20-
arch: amd64
21-
- runner: ubuntu-24.04-arm
22-
arch: arm64
19+
- runner: ubuntu-latest
20+
arch: amd64
21+
- runner: ubuntu-24.04-arm
22+
arch: arm64
23+
target:
24+
- os: debian
25+
codename: bullseye
26+
release: bullseye-slim
27+
- os: ubuntu
28+
codename: noble
29+
release: 24.04
2330
runs-on: ${{ matrix.platform.runner }}
2431
timeout-minutes: 60
2532
env:
2633
VAR_DEB_WORKBENCH_DIR: /tmp/output
2734
VAR_COS_BUCKET_REPO: ${{ secrets.VAR_COS_BUCKET_REPO }}
2835
VAR_COS_BUCKET_CI: ${{ secrets.VAR_COS_BUCKET_CI }}
29-
VAR_OS: debian
30-
VAR_CODENAME: bullseye
31-
VAR_OS_RELEASE: bullseye-slim
36+
VAR_OS: ${{ matrix.target.os }}
37+
VAR_CODENAME: ${{ matrix.target.codename }}
38+
VAR_OS_RELEASE: ${{ matrix.target.release }}
3239
ARCH: ${{ matrix.platform.arch }}
3340

3441
steps:

test/apisix/Dockerfile.test.apisix.arm64.ubuntu20.04 renamed to test/apisix/Dockerfile.test.apisix.arm64.ubuntu24.04

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG IMAGE_BASE="ubuntu"
2-
ARG IMAGE_TAG="20.04"
2+
ARG IMAGE_TAG="24.04"
33

44
FROM ${IMAGE_BASE}:${IMAGE_TAG}
55

@@ -31,4 +31,4 @@ RUN set -x \
3131
# start etcd and test
3232
CMD ["sh", "-c", "(ETCD_UNSUPPORTED_ARCH=arm64 nohup etcd-$RUNNING_ETCD_VERSION-linux-arm64/etcd >/tmp/etcd.log 2>&1 &) && sleep 10 && apisix start && sleep 3600"]
3333

34-
EXPOSE 9180 9080 9443
34+
EXPOSE 9180 9080 9443

test/apisix/Dockerfile.test.apisix.deb.ubuntu20.04 renamed to test/apisix/Dockerfile.test.apisix.deb.ubuntu24.04

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG IMAGE_BASE="ubuntu"
2-
ARG IMAGE_TAG="20.04"
2+
ARG IMAGE_TAG="24.04"
33

44
FROM ${IMAGE_BASE}:${IMAGE_TAG}
55

0 commit comments

Comments
 (0)