diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 55b78738b..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,263 +0,0 @@ -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/2.0/configuration-reference -version: 2.1 -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs -jobs: - build-apisix-runtime: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor - machine: - image: ubuntu-2004:202101-01 - resource_class: arm.medium - environment: - BUILD_APISIX_RUNTIME_VERSION: 0-latest - steps: - - checkout - - run: - name: install dependencies - command: | - sudo apt-get install -y make ruby ruby-dev rubygems build-essential - - run: - name: build apisix-runtime rpm - command: | - make package type=rpm app=apisix-runtime runtime_version=${BUILD_APISIX_RUNTIME_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6 - - run: - name: run ubi8 docker and mapping apisix-runtime rpm into container - command: | - 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 - - run: - name: install rpm in container - command: | - 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" - - run: - name: check and ensure apisix-runtime is installed - command: | - 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}') - - build-apisix: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor - machine: - image: ubuntu-2004:202101-01 - resource_class: arm.medium - environment: - PACKAGE_APISIX_VERSION: 0-latest - steps: - - checkout - - run: - name: install dependencies - command: | - sudo apt-get install -y make - - run: - name: package apisx - command: | - wget https://raw.githubusercontent.com/apache/apisix/master/.requirements && source .requirements - make package type=deb app=apisix version=${PACKAGE_APISIX_VERSION} runtime_version=${APISIX_RUNTIME} checkout=master image_base=ubuntu image_tag=20.04 - - run: - name: install apisix deb into container - command: | - docker build -t apache/apisix:${PACKAGE_APISIX_VERSION}-deb-test --build-arg APISIX_VERSION=${PACKAGE_APISIX_VERSION} -f test/apisix/Dockerfile.test.apisix.arm64.ubuntu20.04 . - - run: - name: start apisix and test - command: | - 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 - sleep 20 - curl http://127.0.0.1:9180/apisix/admin/routes/1 \ - -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d ' - { - "uri": "/get", - "upstream": { - "type": "roundrobin", - "nodes": { - "httpbin.org:80": 1 - } - } - }' - result_code=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/get` - if [[ $result_code -ne 200 ]]; then - printf "result_code: %s\n" "$result_code" - exit 125 - fi - - build-and-push-apisix-runtime-dev-arm: - machine: - image: ubuntu-2004:202101-01 - resource_class: arm.medium - - steps: - - checkout - - run: - name: submodule - command: | - git submodule sync - git submodule update --init - - - run: - name: Build and Push Docker Image - command: | - echo "$DOCKERHUB_TOKEN" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin - docker buildx build -t api7/apisix-runtime:dev-arm64 --push \ - --build-arg VERSION=dev --build-arg BUILD_LATEST=latest \ - -f ./dockerfiles/Dockerfile.apisix-runtime.deb . - - build-and-push-apisix-runtime-dev-x86: - machine: - image: ubuntu-2004:202101-01 - resource_class: medium - - steps: - - checkout - - run: - name: submodule - command: | - git submodule sync - git submodule update --init - - - run: - name: Build and Push Docker Image - command: | - echo "$DOCKERHUB_TOKEN" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin - docker buildx build -t api7/apisix-runtime:dev-x86_64 --push \ - --build-arg VERSION=dev --build-arg BUILD_LATEST=latest \ - -f ./dockerfiles/Dockerfile.apisix-runtime.deb . - - upload-manifest-apisix-runtime-dev: - docker: - - image: cimg/python:3.8.2 - steps: - - checkout - - deploy: - name: "Upload apisix-runtime manifest to registry" - command: | - set -eu - export DOCKER_CLI_EXPERIMENTAL=enabled - echo "$DOCKERHUB_TOKEN" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin - docker manifest create api7/apisix-runtime:dev \ - api7/apisix-runtime:dev-arm64 \ - api7/apisix-runtime:dev-x86_64 - docker manifest push api7/apisix-runtime:dev - - build-arm64-package: - parameters: - var_os: - type: string - var_os_release: - type: string - var_build_rpm: - type: boolean - default: false - machine: - image: ubuntu-2004:202101-01 - resource_class: arm.medium - environment: - VAR_WORKBENCH_DIR: /tmp/output - steps: - - checkout - - run: - name: Init basic publish env - command: | - mkdir -p "${VAR_WORKBENCH_DIR}" - sudo apt-get update - - - when: - condition: << parameters.var_build_rpm >> - steps: - - run: - command: | - echo 'export PACK_TYPE=rpm' >> $BASH_ENV - - unless: - condition: << parameters.var_build_rpm >> - steps: - - run: - command: | - echo 'export PACK_TYPE=deb' >> $BASH_ENV - - - when: - condition: - # enclose a pattern in ^ and $ to avoid accidental partial matches - # https://circleci.com/docs/2.0/configuration-reference#logic-statements - matches: { pattern: "^apisix/(.*)\\d+$", value: << pipeline.git.tag >> } - steps: - - run: - name: build apisix package - command: | - APISIX_TAG_VERSION=$(echo ${CIRCLE_TAG##*/}) - wget https://raw.githubusercontent.com/apache/apisix/${APISIX_TAG_VERSION}/.requirements && source .requirements - - echo "apisix version: $APISIX_TAG_VERSION" - make package type=${PACK_TYPE} app=apisix openresty=apisix-runtime runtime_version=${APISIX_RUNTIME} checkout=${APISIX_TAG_VERSION} version=${APISIX_TAG_VERSION} image_base=<< parameters.var_os >> image_tag=<< parameters.var_os_release >> - mv ./output/apisix*.${PACK_TYPE} ${VAR_WORKBENCH_DIR} - - - store_artifacts: - path: /tmp/output - - - when: - condition: - matches: { pattern: "^apisix-runtime/(.*)\\d+$", value: << pipeline.git.tag >> } - steps: - - run: - name: build apisix-runtime package - command: | - APISIX_RUNTIME_TAG_VERSION=$(echo ${CIRCLE_TAG##*/}) - echo "apisix-runtime version: $APISIX_RUNTIME_TAG_VERSION" - make package type=${PACK_TYPE} app=apisix-runtime checkout=${APISIX_RUNTIME_TAG_VERSION} version=${APISIX_RUNTIME_TAG_VERSION} image_base=<< parameters.var_os >> image_tag=<< parameters.var_os_release >> - mv ./output/apisix-runtime*.${PACK_TYPE} ${VAR_WORKBENCH_DIR} - - - store_artifacts: - path: /tmp/output - -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows -workflows: - builds: - jobs: - - build-apisix-runtime: - filters: - branches: - only: master - - build-apisix: - filters: - branches: - only: master - build-and-push-apisix-runtime-dev: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - master - jobs: - - build-and-push-apisix-runtime-dev-arm - - build-and-push-apisix-runtime-dev-x86 - - upload-manifest-apisix-runtime-dev: - requires: - - build-and-push-apisix-runtime-dev-arm - - build-and-push-apisix-runtime-dev-x86 - build-mutil-platform-arm64-apckage: - jobs: - - build-arm64-package: - name: debian-bullseye - var_os: debian - var_os_release: bullseye-slim - filters: - tags: - only: /^apisix.*/ - - build-arm64-package: - name: centos 7 - var_os: centos - var_os_release: "7" - var_build_rpm: true - filters: - tags: - only: /^apisix.*/ - - build-arm64-package: - name: centos 8 - var_os: centos - var_os_release: "8" - var_build_rpm: true - filters: - tags: - only: /^apisix.*/ diff --git a/.github/workflows/package-apisix-deb-ubuntu20.04.yml b/.github/workflows/package-apisix-deb-ubuntu20.04.yml index 31aacee2f..5e6a20d30 100644 --- a/.github/workflows/package-apisix-deb-ubuntu20.04.yml +++ b/.github/workflows/package-apisix-deb-ubuntu20.04.yml @@ -33,8 +33,7 @@ jobs: - name: run apisix packaging run: | - wget https://raw.githubusercontent.com/apache/apisix/${APISIX_VERSION}/.requirements && source .requirements - make package type=deb app=apisix version=${PACKAGE_APISIX_VERSION} runtime_version=${APISIX_RUNTIME} checkout=${APISIX_VERSION} image_base=ubuntu image_tag=24.04 + make package type=deb app=apisix version=${PACKAGE_APISIX_VERSION} checkout=${APISIX_VERSION} image_base=ubuntu image_tag=24.04 - name: install apisix deb into container run: | diff --git a/.github/workflows/package-apisix-rpm-ubi.yml b/.github/workflows/package-apisix-rpm-ubi.yml index f2258610b..cb7380550 100644 --- a/.github/workflows/package-apisix-rpm-ubi.yml +++ b/.github/workflows/package-apisix-rpm-ubi.yml @@ -42,28 +42,29 @@ jobs: - 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=registry.access.redhat.com/ubi8/ubi image_tag=8.6 artifact=apisix-remote + make package type=rpm app=apisix version=master checkout=${APISIX_VERSION} image_base=registry.access.redhat.com/ubi9/ubi image_tag=9.6 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 ./build-apisix-dashboard.sh ./apisix - make package type=rpm app=apisix version=master checkout=${APISIX_VERSION} runtime_version=${APISIX_RUNTIME} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6 local_code_path=./apisix artifact=apisix-local + make package type=rpm app=apisix version=master checkout=${APISIX_VERSION} image_base=registry.access.redhat.com/ubi9/ubi image_tag=9.6 local_code_path=./apisix artifact=apisix-local - - name: run ubi8 docker and mapping rpm into container - run: | - 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: Publish Artifact + uses: actions/upload-artifact@v4.0.0 + with: + name: apisix-remote-master-0.ubi9.6.x86_64.rpm + path: output/apisix-remote-master-0.ubi9.6.x86_64.rpm + retention-days: 5 + if-no-files-found: error - - name: enable apisix repository in container + - name: run ubi9 docker and mapping rpm into container run: | - docker exec ubiInstance bash -c "rpm --import https://repos.apiseven.com/KEYS" - docker exec ubiInstance bash -c "yum -y install https://repos.apiseven.com/packages/centos/apache-apisix-repo-1.0-1.noarch.rpm" + 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/ubi9/ubi:9.6 /bin/bash - name: install APISIX(-remote) master by rpm in container run: | - docker exec ubiInstance bash -c "yum -y localinstall /output/apisix-remote-master-0.ubi8.6.x86_64.rpm" + docker exec ubiInstance bash -c "yum -y localinstall /output/apisix-remote-master-0.ubi9.6.x86_64.rpm" docker exec ubiInstance bash -c "apisix start" - name: check and ensure APISIX(-remote) master is installed @@ -82,7 +83,7 @@ jobs: - name: install APISIX(-local) by rpm in container run: | - docker exec ubiInstance bash -c "yum -y localinstall /output/apisix-local-master-0.ubi8.6.x86_64.rpm" + docker exec ubiInstance bash -c "yum -y localinstall /output/apisix-local-master-0.ubi9.6.x86_64.rpm" docker exec ubiInstance bash -c "apisix start" - name: check and ensure APISIX(-local) is installed @@ -98,11 +99,3 @@ jobs: echo "failed: failed to access Apache APISIX UI" exit 1 fi - - - name: Publish Artifact - uses: actions/upload-artifact@v4.0.0 - with: - name: apisix-remote-master-0.ubi8.6.x86_64.rpm - path: output/apisix-remote-master-0.ubi8.6.x86_64.rpm - retention-days: 5 - if-no-files-found: error diff --git a/.github/workflows/package-apisix-runtime-rpm-ubi.yml b/.github/workflows/package-apisix-runtime-rpm-ubi.yml index b100790f4..691472a0e 100644 --- a/.github/workflows/package-apisix-runtime-rpm-ubi.yml +++ b/.github/workflows/package-apisix-runtime-rpm-ubi.yml @@ -27,16 +27,16 @@ jobs: - name: build apisix-runtime rpm run: | - make package type=rpm app=apisix-runtime runtime_version=${BUILD_APISIX_RUNTIME_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6 + make package type=rpm app=apisix-runtime runtime_version=${BUILD_APISIX_RUNTIME_VERSION} image_base=registry.access.redhat.com/ubi9/ubi image_tag=9.6 - - name: run ubi8 docker and mapping apisix-runtime rpm into container + - name: run ubi9 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 + docker run -itd -v /home/runner/work/apisix-build-tools/apisix-build-tools/output:/output --name ubiInstance --net="host" registry.access.redhat.com/ubi9/ubi:9.6 /bin/bash - 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" + docker exec ubiInstance bash -c "yum -y localinstall /output/apisix-runtime-${BUILD_APISIX_RUNTIME_VERSION}-0.ubi9.6.x86_64.rpm" - name: check and ensure apisix-runtime is installed run: | @@ -47,7 +47,7 @@ jobs: - name: Publish Artifact uses: actions/upload-artifact@v4.0.0 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 + name: apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.ubi9.6.x86_64.rpm + path: output/apisix-runtime-${{ env.BUILD_APISIX_RUNTIME_VERSION }}-0.ubi9.6.x86_64.rpm retention-days: 5 if-no-files-found: error diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6ddcc60b7..e2bd1734c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -76,8 +76,8 @@ jobs: source .requirements # build apisix - 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 - mv ./output/apisix-${APISIX_TAG_VERSION}-0.ubi8.6.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR} + 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/ubi9/ubi image_tag=9.6 + mv ./output/apisix-${APISIX_TAG_VERSION}-0.ubi9.6.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR} echo "TARGET_APP=apisix" >> "$GITHUB_ENV" - name: Build apisix-base RPM Package @@ -87,8 +87,8 @@ jobs: run: | # build apisix-base echo ${{ env.TAG_TYPE }} ${{ env.TAG_VERSION }} - make package type=rpm app=apisix-base checkout=${APISIX_BASE_TAG_VERSION} version=${APISIX_BASE_TAG_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6 - mv ./output/apisix-base-${APISIX_BASE_TAG_VERSION}-0.ubi8.6.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR} + make package type=rpm app=apisix-base checkout=${APISIX_BASE_TAG_VERSION} version=${APISIX_BASE_TAG_VERSION} image_base=registry.access.redhat.com/ubi9/ubi image_tag=9.6 + mv ./output/apisix-base-${APISIX_BASE_TAG_VERSION}-0.ubi9.6.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR} echo "TARGET_APP=apisix-base" >> "$GITHUB_ENV" - name: Build apisix-runtime RPM Package @@ -98,8 +98,8 @@ jobs: run: | # build apisix-runtime echo ${{ env.TAG_TYPE }} ${{ env.TAG_VERSION }} - make package type=rpm app=apisix-runtime checkout=${APISIX_RUNTIME_TAG_VERSION} version=${APISIX_RUNTIME_TAG_VERSION} image_base=registry.access.redhat.com/ubi8/ubi image_tag=8.6 - mv ./output/apisix-runtime-${APISIX_RUNTIME_TAG_VERSION}-0.ubi8.6.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR} + make package type=rpm app=apisix-runtime checkout=${APISIX_RUNTIME_TAG_VERSION} version=${APISIX_RUNTIME_TAG_VERSION} image_base=registry.access.redhat.com/ubi9/ubi image_tag=9.6 + mv ./output/apisix-runtime-${APISIX_RUNTIME_TAG_VERSION}-0.ubi9.6.${ARCH}.rpm ${VAR_RPM_WORKBENCH_DIR} echo "TARGET_APP=apisix-runtime" >> "$GITHUB_ENV" - name: Build apisix-dashboard RPM Package @@ -120,7 +120,7 @@ jobs: if: ${{ env.TAG_TYPE == 'apisix' }} uses: actions/upload-artifact@v4.0.0 env: - PACKAGE_NAME: apisix-${{ env.TAG_VERSION }}-0.ubi8.6.${{ env.ARCH }}.rpm + PACKAGE_NAME: apisix-${{ env.TAG_VERSION }}-0.ubi9.6.${{ env.ARCH }}.rpm with: name: "${{ env.PACKAGE_NAME }}" path: "${{ env.VAR_RPM_WORKBENCH_DIR }}/${{ env.PACKAGE_NAME }}" @@ -129,7 +129,7 @@ jobs: if: ${{ env.TAG_TYPE == 'apisix-base' }} uses: actions/upload-artifact@v4.0.0 env: - PACKAGE_NAME: apisix-base-${{ env.TAG_VERSION }}-0.ubi8.6.${{ env.ARCH }}.rpm + PACKAGE_NAME: apisix-base-${{ env.TAG_VERSION }}-0.ubi9.6.${{ env.ARCH }}.rpm with: name: "${{ env.PACKAGE_NAME }}" path: "${{ env.VAR_RPM_WORKBENCH_DIR }}/${{ env.PACKAGE_NAME }}" @@ -138,7 +138,7 @@ jobs: if: ${{ env.TAG_TYPE == 'apisix-runtime' }} uses: actions/upload-artifact@v4.0.0 env: - PACKAGE_NAME: apisix-runtime-${{ env.TAG_VERSION }}-0.ubi8.6.${{ env.ARCH }}.rpm + PACKAGE_NAME: apisix-runtime-${{ env.TAG_VERSION }}-0.ubi9.6.${{ env.ARCH }}.rpm with: name: "${{ env.PACKAGE_NAME }}" path: "${{ env.VAR_RPM_WORKBENCH_DIR }}/${{ env.PACKAGE_NAME }}" diff --git a/Makefile b/Makefile index d5a0ab596..9f1d58a89 100644 --- a/Makefile +++ b/Makefile @@ -19,13 +19,13 @@ version=0 checkout=0 app=0 type=0 -image_base="registry.access.redhat.com/ubi8/ubi" -image_tag="8.6" +image_base="registry.access.redhat.com/ubi9/ubi" +image_tag="9.6" iteration=0 local_code_path=0 openresty="apisix-runtime" artifact="0" -runtime_version="0" +runtime_version=0 apisix_repo="https://github.com/apache/apisix" apisix_runtime_repo="https://github.com/api7/apisix-build-tools.git" dashboard_repo="https://github.com/apache/apisix-dashboard" @@ -257,22 +257,30 @@ package-dashboard-deb: .PHONY: build-apisix-runtime-rpm build-apisix-runtime-rpm: ifeq ($(app),apisix) +ifneq ($(runtime_version),0) git clone -b apisix-runtime/$(runtime_version) $(apisix_runtime_repo) ./apisix-runtime $(call build_runtime,apisix-runtime,apisix-runtime,rpm,"./apisix-runtime") rm -fr ./apisix-runtime else $(call build_runtime,apisix-runtime,apisix-runtime,rpm,"./") endif +else + $(call build_runtime,apisix-runtime,apisix-runtime,rpm,"./") +endif .PHONY: build-apisix-runtime-deb build-apisix-runtime-deb: ifeq ($(app),apisix) +ifneq ($(runtime_version),0) git clone -b apisix-runtime/$(runtime_version) $(apisix_runtime_repo) ./apisix-runtime $(call build_runtime,apisix-runtime,apisix-runtime,deb,"./apisix-runtime") rm -fr ./apisix-runtime else $(call build_runtime,apisix-runtime,apisix-runtime,deb,"./") endif +else + $(call build_runtime,apisix-runtime,apisix-runtime,deb,"./") +endif ### build rpm for apisix-runtime: .PHONY: package-apisix-runtime-rpm diff --git a/dockerfiles/Dockerfile.apisix-base.rpm b/dockerfiles/Dockerfile.apisix-base.rpm index c03be0472..d0da82a43 100644 --- a/dockerfiles/Dockerfile.apisix-base.rpm +++ b/dockerfiles/Dockerfile.apisix-base.rpm @@ -1,5 +1,5 @@ -ARG IMAGE_BASE="registry.access.redhat.com/ubi8/ubi" -ARG IMAGE_TAG="8.6" +ARG IMAGE_BASE="registry.access.redhat.com/ubi9/ubi" +ARG IMAGE_TAG="9.6" FROM ${IMAGE_BASE}:${IMAGE_TAG} diff --git a/dockerfiles/Dockerfile.apisix-runtime.rpm b/dockerfiles/Dockerfile.apisix-runtime.rpm index 9f82841fa..82e3b07ca 100644 --- a/dockerfiles/Dockerfile.apisix-runtime.rpm +++ b/dockerfiles/Dockerfile.apisix-runtime.rpm @@ -1,5 +1,5 @@ -ARG IMAGE_BASE="registry.access.redhat.com/ubi8/ubi" -ARG IMAGE_TAG="8.6" +ARG IMAGE_BASE="registry.access.redhat.com/ubi9/ubi" +ARG IMAGE_TAG="9.6" FROM ${IMAGE_BASE}:${IMAGE_TAG} @@ -18,8 +18,7 @@ ENV runtime_version=${RUNTIME_VERSION} COPY ${CODE_PATH} ./ -RUN yum install -y curl \ - && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ && source "$HOME/.cargo/env" \ && rustup install 1.69 \ && rustup default 1.69 \ diff --git a/dockerfiles/Dockerfile.apisix.rpm b/dockerfiles/Dockerfile.apisix.rpm index b31cdea6e..bf9408942 100644 --- a/dockerfiles/Dockerfile.apisix.rpm +++ b/dockerfiles/Dockerfile.apisix.rpm @@ -1,5 +1,5 @@ -ARG IMAGE_BASE="registry.access.redhat.com/ubi8/ubi" -ARG IMAGE_TAG="8.6" +ARG IMAGE_BASE="registry.access.redhat.com/ubi9/ubi" +ARG IMAGE_TAG="9.6" ARG PACKAGE_TYPE ARG RUNTIME_VERSION diff --git a/dockerfiles/Dockerfile.dashboard.rpm b/dockerfiles/Dockerfile.dashboard.rpm index 30620286f..8d165be1a 100644 --- a/dockerfiles/Dockerfile.dashboard.rpm +++ b/dockerfiles/Dockerfile.dashboard.rpm @@ -1,5 +1,5 @@ -ARG IMAGE_BASE="registry.access.redhat.com/ubi8/ubi" -ARG IMAGE_TAG="8.6" +ARG IMAGE_BASE="registry.access.redhat.com/ubi9/ubi" +ARG IMAGE_TAG="9.6" FROM ${IMAGE_BASE}:${IMAGE_TAG} diff --git a/utils/build-common.sh b/utils/build-common.sh index 989799301..857546fbf 100755 --- a/utils/build-common.sh +++ b/utils/build-common.sh @@ -7,7 +7,7 @@ BUILD_PATH=${BUILD_PATH:-`pwd`} build_apisix_base_rpm() { dnf install -y yum-utils - yum -y install --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms gcc gcc-c++ patch wget git make sudo xz + yum -y install --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms gcc gcc-c++ patch wget git make sudo xz command -v gcc gcc --version @@ -56,13 +56,13 @@ build_apisix_base_apk() { build_apisix_runtime_rpm() { dnf install -y yum-utils - yum -y install --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms gcc gcc-c++ patch wget git make sudo xz cpanminus + yum -y install --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms gcc gcc-c++ patch wget git make sudo xz cpanminus command -v gcc gcc --version yum-config-manager --add-repo https://openresty.org/package/centos/openresty.repo - yum -y install openresty-pcre-devel openresty-zlib-devel + yum -y install --nogpgcheck openresty-pcre-devel openresty-zlib-devel export_openresty_variables ${BUILD_PATH}/build-apisix-runtime.sh diff --git a/utils/determine-dist.sh b/utils/determine-dist.sh index 400340236..e42cbddc6 100755 --- a/utils/determine-dist.sh +++ b/utils/determine-dist.sh @@ -8,7 +8,7 @@ then elif [ "${IMAGE_BASE}" == "debian" ] then dist="${IMAGE_BASE}${IMAGE_TAG}" -elif [ "${IMAGE_BASE}" == "registry.access.redhat.com/ubi8/ubi" ] +elif [ "${IMAGE_BASE}" == "registry.access.redhat.com/ubi9/ubi" ] then dist="ubi${IMAGE_TAG}" fi diff --git a/utils/install-common.sh b/utils/install-common.sh index 6027eb8ee..dce8853fe 100755 --- a/utils/install-common.sh +++ b/utils/install-common.sh @@ -18,9 +18,9 @@ install_apisix_dependencies_rpm() { install_dependencies_rpm() { # install basic dependencies - if [[ $IMAGE_BASE == "registry.access.redhat.com/ubi8/ubi" ]]; then - yum install -y --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms wget tar gcc automake autoconf libtool make curl git which unzip sudo - yum install -y --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms yum-utils + if [[ $IMAGE_BASE == "registry.access.redhat.com/ubi9/ubi" ]]; then + yum install -y --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms wget tar gcc automake autoconf libtool make git which unzip sudo + yum install -y --disablerepo=* --enablerepo=ubi-9-appstream-rpms --enablerepo=ubi-9-baseos-rpms yum-utils else yum install -y wget tar gcc automake autoconf libtool make curl git which unzip sudo yum install -y yum-utils diff --git a/utils/publish-rpm.sh b/utils/publish-rpm.sh index ec2fde81a..cd51a46f1 100755 --- a/utils/publish-rpm.sh +++ b/utils/publish-rpm.sh @@ -59,7 +59,7 @@ func_cos_utils_credential_init() { # ======================================= func_repo_init() { # ${1} - repo workbench path - mkdir -p "${1}"/redhat/8/${ARCH} + mkdir -p "${1}"/redhat/9/${ARCH} } func_repo_clone() { @@ -140,9 +140,9 @@ repo_clone) func_repo_clone "${VAR_COS_BUCKET_REPO}" "redhat" /tmp/redhat ;; repo_package_sync) - find "${VAR_RPM_WORKBENCH_DIR}" -type f -name "*ubi8.6.${ARCH}.rpm" \ + find "${VAR_RPM_WORKBENCH_DIR}" -type f -name "*ubi9.6.${ARCH}.rpm" \ -exec echo "repo sync for: {}" \; \ - -exec cp -a {} /tmp/redhat/8/${ARCH} \; + -exec cp -a {} /tmp/redhat/9/${ARCH} \; ;; repo_repodata_rebuild) func_repo_repodata_rebuild /tmp/redhat