Skip to content

Commit 8651d4a

Browse files
authored
feat: packaging apisix based on apisix-runtime (#353)
1 parent 1dcdaeb commit 8651d4a

File tree

5 files changed

+21
-9
lines changed

5 files changed

+21
-9
lines changed

.github/workflows/publish-deb.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,20 @@ jobs:
4646
echo "##[error]Tag type is not correct, please check it."
4747
exit 1
4848
49-
- name: Build apisix or apisix-base deb Package
50-
if: ${{ env.TAG_TYPE == 'apisix' || env.TAG_TYPE == 'apisix-base' }}
49+
- name: Build apisix-base deb Package
50+
if: ${{ env.TAG_TYPE == 'apisix-base' }}
5151
run: |
52-
echo build ${TAG_TYPE} deb package
53-
echo version ${TAG_VERSION}
54-
5552
make package type=deb app=${TAG_TYPE} checkout=${TAG_VERSION} version=${TAG_VERSION} image_base=${VAR_OS} image_tag=${VAR_OS_RELEASE} openresty=apisix-base
5653
mv ./output/${TAG_TYPE}_${TAG_VERSION}-0~${VAR_OS}${VAR_OS_RELEASE}_amd64.deb ${VAR_DEB_WORKBENCH_DIR}
5754
55+
- name: Build apisix deb Package
56+
if: ${{ env.TAG_TYPE == 'apisix' }}
57+
run: |
58+
wget https://raw.githubusercontent.com/apache/apisix/${TAG_VERSION}/.requirements && source .requirements
59+
60+
make package type=deb app=${TAG_TYPE} checkout=${TAG_VERSION} version=${TAG_VERSION} image_base=${VAR_OS} image_tag=${VAR_OS_RELEASE} openresty=apisix-runtime runtime_version=${APISIX_RUNTIME}
61+
mv ./output/${TAG_TYPE}_${TAG_VERSION}-0~${VAR_OS}${VAR_OS_RELEASE}_amd64.deb ${VAR_DEB_WORKBENCH_DIR}
62+
5863
- name: Upload apisix/apisix-base Artifact
5964
uses: actions/[email protected]
6065
with:

.github/workflows/publish.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,13 @@ jobs:
5353
env:
5454
APISIX_TAG_VERSION: ${{ steps.tag_env.outputs.version}}
5555
run: |
56+
wget https://raw.githubusercontent.com/apache/apisix/${APISIX_TAG_VERSION}/.requirements
57+
source .requirements
58+
5659
# build apisix
57-
make package type=rpm app=apisix openresty=apisix-base checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=centos image_tag=7
58-
make package type=rpm app=apisix openresty=apisix-base checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=centos image_tag=8
59-
make package type=rpm app=apisix openresty=apisix-base checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6
60+
make package type=rpm app=apisix openresty=apisix-runtime runtime_version=${APISIX_RUNTIME} checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=centos image_tag=7
61+
make package type=rpm app=apisix openresty=apisix-runtime runtime_version=${APISIX_RUNTIME} checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=centos image_tag=8
62+
make package type=rpm app=apisix openresty=apisix-runtime runtime_version=${APISIX_RUNTIME} checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6
6063
mv ./output/apisix-${APISIX_TAG_VERSION}-0.{el7,el8,ubi8.6}.x86_64.rpm ${VAR_RPM_WORKBENCH_DIR}
6164
echo "TARGET_APP=apisix" >> "$GITHUB_ENV"
6265

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ iteration=0
2525
local_code_path=0
2626
openresty="openresty"
2727
artifact="0"
28+
runtime_version="0"
2829
apisix_repo="https://github.com/apache/apisix"
2930
dashboard_repo="https://github.com/apache/apisix-dashboard"
3031

@@ -103,6 +104,7 @@ define package
103104
--build-arg VERSION=$(version) \
104105
--build-arg ITERATION=$(iteration) \
105106
--build-arg PACKAGE_VERSION=$(version) \
107+
--build-arg RUNTIME_VERSION=$(runtime_version) \
106108
--build-arg PACKAGE_TYPE=$(2) \
107109
--build-arg OPENRESTY=$(openresty) \
108110
--build-arg ARTIFACT=$(artifact) \

dockerfiles/Dockerfile.package.apisix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ ARG PACKAGE_VERSION
99
ARG PACKAGE_TYPE
1010
ARG OPENRESTY
1111
ARG ARTIFACT
12+
ARG RUNTIME_VERSION
1213

1314
ENV ITERATION=${ITERATION}
1415
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
1516
ENV PACKAGE_TYPE=${PACKAGE_TYPE}
1617
ENV OPENRESTY=${OPENRESTY}
18+
ENV RUNTIME_VERSION=${RUNTIME_VERSION}
1719
ENV ARTIFACT=${ARTIFACT}
1820

1921
COPY --from=APISIX /tmp/build/output /tmp/build/output

package-apisix.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ then
5656
-a "$(uname -i)" \
5757
-v "$PACKAGE_VERSION" \
5858
--iteration "$ITERATION" \
59-
-d "$OPENRESTY == $VERSION" \
59+
-d "$OPENRESTY = $RUNTIME_VERSION" \
6060
-d "$dep_ldap" \
6161
-d "$dep_pcre" \
6262
-d "$dep_which" \

0 commit comments

Comments
 (0)