chore: upgrade grpc_client_nginx_module #911
Workflow file for this run
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
name: package apisix 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 | |
services: | |
etcd: | |
image: bitnami/etcd:3.4.0 | |
ports: | |
- 2379:2379 | |
- 2380:2380 | |
env: | |
ALLOW_NONE_AUTHENTICATION: yes | |
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install dependencies | |
run: | | |
sudo apt-get install -y make ruby ruby-dev rubygems build-essential | |
sudo gem install --no-document fpm | |
sudo apt-get install -y rpm | |
- name: packaging APISIX(-remote) with remote code | |
run: | | |
make package type=rpm app=apisix version=master checkout=master image_base=centos image_tag=8 artifact=apisix-remote | |
- name: packaging APISIX(-local) with local code | |
run: | | |
git clone https://github.com/apache/apisix.git | |
make package type=rpm app=apisix version=master checkout=master image_base=centos image_tag=8 local_code_path=./apisix artifact=apisix-local | |
- name: run centos8 docker and mapping rpm into container | |
run: | | |
docker run -itd -v $PWD/output:/output --name centos8Instance --net="host" docker.io/centos:8 /bin/bash | |
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" | |
- name: enable apisix repository in container | |
run: | | |
docker exec centos8Instance bash -c "rpm --import https://repos.apiseven.com/KEYS" | |
docker exec centos8Instance bash -c "yum -y install https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm" | |
- name: install APISIX(-remote) master by rpm in container | |
run: | | |
docker exec centos8Instance bash -c "yum -y localinstall /output/apisix-remote-master-0.el8.x86_64.rpm" | |
docker exec centos8Instance bash -c "apisix start" | |
- name: check and ensure APISIX(-remote) master is installed | |
run: | | |
code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1') | |
if [ ! $code -eq 200 ]; then | |
echo "failed: failed to install Apache APISIX by rpm" | |
exit 1 | |
fi | |
- name: stop and uninstall APISIX(-remote) master | |
run: | | |
docker exec centos8Instance bash -c "pkill -f nginx" | |
docker exec centos8Instance bash -c "yum -y erase apisix-remote-master" | |
- name: install APISIX(-local) by rpm in container | |
run: | | |
docker exec centos8Instance bash -c "yum -y localinstall /output/apisix-local-master-0.el8.x86_64.rpm" | |
docker exec centos8Instance bash -c "apisix start" | |
- name: check and ensure APISIX(-local) is installed | |
run: | | |
code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9180/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1') | |
if [ ! $code -eq 200 ]; then | |
echo "failed: failed to install Apache APISIX by rpm" | |
exit 1 | |
fi |