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

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

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