From 0e748bd59c04d11b8487b9401e1cdab88407a2ac Mon Sep 17 00:00:00 2001 From: Timon Borter Date: Tue, 27 Sep 2022 14:43:53 +0200 Subject: [PATCH 1/2] ci: check for both spec yamls when testing --- .github/workflows/build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f085c09..830b4b4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -38,7 +38,10 @@ jobs: ${{ steps.meta.outputs.tags }} & \ ( sleep 10 && \ - if [[ $(curl -o /dev/null -s -w "%{http_code}\n" http://localhost:8080) -ne 200 ]]; then + if [[ $(curl -o /dev/null -s -w "%{http_code}\n" http://localhost:8080/apis/pet-api.json) -ne 200 ]]; then + exit 1; + fi && \ + if [[ $(curl -o /dev/null -s -w "%{http_code}\n" http://localhost:8080/apis/store-api.json) -ne 200 ]]; then exit 1; fi && \ docker container stop swagger-ui-test From 997ad49f6fcc87eb753ef3bf641d636d894a8843 Mon Sep 17 00:00:00 2001 From: Timon Borter Date: Tue, 27 Sep 2022 14:45:06 +0200 Subject: [PATCH 2/2] fix: wrong nginx entrypoint context --- README.md | 2 +- scripts/entrypoint.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5efcb74..86d95f8 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ docker run \ -p 80:8080 \ -e POLL_INTERVAL_SECONDS=60 \ -e POLL_URL=https://raw.githubusercontent.com/bbortt/swagger-ui-demo/master/swagger-config.json \ - postfinance/polling-swagger-ui:1.0.0 + postfinance/polling-swagger-ui:$RELEASE_VERSION ``` # Contributing diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index ff45974..8f294ca 100755 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh # # Docker entrypoint starting nginx as well as the polling process. -# Original CMD ["sh", "/usr/share/nginx/run.sh"]: https://github.com/swagger-api/swagger-ui/blob/master/Dockerfile. +# Original CMD ["nginx", "-g", "daemon off;"]: https://github.com/swagger-api/swagger-ui/blob/master/Dockerfile. -/appl/polling-swagger-ui/poll-monitor.sh & /docker-entrypoint.sh sh -c "nginx -g \"daemon off;\"" +/appl/polling-swagger-ui/poll-monitor.sh & /docker-entrypoint.sh nginx -g "daemon off;"