You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "Sn0rt (via GitHub)" <gi...@apache.org> on 2023/05/21 10:41:06 UTC

[GitHub] [apisix-docker] Sn0rt opened a new pull request, #463: feat: add build for platform=redhat with ubi based image

Sn0rt opened a new pull request, #463:
URL: https://github.com/apache/apisix-docker/pull/463

   copy from https://github.com/apache/apisix-docker/pull/462/files
   and add new commit for fix
   
   ```log
   [2023-05-21 10:21:04] Copy cos://***/packages/redhat/8/x86_64/apisix-3.3.0-0.ubi8.6.x86_64.rpm => cos://***/packages/redhat/8/x86_64/apisix-3.3.0-0.ubi8.6.x86_64.rpm 
   INFO[2023-05-21 10:21:05] Copy cos://***/packages/redhat/8/x86_64/apisix-base-1.21.4.1.10-0.ubi8.6.x86_64.rpm => cos://***/packages/redhat/8/x86_64/apisix-base-1.21.4.1.10-0.ubi8.6.x86_64.rpm 
   INFO[2023-05-21 10:21:05] Copy cos://***/packages/redhat/8/x86_64/apisix-base-1.21.4.1.8-0.ubi8.6.x86_64.rpm => cos://***/packages/redhat/8/x86_64/apisix-base-1.21.4.1.8-0.ubi8.6.x86_64.rpm
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] Sn0rt commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "Sn0rt (via GitHub)" <gi...@apache.org>.
Sn0rt commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1199865657


##########
.github/workflows/apisix_push_docker_hub_only_for_ubi.yaml:
##########
@@ -0,0 +1,65 @@
+name: Push apisix to Docker image only redhat@x86_64
+on:
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        platform:
+          - redhat
+    env:
+      APISIX_DOCKER_TAG: 3.3.0-${{ matrix.platform }}
+
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+
+      - name: Build and run
+        run: |
+          make build-on-${{ matrix.platform }}
+          docker-compose -f ./compose/docker-compose-release.yaml up -d
+          sleep 30
+          docker logs compose_apisix_1
+
+      - name: Test route
+        run: |
+          grep -C 3 '\[error\]' compose/apisix_log/error.log && exit 1
+
+          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
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USER }}

Review Comment:
   copy thx.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] tao12345666333 commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1200005574


##########
.github/workflows/apisix_push_docker_hub_only_for_ubi.yaml:
##########
@@ -0,0 +1,65 @@
+name: Push apisix to Docker image only redhat@x86_64

Review Comment:
   The actual behavior is controlled by the makefile. You can directly adjust the parameters in the makefile.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] Sn0rt commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "Sn0rt (via GitHub)" <gi...@apache.org>.
Sn0rt commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1199741624


##########
redhat/Dockerfile:
##########
@@ -0,0 +1,45 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FROM registry.access.redhat.com/ubi8/ubi:8.6
+
+ARG APISIX_VERSION=3.3.0
+LABEL apisix_version="${APISIX_VERSION}"
+COPY ./apache-apisix.repo /etc/yum.repos.d/apache-apisix.repo

Review Comment:
   I will add it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] Sn0rt commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "Sn0rt (via GitHub)" <gi...@apache.org>.
Sn0rt commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1199993183


##########
.github/workflows/apisix_push_docker_hub_only_for_ubi.yaml:
##########
@@ -0,0 +1,65 @@
+name: Push apisix to Docker image only redhat@x86_64

Review Comment:
   now . the UBI only works from x86. and the existing workflow is for multiple-arch.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] tao12345666333 commented on pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#issuecomment-1556147995

   also need change this file https://github.com/apache/apisix-docker/blob/7dfe5840e7705ccee135f0220b12d369d52d0ca8/.github/workflows/apisix-docker-example-test.yaml to run test 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] Revolyssup commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1199768821


##########
.github/workflows/apisix_push_docker_hub_only_for_ubi.yaml:
##########
@@ -0,0 +1,65 @@
+name: Push apisix to Docker image only redhat@x86_64
+on:
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        platform:
+          - redhat
+    env:
+      APISIX_DOCKER_TAG: 3.3.0-${{ matrix.platform }}
+
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+
+      - name: Build and run
+        run: |
+          make build-on-${{ matrix.platform }}
+          docker-compose -f ./compose/docker-compose-release.yaml up -d
+          sleep 30
+          docker logs compose_apisix_1
+
+      - name: Test route
+        run: |
+          grep -C 3 '\[error\]' compose/apisix_log/error.log && exit 1
+
+          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
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USER }}

Review Comment:
   I think this error is expected https://github.com/apache/apisix-docker/actions/runs/5037560294/jobs/9034651364?pr=463. Since the tests are running on your branch and your fork and branch do not have access to secrets.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] Sn0rt closed pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "Sn0rt (via GitHub)" <gi...@apache.org>.
Sn0rt closed pull request #463: feat: add build for platform=redhat with ubi based image
URL: https://github.com/apache/apisix-docker/pull/463


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] Revolyssup commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1199769164


##########
.github/workflows/apisix_push_docker_hub_only_for_ubi.yaml:
##########
@@ -0,0 +1,65 @@
+name: Push apisix to Docker image only redhat@x86_64
+on:
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        platform:
+          - redhat
+    env:
+      APISIX_DOCKER_TAG: 3.3.0-${{ matrix.platform }}
+
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+
+      - name: Build and run
+        run: |
+          make build-on-${{ matrix.platform }}
+          docker-compose -f ./compose/docker-compose-release.yaml up -d
+          sleep 30
+          docker logs compose_apisix_1
+
+      - name: Test route
+        run: |
+          grep -C 3 '\[error\]' compose/apisix_log/error.log && exit 1
+
+          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
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USER }}

Review Comment:
   And I think the trigger should be this https://github.com/apache/apisix-docker/blob/304ab09545efcafd0e6fd22f2bf98ad57357a9b3/.github/workflows/apisix_push_docker_hub.yaml#L4
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] Sn0rt commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "Sn0rt (via GitHub)" <gi...@apache.org>.
Sn0rt commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1199757377


##########
.github/workflows/apisix_push_docker_hub_only_for_ubi.yaml:
##########
@@ -0,0 +1,65 @@
+name: Push apisix to Docker image only redhat@x86_64
+on:
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        platform:
+          - redhat
+    env:
+      APISIX_DOCKER_TAG: 3.3.0-${{ matrix.platform }}
+
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+
+      - name: Build and run
+        run: |
+          make build-on-${{ matrix.platform }}
+          docker-compose -f ./compose/docker-compose-release.yaml up -d
+          sleep 30
+          docker logs compose_apisix_1
+
+      - name: Test route
+        run: |
+          grep -C 3 '\[error\]' compose/apisix_log/error.log && exit 1
+
+          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
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USER }}

Review Comment:
   ![b352960d-b355-4242-9394-8764ee4b1d1b](https://github.com/apache/apisix-docker/assets/2706161/50232556-9c4b-4a46-b582-d58d5130d5a4)
   
   @tao12345666333 can you help me to solve this issues ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] tao12345666333 commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1199741502


##########
redhat/Dockerfile:
##########
@@ -0,0 +1,45 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+FROM registry.access.redhat.com/ubi8/ubi:8.6
+
+ARG APISIX_VERSION=3.3.0
+LABEL apisix_version="${APISIX_VERSION}"
+COPY ./apache-apisix.repo /etc/yum.repos.d/apache-apisix.repo

Review Comment:
   Also need the openresty.repo
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] tao12345666333 commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1199848392


##########
.github/workflows/apisix_push_docker_hub_only_for_ubi.yaml:
##########
@@ -0,0 +1,65 @@
+name: Push apisix to Docker image only redhat@x86_64
+on:
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        platform:
+          - redhat
+    env:
+      APISIX_DOCKER_TAG: 3.3.0-${{ matrix.platform }}
+
+    steps:
+      - name: Check out the repo
+        uses: actions/checkout@v2
+
+      - name: Build and run
+        run: |
+          make build-on-${{ matrix.platform }}
+          docker-compose -f ./compose/docker-compose-release.yaml up -d
+          sleep 30
+          docker logs compose_apisix_1
+
+      - name: Test route
+        run: |
+          grep -C 3 '\[error\]' compose/apisix_log/error.log && exit 1
+
+          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
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v1
+        with:
+          username: ${{ secrets.DOCKERHUB_USER }}

Review Comment:
   yes.
   
   > With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository.
   
   ref https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-docker] tao12345666333 commented on a diff in pull request #463: feat: add build for platform=redhat with ubi based image

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on code in PR #463:
URL: https://github.com/apache/apisix-docker/pull/463#discussion_r1199955928


##########
.github/workflows/apisix_push_docker_hub_only_for_ubi.yaml:
##########
@@ -0,0 +1,65 @@
+name: Push apisix to Docker image only redhat@x86_64

Review Comment:
   I don't think we should add new workflow, we can re-use the existing workflow 



##########
Makefile:
##########
@@ -86,6 +92,17 @@ build-on-debian:
 	@$(call func_echo_success_status, "$@ -> [ Done ]")
 
 
+### push-x86-on-redhat : Push apache/apisix:xx-redhat image
+.PHONY: push-x86-on-redhat
+push-x86-on-redhat:
+	@$(call func_echo_status, "$@ -> [ Start ]")
+	$(ENV_DOCKER) buildx build --network=host --push \
+		-t $(ENV_APISIX_IMAGE_TAG_NAME)-redhat \
+		--platform linux/amd64 \

Review Comment:
   Its name and actual behavior are inconsistent



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org