-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support new package APISIX-runtime (#342)
Signed-off-by: Sn0rt <[email protected]>
- Loading branch information
Showing
20 changed files
with
1,097 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
.github/workflows/package-apisix-runtime-deb-ubuntu20.04.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: package apisix-runtime deb for ubuntu 20.04(Focal Fossa) | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
tags: | ||
- "v*" | ||
paths-ignore: | ||
- '*.md' | ||
pull_request: | ||
branches: [ master ] | ||
paths-ignore: | ||
- '*.md' | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
env: | ||
BUILD_APISIX_RUNTIME_VERSION: 1.0.0 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: install dependencies | ||
run: | | ||
sudo apt-get install -y make ruby ruby-dev rubygems build-essential | ||
- name: build apisix-runtime deb | ||
run: | | ||
make package type=deb app=apisix-runtime version=${BUILD_APISIX_RUNTIME_VERSION} image_base=ubuntu image_tag=20.04 | ||
- name: run ubuntu 20.04 docker and mapping apisix-runtime deb into container | ||
run: | | ||
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 | ||
- name: install dependencies in container | ||
run: | | ||
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get update" | ||
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get install -y libreadline-dev lsb-release libssl-dev perl build-essential" | ||
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends wget gnupg ca-certificates" | ||
docker exec ubuntu20.04Instance bash -c "wget -O - https://openresty.org/package/pubkey.gpg | apt-key add -" | ||
docker exec ubuntu20.04Instance bash -c 'echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/openresty.list' | ||
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get update" | ||
docker exec ubuntu20.04Instance bash -c "DEBIAN_FRONTEND=noninteractive apt-get -y install openresty-openssl111 openresty-pcre openresty-zlib" | ||
- name: install deb in container | ||
run: | | ||
docker exec ubuntu20.04Instance bash -c "dpkg -i /output/apisix-runtime_${BUILD_APISIX_RUNTIME_VERSION}-0~ubuntu20.04_amd64.deb" | ||
- name: check and ensure apisix-runtime is installed | ||
run: | | ||
docker exec ubuntu20.04Instance bash -c "/usr/local/openresty/bin/etcdctl -h" || exit 1 | ||
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}') | ||
if [ "$APISIX_RUNTIME_VER" != "${BUILD_APISIX_RUNTIME_VERSION}" ]; then exit 1; fi | ||
- name: Publish Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~ubuntu20.04_amd64.deb | ||
path: output/apisix-runtime_${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0~ubuntu20.04_amd64.deb | ||
retention-days: 5 | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: package apisix-runtime rpm for el7 | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
tags: | ||
- "v*" | ||
paths-ignore: | ||
- '*.md' | ||
pull_request: | ||
branches: [ master ] | ||
paths-ignore: | ||
- '*.md' | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
env: | ||
BUILD_APISIX_RUNTIME_VERSION: 1.0.0 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: install dependencies | ||
run: | | ||
sudo apt-get install -y make ruby ruby-dev rubygems build-essential | ||
- name: build apisix-runtime rpm | ||
run: | | ||
make package type=rpm app=apisix-runtime version=${BUILD_APISIX_RUNTIME_VERSION} image_base=centos image_tag=7 | ||
- name: run centos7 docker and mapping apisix-runtime rpm into container | ||
run: | | ||
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name centos7Instance --net="host" docker.io/centos:7 /bin/bash | ||
- name: install dependencies in container | ||
run: | | ||
docker exec centos7Instance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo" | ||
docker exec centos7Instance bash -c "yum -y install openresty-openssl111 openresty-pcre openresty-zlib" | ||
- name: install rpm in container | ||
run: | | ||
docker exec centos7Instance bash -c "yum -y localinstall /output/apisix-runtime-${BUILD_APISIX_RUNTIME_VERSION}-0.el7.x86_64.rpm" | ||
- name: check and ensure apisix-runtime is installed | ||
run: | | ||
docker exec centos7Instance bash -c "/usr/local/openresty/bin/etcdctl -h" || exit 1 | ||
export APISIX_RUNTIME_VER=$(docker exec centos7Instance bash -c "openresty -V" 2>&1 | awk '/-O2 -DAPISIX_RUNTIME_VER=/{print $5}' | awk -v FS="=" '{print $2}') | ||
if [ "$APISIX_RUNTIME_VER" != "${BUILD_APISIX_RUNTIME_VERSION}" ]; then exit 1; fi | ||
- name: Publish Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.el7.x86_64.rpm | ||
path: output/apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.el7.x86_64.rpm | ||
retention-days: 5 | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: package apisix-runtime rpm for el8 | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
tags: | ||
- "v*" | ||
paths-ignore: | ||
- '*.md' | ||
pull_request: | ||
branches: [ master ] | ||
paths-ignore: | ||
- '*.md' | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
env: | ||
BUILD_APISIX_RUNTIME_VERSION: 1.0.0 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: install dependencies | ||
run: | | ||
sudo apt-get install -y make ruby ruby-dev rubygems build-essential | ||
- name: build apisix-runtime rpm | ||
run: | | ||
make package type=rpm app=apisix-runtime version=${BUILD_APISIX_RUNTIME_VERSION} image_base=centos image_tag=8 | ||
- name: run centos8 docker and mapping apisix-runtime rpm into container | ||
run: | | ||
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name centos8Instance --net="host" docker.io/centos:8 /bin/bash | ||
- name: install dependencies in container | ||
run: | | ||
docker exec centos8Instance bash -c "sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*" | ||
docker exec centos8Instance bash -c "sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*" | ||
docker exec centos8Instance bash -c "dnf install -y centos-release-stream" | ||
docker exec centos8Instance bash -c "dnf swap -y centos-{linux,stream}-repos" | ||
docker exec centos8Instance bash -c "dnf distro-sync -y" | ||
docker exec centos8Instance bash -c "dnf install -y yum-utils" | ||
docker exec centos8Instance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo" | ||
docker exec centos8Instance bash -c "yum -y install openresty-openssl111 openresty-pcre openresty-zlib" | ||
- name: install rpm in container | ||
run: | | ||
docker exec centos8Instance bash -c "yum -y localinstall /output/apisix-runtime-${BUILD_APISIX_RUNTIME_VERSION}-0.el8.x86_64.rpm" | ||
- name: check and ensure apisix-runtime is installed | ||
run: | | ||
docker exec centos8Instance bash -c "/usr/local/openresty/bin/etcdctl -h" || exit 1 | ||
export APISIX_RUNTIME_VER=$(docker exec centos8Instance bash -c "openresty -V" 2>&1 | awk '/-O2 -DAPISIX_RUNTIME_VER=/{print $5}' | awk -v FS="=" '{print $2}') | ||
if [ "$APISIX_RUNTIME_VER" != "${BUILD_APISIX_RUNTIME_VERSION}" ]; then exit 1; fi | ||
- name: Publish Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.el8.x86_64.rpm | ||
path: output/apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.el8.x86_64.rpm | ||
retention-days: 5 | ||
if-no-files-found: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: package apisix-runtime rpm for ubi | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
tags: | ||
- "v*" | ||
paths-ignore: | ||
- '*.md' | ||
pull_request: | ||
branches: [ master ] | ||
paths-ignore: | ||
- '*.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
env: | ||
BUILD_APISIX_RUNTIME_VERSION: 1.0.0 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: install dependencies | ||
run: | | ||
sudo apt-get install -y make ruby ruby-dev rubygems build-essential | ||
- name: build apisix-runtime rpm | ||
run: | | ||
make package type=rpm app=apisix-runtime version=${BUILD_APISIX_RUNTIME_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6 | ||
- name: run ubi8 docker and mapping apisix-runtime rpm into container | ||
run: | | ||
docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name ubiInstance --net="host" registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash | ||
- name: install dependencies in container | ||
run: | | ||
docker exec ubiInstance bash -c "dnf install -y yum-utils" | ||
docker exec ubiInstance bash -c "yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo" | ||
docker exec ubiInstance bash -c "yum -y install openresty-openssl111 openresty-pcre openresty-zlib" | ||
- name: install rpm in container | ||
run: | | ||
docker exec ubiInstance bash -c "ls -la /output" | ||
docker exec ubiInstance bash -c "yum -y localinstall /output/apisix-runtime-${BUILD_APISIX_RUNTIME_VERSION}-0.ubi8.6.x86_64.rpm" | ||
- name: check and ensure apisix-runtime is installed | ||
run: | | ||
docker exec ubiInstance bash -c "/usr/local/openresty/bin/etcdctl -h" || exit 1 | ||
export APISIX_RUNTIME_VER=$(docker exec ubiInstance bash -c "openresty -V" 2>&1 | awk '/-O2 -DAPISIX_RUNTIME_VER=/{print $5}' | awk -v FS="=" '{print $2}') | ||
if [ "$APISIX_RUNTIME_VER" != "${BUILD_APISIX_RUNTIME_VERSION}" ]; then exit 1; fi | ||
- name: Publish Artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.ubi8.6.x86_64.rpm | ||
path: output/apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.ubi8.6.x86_64.rpm | ||
retention-days: 5 | ||
if-no-files-found: error |
Oops, something went wrong.