diff --git a/.github/workflows/package-apisix-dashboard-el7-buildx.yml b/.github/workflows/package-apisix-dashboard-el7-buildx.yml deleted file mode 100644 index 92dafcdba..000000000 --- a/.github/workflows/package-apisix-dashboard-el7-buildx.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: package apisix-dashabord rpm for el7 using buildx - -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: - DASHBOARD_VERSION: "3.0.1" - DASHBOARD_BRANCH: "release/3.0" - 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 - - - uses: docker/setup-buildx-action@v1 - - - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-apisixdashboard-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-apisixdashboard- - ${{ runner.os }}-buildx- - - - name: run apisix-dashboard packaging test - run: | - make package type=rpm app=dashboard version=${DASHBOARD_VERSION} checkout=${DASHBOARD_BRANCH} image_base=centos image_tag=7 buildx=True - - - name: Run centos7 docker and mapping rpm into container - run: | - docker run -itd -v $PWD/output:/apisix-dashboard --name centos7Instance --net="host" docker.io/centos:7 /bin/bash - - - name: Install rpm package - run: | - docker exec centos7Instance bash -c "yum install -y /apisix-dashboard/apisix-dashboard-${DASHBOARD_VERSION}-0.el7.x86_64.rpm" - docker logs centos7Instance - docker exec centos7Instance bash -c "cd /usr/local/apisix/dashboard/ && nohup ./manager-api &" - - - name: Run test cases - run: | - code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9000) - if [ ! $code -eq 200 ]; then - echo "failed: failed to install Apache APISIX Dashboard by rpm" - exit 1 - fi diff --git a/.github/workflows/package-apisix-dashboard-rpm-el7.yml b/.github/workflows/package-apisix-dashboard-rpm-el7.yml deleted file mode 100644 index 8afb83961..000000000 --- a/.github/workflows/package-apisix-dashboard-rpm-el7.yml +++ /dev/null @@ -1,140 +0,0 @@ -name: package apisix-dashabord 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-20.04 - timeout-minutes: 60 - env: - DASHBOARD_VERSION: "3.0.1" - DASHBOARD_BRANCH: "release/3.0" - 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: run apisix-dashboard(-remote) packaging test - run: | - make package type=rpm app=dashboard version=${DASHBOARD_VERSION} checkout=${DASHBOARD_BRANCH} \ - image_base=centos image_tag=7 artifact=apisix-dashboard-remote - - - name: run apisix-dashboard(-local) packaging test - run: | - git clone -b ${DASHBOARD_BRANCH} https://github.com/apache/apisix-dashboard.git - make package type=rpm app=dashboard version=${DASHBOARD_VERSION} checkout=${DASHBOARD_BRANCH} \ - image_base=centos image_tag=7 local_code_path=./apisix-dashboard artifact=apisix-dashboard-local - - - name: Run centos7 docker and mapping rpm into container - run: | - docker run -itd -v $PWD/output:/apisix-dashboard --name centos7Instance --net="host" docker.io/centos:7 /bin/bash - - - name: Install apisix-dashboard(-remote) rpm package - run: | - docker exec centos7Instance bash -c "yum install -y /apisix-dashboard/apisix-dashboard-remote-${DASHBOARD_VERSION}-0.el7.x86_64.rpm" - docker logs centos7Instance - docker exec centos7Instance bash -c "cd /usr/local/apisix/dashboard/ && nohup ./manager-api &" - - - name: Run apisix-dashboard(-remote) test cases - run: | - code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9000) - if [ ! $code -eq 200 ]; then - echo "failed: failed to install Apache APISIX Dashboard by rpm" - exit 1 - fi - - - name: stop and uninstall apisix-dashboard(-remote) - run: | - docker exec centos7Instance bash -c "pkill -f manager-api" - docker exec centos7Instance bash -c "yum -y erase apisix-dashboard-remote-${DASHBOARD_VERSION}" - - - name: Install apisix-dashboard(-local) rpm package - run: | - docker exec centos7Instance bash -c "yum install -y /apisix-dashboard/apisix-dashboard-local-${DASHBOARD_VERSION}-0.el7.x86_64.rpm" - docker logs centos7Instance - docker exec centos7Instance bash -c "cd /usr/local/apisix/dashboard/ && nohup ./manager-api &" - - - name: Run apisix-dashboard(-local) test cases - run: | - code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9000) - if [ ! $code -eq 200 ]; then - echo "failed: failed to install Apache APISIX Dashboard by rpm" - exit 1 - fi - - - name: Rename rpm package - run: | - mv output/apisix-dashboard-local-${DASHBOARD_VERSION}-0.el7.x86_64.rpm output/apisix-dashboard-${DASHBOARD_VERSION}-0.el7.x86_64.rpm - - - name: Publish Artifact - uses: actions/upload-artifact@v4.0.0 - with: - name: apisix-dashboard-${{ env.DASHBOARD_VERSION }}-0.el7.x86_64.rpm - path: output/apisix-dashboard-${{ env.DASHBOARD_VERSION }}-0.el7.x86_64.rpm - retention-days: 5 - if-no-files-found: error - test: - runs-on: ubuntu-20.04 - needs: build - env: - DASHBOARD_VERSION: "3.0.1" - 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: - - name: Install podman - run: | - sudo apt update - sudo apt -y install podman - - - name: Download artifact - uses: actions/download-artifact@v4.0.0 - with: - name: apisix-dashboard-${{ env.DASHBOARD_VERSION }}-0.el7.x86_64.rpm - - - name: Start CentOS 7 container - run: | - sudo podman run -d --name test --systemd true --net host centos:7 /usr/lib/systemd/systemd - sudo podman cp apisix-dashboard-${{ env.DASHBOARD_VERSION }}-0.el7.x86_64.rpm test:/apisix-dashboard-${{ env.DASHBOARD_VERSION }}-0.el7.x86_64.rpm - sudo podman exec test rpm -ivh /apisix-dashboard-${{ env.DASHBOARD_VERSION }}-0.el7.x86_64.rpm - sudo podman exec test systemctl start apisix-dashboard - - - name: Test APISIX Dashboard status - run: | - code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9000) - if [ ! $code -eq 200 ]; then - echo "failed: failed to install Apache APISIX Dashboard by rpm" - exit 1 - fi diff --git a/.github/workflows/package-apisix-dashboard-rpm-el8.yml b/.github/workflows/package-apisix-dashboard-rpm-el8.yml deleted file mode 100644 index 59eb459c1..000000000 --- a/.github/workflows/package-apisix-dashboard-rpm-el8.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: package apisix-dashabord 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: - DASHBOARD_VERSION: "3.0.1" - DASHBOARD_BRANCH: "release/3.0" - 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: run apisix-dashboard packaging test - run: | - make package type=rpm app=dashboard version=${DASHBOARD_VERSION} checkout=${DASHBOARD_BRANCH} image_base=centos image_tag=8 - - - name: Run centos8 docker and mapping rpm into container - run: | - docker run -itd -v $PWD/output:/apisix-dashboard --name centos8Instance --net="host" docker.io/centos:8 /bin/bash - - - name: Install rpm package - 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 "yum install -y /apisix-dashboard/apisix-dashboard-${DASHBOARD_VERSION}-0.el8.x86_64.rpm" - docker logs centos8Instance - docker exec centos8Instance bash -c "cd /usr/local/apisix/dashboard/ && nohup ./manager-api &" - - - name: Run test cases - run: | - code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9000) - if [ ! $code -eq 200 ]; then - echo "failed: failed to install Apache APISIX Dashboard by rpm" - exit 1 - fi - - - name: Publish Artifact - uses: actions/upload-artifact@v4.0.0 - with: - name: apisix-dashboard-${{ env.DASHBOARD_VERSION }}-0.el8.x86_64.rpm - path: output/apisix-dashboard-${{ env.DASHBOARD_VERSION }}-0.el8.x86_64.rpm - retention-days: 5 - if-no-files-found: error diff --git a/.github/workflows/package-apisix-deb-ubuntu20.04.yml b/.github/workflows/package-apisix-deb-ubuntu20.04.yml index e57e38972..77aa5b2d0 100644 --- a/.github/workflows/package-apisix-deb-ubuntu20.04.yml +++ b/.github/workflows/package-apisix-deb-ubuntu20.04.yml @@ -39,8 +39,12 @@ jobs: - name: start apisix and test run: | - docker run -d --rm --name apisix-${PACKAGE_APISIX_VERSION}-deb-test -v $(pwd)/test/apisix/config.yaml:/usr/local/apisix/conf/config.yaml -p 9180:9180 -p 9080:9080 -p 9443:9443 apache/apisix:${PACKAGE_APISIX_VERSION}-deb-test + docker run -d --name apisix-${PACKAGE_APISIX_VERSION}-deb-test -v $(pwd)/test/apisix/config.yaml:/usr/local/apisix/conf/config.yaml -p 9180:9180 -p 9080:9080 -p 9443:9443 apache/apisix:${PACKAGE_APISIX_VERSION}-deb-test sleep 20 + + docker ps -a + docker logs apisix-${PACKAGE_APISIX_VERSION}-deb-test + curl http://127.0.0.1:9180/apisix/admin/routes/1 \ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' { diff --git a/.github/workflows/package-apisix-rpm-el7.yml b/.github/workflows/package-apisix-rpm-el7.yml deleted file mode 100644 index ff0d9cd02..000000000 --- a/.github/workflows/package-apisix-rpm-el7.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: package apisix 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: - APISIX_VERSION: master - 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: | - wget https://raw.githubusercontent.com/apache/apisix/${APISIX_VERSION}/.requirements && source .requirements - make package type=rpm app=apisix version=master checkout=${APISIX_VERSION} runtime_version=${APISIX_RUNTIME} image_base=centos image_tag=7 artifact=apisix-remote - - - name: packaging APISIX(-local) with local code - run: | - wget https://raw.githubusercontent.com/apache/apisix/${APISIX_VERSION}/.requirements && source .requirements - git clone -b ${APISIX_VERSION} https://github.com/apache/apisix.git - make package type=rpm app=apisix version=master checkout=${APISIX_VERSION} runtime_version=${APISIX_RUNTIME} image_base=centos image_tag=7 local_code_path=./apisix artifact=apisix-local - - - name: run centos7 docker and mapping rpm into container - run: | - docker run -itd -v $PWD/output:/output --name centos7Instance --net="host" docker.io/centos:7 /bin/bash - - - name: enable apisix repository in container - run: | - docker exec centos7Instance bash -c "rpm --import https://repos.apiseven.com/KEYS" - docker exec centos7Instance 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 centos7Instance bash -c "yum -y localinstall /output/apisix-remote-master-0.el7.x86_64.rpm" - docker exec centos7Instance 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 centos7Instance bash -c "pkill -f nginx" - docker exec centos7Instance bash -c "yum -y erase apisix-remote-master" - - - name: install APISIX(-local) by rpm in container - run: | - docker exec centos7Instance bash -c "yum -y localinstall /output/apisix-local-master-0.el7.x86_64.rpm" - docker exec centos7Instance 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 - - - name: Publish Artifact - uses: actions/upload-artifact@v4.0.0 - with: - name: apisix-master-0.el7.x86_64.rpm - path: output/apisix-remote-master-0.el7.x86_64.rpm - retention-days: 5 - if-no-files-found: error diff --git a/.github/workflows/package-apisix-rpm-el8.yml b/.github/workflows/package-apisix-rpm-el8.yml deleted file mode 100644 index 8c4ade75c..000000000 --- a/.github/workflows/package-apisix-rpm-el8.yml +++ /dev/null @@ -1,104 +0,0 @@ -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 - env: - APISIX_VERSION: master - 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: | - wget https://raw.githubusercontent.com/apache/apisix/${APISIX_VERSION}/.requirements && source .requirements - make package type=rpm app=apisix version=master checkout=${APISIX_VERSION} runtime_version=${APISIX_RUNTIME} image_base=centos image_tag=8 artifact=apisix-remote - - - name: packaging APISIX(-local) with local code - run: | - wget https://raw.githubusercontent.com/apache/apisix/${APISIX_VERSION}/.requirements && source .requirements - git clone -b ${APISIX_VERSION} https://github.com/apache/apisix.git - make package type=rpm app=apisix version=master checkout=${APISIX_VERSION} runtime_version=${APISIX_RUNTIME} 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 - - - name: Publish Artifact - uses: actions/upload-artifact@v4.0.0 - with: - name: apisix-master-0.el8.x86_64.rpm - path: output/apisix-remote-master-0.el8.x86_64.rpm - retention-days: 5 - if-no-files-found: error diff --git a/.github/workflows/package-apisix-rpm-ubi.yml b/.github/workflows/package-apisix-rpm-ubi.yml index 0025c5071..c50b05f12 100644 --- a/.github/workflows/package-apisix-rpm-ubi.yml +++ b/.github/workflows/package-apisix-rpm-ubi.yml @@ -50,7 +50,7 @@ jobs: - name: run ubi8 docker and mapping rpm into container run: | - docker run -itd -v $PWD/output:/output --name ubiInstance --net="host" registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash + docker run -itd -v $PWD/output:/output -v $(pwd)/test/apisix/config.yaml:/usr/local/apisix/conf/config.yaml --name ubiInstance --net="host" registry.access.redhat.com/ubi8/ubi:8.6 /bin/bash - name: enable apisix repository in container run: | @@ -72,7 +72,8 @@ jobs: - name: stop and uninstall APISIX(-remote) master run: | - docker exec ubiInstance bash -c 'PIDS=$(pgrep -f nginx); for PID in $PIDS; do kill -TERM $PID; done' + docker exec ubiInstance bash -c 'yum -y install procps-ng' + docker exec ubiInstance bash -c 'PIDS=$(pgrep -f nginx); for PID in $PIDS; do kill -TERM $PID; done' || echo "this echo will make exit code 0" docker exec ubiInstance bash -c "yum -y erase apisix-remote-master" - name: install APISIX(-local) by rpm in container diff --git a/.github/workflows/package-apisix-runtime-rpm-el7.yml b/.github/workflows/package-apisix-runtime-rpm-el7.yml deleted file mode 100644 index 8413bc74a..000000000 --- a/.github/workflows/package-apisix-runtime-rpm-el7.yml +++ /dev/null @@ -1,54 +0,0 @@ -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.1 - 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 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 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/upload-artifact@v4.0.0 - 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 diff --git a/.github/workflows/package-apisix-runtime-rpm-el8.yml b/.github/workflows/package-apisix-runtime-rpm-el8.yml deleted file mode 100644 index 3d66176ec..000000000 --- a/.github/workflows/package-apisix-runtime-rpm-el8.yml +++ /dev/null @@ -1,63 +0,0 @@ -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.1 - 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 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" - - - 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/upload-artifact@v4.0.0 - 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 diff --git a/build-apisix-base.sh b/build-apisix-base.sh index f4038bdd0..735a29d6e 100755 --- a/build-apisix-base.sh +++ b/build-apisix-base.sh @@ -4,9 +4,9 @@ set -x version=${version:-0.0.0} -OPENRESTY_VERSION=${OPENRESTY_VERSION:-1.25.3.1} +OPENRESTY_VERSION=${OPENRESTY_VERSION:-1.25.3.2} if [ "$OPENRESTY_VERSION" == "source" ] || [ "$OPENRESTY_VERSION" == "default" ]; then - OPENRESTY_VERSION="1.25.3.1" + OPENRESTY_VERSION="1.25.3.2" fi if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then @@ -21,7 +21,7 @@ if ([ $# -gt 0 ] && [ "$1" == "latest" ]) || [ "$version" == "latest" ]; then else ngx_multi_upstream_module_ver="1.2.0" mod_dubbo_ver="1.0.2" - apisix_nginx_module_ver="1.16.0" + apisix_nginx_module_ver="1.16.1" wasm_nginx_module_ver="0.7.0" lua_var_nginx_module_ver="v0.5.3" lua_resty_events_ver="0.2.0" diff --git a/build-apisix-runtime.sh b/build-apisix-runtime.sh index 8895b3d4c..31ad8f9b1 100755 --- a/build-apisix-runtime.sh +++ b/build-apisix-runtime.sh @@ -21,10 +21,10 @@ ld_opt=${ld_opt:-"-L$zlib_prefix/lib -L$pcre_prefix/lib -L$OPENSSL_PREFIX/lib -W # dependencies for building openresty OPENSSL_VERSION=${OPENSSL_VERSION:-"3.2.0"} -OPENRESTY_VERSION="1.25.3.1" +OPENRESTY_VERSION="1.25.3.2" ngx_multi_upstream_module_ver="1.2.0" mod_dubbo_ver="1.0.2" -apisix_nginx_module_ver="1.16.0" +apisix_nginx_module_ver="1.16.1" wasm_nginx_module_ver="0.7.0" lua_var_nginx_module_ver="v0.5.3" lua_resty_events_ver="0.2.0" @@ -37,7 +37,7 @@ install_openssl_3(){ fi # required for openssl 3.x config cpanm IPC/Cmd.pm - wget --no-check-certificate https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz + wget --no-check-certificate https://github.com/openssl/openssl/releases/download/openssl-3.2.0/openssl-${OPENSSL_VERSION}.tar.gz tar xvf openssl-${OPENSSL_VERSION}.tar.gz cd openssl-${OPENSSL_VERSION}/ export LDFLAGS="-Wl,-rpath,$zlib_prefix/lib:$OPENSSL_PREFIX/lib" diff --git a/dockerfiles/Dockerfile.apisix.deb b/dockerfiles/Dockerfile.apisix.deb index ac774f204..a0e5f8e16 100644 --- a/dockerfiles/Dockerfile.apisix.deb +++ b/dockerfiles/Dockerfile.apisix.deb @@ -22,6 +22,7 @@ ARG IMAGE_TAG ARG CODE_PATH # install dependencies +RUN apt-get update && apt-get install -y libyaml-dev RUN /install-common.sh install_apisix_dependencies_deb ENV checkout_v=${checkout_v} diff --git a/dockerfiles/Dockerfile.apisix.rpm b/dockerfiles/Dockerfile.apisix.rpm index 509f2a76c..4697a98d0 100644 --- a/dockerfiles/Dockerfile.apisix.rpm +++ b/dockerfiles/Dockerfile.apisix.rpm @@ -31,6 +31,7 @@ ARG IMAGE_TAG ARG CODE_PATH # install dependencies +RUN yum install -y libyaml-devel RUN /install-common.sh install_apisix_dependencies_rpm ENV checkout_v=${checkout_v} diff --git a/package-apisix.sh b/package-apisix.sh index 1ac97b1e5..c31f9fdc5 100755 --- a/package-apisix.sh +++ b/package-apisix.sh @@ -8,10 +8,12 @@ ARCH=${ARCH:-`(uname -m | tr '[:upper:]' '[:lower:]')`} # Determine the dependencies dep_ldap="openldap-devel" +dep_libyaml="libyaml-devel" if [ "$PACKAGE_TYPE" == "deb" ] then # the pkg contains the so library could be libldap-2.5 or libldap-2.4-2 dep_ldap="libldap2-dev" + dep_libyaml="libyaml-dev" fi dep_pcre="pcre" if [ "$PACKAGE_TYPE" == "deb" ] @@ -59,6 +61,7 @@ then -d "$dep_ldap" \ -d "$dep_pcre" \ -d "$dep_which" \ + -d "$dep_libyaml" \ --post-install post-install-apisix-runtime.sh \ --description 'Apache APISIX is a distributed gateway for APIs and Microservices, focused on high performance and reliability.' \ --license "ASL 2.0" \ @@ -67,8 +70,7 @@ then --url 'http://apisix.apache.org/' \ --config-files usr/lib/systemd/system/apisix.service \ --config-files usr/lib/systemd/system/openresty.service \ - --config-files usr/local/apisix/conf/config.yaml \ - --config-files usr/local/apisix/conf/config-default.yaml + --config-files usr/local/apisix/conf/config.yaml else fpm -f -s dir -t "$PACKAGE_TYPE" \ --"$PACKAGE_TYPE"-dist "$dist" \ @@ -87,8 +89,7 @@ else -p /output \ --url 'http://apisix.apache.org/' \ --config-files usr/lib/systemd/system/apisix.service \ - --config-files usr/local/apisix/conf/config.yaml \ - --config-files usr/local/apisix/conf/config-default.yaml + --config-files usr/local/apisix/conf/config.yaml fi PACKAGE_ARCH="amd64" diff --git a/test/apisix/Dockerfile.test.apisix.arm64.ubuntu20.04 b/test/apisix/Dockerfile.test.apisix.arm64.ubuntu20.04 index c3cf0b53e..f00b577d6 100644 --- a/test/apisix/Dockerfile.test.apisix.arm64.ubuntu20.04 +++ b/test/apisix/Dockerfile.test.apisix.arm64.ubuntu20.04 @@ -25,7 +25,7 @@ RUN set -x \ # install apisix RUN set -x \ && /install-common.sh install_etcd \ - && apt install -y libldap2-dev \ + && apt install -y libldap2-dev libyaml-dev \ && dpkg -i /apisix_${APISIX_VERSION}-0~${IMAGE_BASE}${IMAGE_TAG}_arm64.deb # start etcd and test diff --git a/test/apisix/Dockerfile.test.apisix.deb.ubuntu20.04 b/test/apisix/Dockerfile.test.apisix.deb.ubuntu20.04 index e84e17ee2..d942eb41a 100644 --- a/test/apisix/Dockerfile.test.apisix.deb.ubuntu20.04 +++ b/test/apisix/Dockerfile.test.apisix.deb.ubuntu20.04 @@ -29,7 +29,7 @@ RUN /install-common.sh install_etcd # install apisix RUN set -x \ - && apt install -y libldap2-dev \ + && apt install -y libldap2-dev libyaml-dev \ && dpkg -i /apisix_${APISIX_VERSION}-0~${IMAGE_BASE}${IMAGE_TAG}_amd64.deb # start etcd and test diff --git a/test/apisix/config.yaml b/test/apisix/config.yaml index 7bfbb4138..ab740298f 100644 --- a/test/apisix/config.yaml +++ b/test/apisix/config.yaml @@ -1,4 +1,8 @@ deployment: admin: allow_admin: - - 0.0.0.0/0 \ No newline at end of file + - 0.0.0.0/0 + admin_key: + - name: admin + key: 'edd1c9f034335f136f87ad84b625c8f1' + role: admin diff --git a/utils/install-common.sh b/utils/install-common.sh index f46b13c80..f007207dd 100755 --- a/utils/install-common.sh +++ b/utils/install-common.sh @@ -23,8 +23,7 @@ install_dependencies_rpm() { yum install -y --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms yum-utils else yum install -y wget tar gcc automake autoconf libtool make curl git which unzip sudo - yum install -y epel-release - yum install -y yum-utils readline-devel + yum install -y yum-utils fi } @@ -112,6 +111,7 @@ install_apisix() { else echo '' fi + sed -i '1i package.path = "/usr/local/apisix/deps/share/lua/5.1/?/init.lua;" .. package.path' /tmp/build/output/apisix/usr/local/apisix/apisix/cli/apisix.lua # delete unnecessary files rm -rf /tmp/build/output/apisix/usr/local/apisix/deps/lib64/luarocks rm -rf /tmp/build/output/apisix/usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/master-"${iteration}"/doc