From 88a3f101e50867cf2838dc88d6c21d549e2c1e7c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Jun 2024 03:07:23 +0000 Subject: [PATCH 1/4] Bump alpine from 3.20.0 to 3.20.1 Bumps alpine from 3.20.0 to 3.20.1. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f0a0887..3bd4056 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.20.0@sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd +FROM alpine:3.20.1@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0 USER root From 6b1ae513c97b16cb330048052abf72f960ecb4cd Mon Sep 17 00:00:00 2001 From: Jonathan Harden Date: Wed, 26 Jun 2024 16:09:59 +0100 Subject: [PATCH 2/4] Update to new docker-compose command --- .github/workflows/run-tests.yml | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a3d0a0e..a829d93 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -35,11 +35,11 @@ jobs: run: docker run --rm -v "${GITHUB_WORKSPACE}:/mnt" koalaman/shellcheck:stable@sha256:ec26f2ad1492bf4343a7f82227fec67a19e4729b5ad02f6a2fe1a2b44cc037ff -x go.sh - name: Build Docker Compose Testing Stack - run: docker-compose build + run: docker compose build - name: Test Minimal Server run: | - docker-compose up -d test-minimal + docker compose up -d test-minimal until docker inspect tests_test-minimal_1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 @@ -48,14 +48,14 @@ jobs: echo "Testing Minimal Server..." curl --fail -sk -o /dev/null "https://localhost:10443" echo "Check the log output" - docker-compose logs test-minimal | grep -E '\{[^:]+:'10443' [0-9a-f]+ - [0-9.]+ - \[[0-9]+/[A-Z][a-z][a-z]/[0-9:]{13} \+[0-9]{4}\] "GET / HTTP/1\.1" [0-9]{3} [0-9]+ [0-9]+\.[0-9]{3} - "-" "[^"]+"\}' + docker compose logs test-minimal | grep -E '\{[^:]+:'10443' [0-9a-f]+ - [0-9.]+ - \[[0-9]+/[A-Z][a-z][a-z]/[0-9:]{13} \+[0-9]{4}\] "GET / HTTP/1\.1" [0-9]{3} [0-9]+ [0-9]+\.[0-9]{3} - "-" "[^"]+"\}' echo "Test limited protcol and SSL cipher... " - docker-compose run --rm --entrypoint bash nginx -c "echo GET / | /usr/bin/openssl s_client -cipher 'AES256+EECDH' -tls1_2 -connect test-minimal:10443" &> /dev/null; - docker-compose stop test-minimal + docker compose run --rm --entrypoint bash nginx -c "echo GET / | /usr/bin/openssl s_client -cipher 'AES256+EECDH' -tls1_2 -connect test-minimal:10443" &> /dev/null; + docker compose stop test-minimal - name: Test GZip Config run: | - docker-compose up -d test-gzip + docker compose up -d test-gzip until docker inspect tests_test-gzip_1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 @@ -64,11 +64,11 @@ jobs: echo "Test that GZip is configured..." curl -s -I -X GET -k --compressed https://localhost:10443/gzip | grep -q 'Content-Encoding: gzip' - docker-compose stop test-gzip + docker compose stop test-gzip - name: Test Multi-Proxy Config run: | - docker-compose up -d --force-recreate test-multi-proxy + docker compose up -d --force-recreate test-multi-proxy until docker inspect tests_test-multi-proxy_1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 @@ -76,16 +76,16 @@ jobs: echo "Test for location 1 @ /..." curl --fail -sk -o /dev/null https://localhost:10443/ - docker-compose logs mockserver-1 | grep -E '(Matched on All OK)' + docker compose logs mockserver-1 | grep -E '(Matched on All OK)' echo "Test for location 2 @ /path/to/resource" curl --fail -sk -o /dev/null https://localhost:10443/path/to/resource - docker-compose logs mockserver-2 | grep -E '(Matched on All OK with path)' + docker compose logs mockserver-2 | grep -E '(Matched on All OK with path)' - docker-compose stop test-multi-proxy + docker compose stop test-multi-proxy - name: Test Multi-Location, Single Proxy and NAXSI Config run: | - docker-compose up -d test-multi-location-naxsi + docker compose up -d test-multi-location-naxsi until docker inspect tests_test-multi-location-naxsi_1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 @@ -94,11 +94,11 @@ jobs: echo "Test for all OK..." curl --fail -sk -o /dev/null -H "Host: selfservice.payments.service.gov.uk" https://localhost:10443/ - docker-compose stop test-multi-location-naxsi + docker compose stop test-multi-location-naxsi - name: Test Custom Upload Size Config run: | - docker-compose up -d test-custom-upload + docker compose up -d test-custom-upload until docker inspect tests_test-custom-upload_1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 @@ -113,11 +113,11 @@ jobs: echo "Grepping the response..." grep "Thanks for the big doc" /tmp/upload_test.txt &> /dev/null - docker-compose stop test-custom-upload + docker compose stop test-custom-upload - name: Test Static File Cache Setting run: | - docker-compose up -d test-static-cache + docker compose up -d test-static-cache until docker inspect tests_test-static-cache_1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 @@ -126,11 +126,11 @@ jobs: echo "Test for all OK..." curl -s -I -X GET -k --compressed https://localhost:10443/file.json | grep -q 'Cache-Control: max-age=3600' - docker-compose stop test-static-cache + docker compose stop test-static-cache - name: Test Big Buffers Setting run: | - docker-compose up -d test-big-buffers + docker compose up -d test-big-buffers until docker inspect tests_test-big-buffers_1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 @@ -139,11 +139,11 @@ jobs: echo "Test for all OK..." curl -s -I -X GET -k --compressed https://localhost:10443/gzip | grep -q 'Content-Encoding: gzip' - docker-compose stop test-big-buffers + docker compose stop test-big-buffers - name: Shutdown Docker Compose Stack (Local Only) if: ${{ env.ACT }} - run: docker-compose down + run: docker compose down check-docker-base-images-are-manifests: uses: alphagov/pay-ci/.github/workflows/_validate_docker_image_is_manifest.yml@master From 85afcc914df73b355c205875b2bce40894e2268c Mon Sep 17 00:00:00 2001 From: Jonathan Harden Date: Wed, 26 Jun 2024 16:18:57 +0100 Subject: [PATCH 3/4] Fix docker inspect commands for new docker compose version --- .github/workflows/run-tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a829d93..f1e48ef 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -41,7 +41,7 @@ jobs: run: | docker compose up -d test-minimal - until docker inspect tests_test-minimal_1 --format='{{.State.Health.Status}}' | grep -q healthy; do + until docker inspect tests-test-minimal-1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 done @@ -57,7 +57,7 @@ jobs: run: | docker compose up -d test-gzip - until docker inspect tests_test-gzip_1 --format='{{.State.Health.Status}}' | grep -q healthy; do + until docker inspect tests-test-gzip-1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 done @@ -70,7 +70,7 @@ jobs: run: | docker compose up -d --force-recreate test-multi-proxy - until docker inspect tests_test-multi-proxy_1 --format='{{.State.Health.Status}}' | grep -q healthy; do + until docker inspect tests-test-multi-proxy-1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 done @@ -87,7 +87,7 @@ jobs: run: | docker compose up -d test-multi-location-naxsi - until docker inspect tests_test-multi-location-naxsi_1 --format='{{.State.Health.Status}}' | grep -q healthy; do + until docker inspect tests-test-multi-location-naxsi-1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 done @@ -100,7 +100,7 @@ jobs: run: | docker compose up -d test-custom-upload - until docker inspect tests_test-custom-upload_1 --format='{{.State.Health.Status}}' | grep -q healthy; do + until docker inspect tests-test-custom-upload-1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 done @@ -119,7 +119,7 @@ jobs: run: | docker compose up -d test-static-cache - until docker inspect tests_test-static-cache_1 --format='{{.State.Health.Status}}' | grep -q healthy; do + until docker inspect tests-test-static-cache-1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 done @@ -132,7 +132,7 @@ jobs: run: | docker compose up -d test-big-buffers - until docker inspect tests_test-big-buffers_1 --format='{{.State.Health.Status}}' | grep -q healthy; do + until docker inspect tests-test-big-buffers-1 --format='{{.State.Health.Status}}' | grep -q healthy; do sleep 2 done From e0593859111dec2f594dbb5c5ded1471949c6b08 Mon Sep 17 00:00:00 2001 From: Jonathan Harden Date: Wed, 26 Jun 2024 16:21:09 +0100 Subject: [PATCH 4/4] Remove the deprecated docker-compose yaml specification version --- tests/docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 84b2134..57c6457 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3" - services: nginx: build: "../."