From 409b073f18b6438b3f30d530f227e393001ecb80 Mon Sep 17 00:00:00 2001 From: Wentao Kuang Date: Thu, 3 Oct 2024 11:00:42 +1300 Subject: [PATCH] build: Update the ci to use basemaps/server container for screenshots and smoke test (#984) ### Motivation We should use `server` container instead of `cli` container when running a basemaps server. Because the `serve` commands in the `cli` container was legacy before we got the server container and is deprecated, as it required extra dependencies like `lerc` and `basemaps/landing` https://github.com/linz/basemaps/pull/3348. ### Modifications Use server container for screenshots and smoke tests ### Verification --- .github/workflows/build.yml | 7 ++++--- scripts/bmc.sh | 2 +- scripts/bms.sh | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 68b16146..6aa60665 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,8 @@ on: - master env: - BASEMAPS_CONTAINER_VERSION: v7 + BASEMAPS_CLI_CONTAINER_VERSION: v7 + BASEMAPS_SERVER_CONTAINER_VERSION: v7 jobs: build: @@ -211,7 +212,7 @@ jobs: - name: (Smoke) Start Local Server run: | - ./scripts/bms.sh serve --config ${CONFIG_PATH} & + ./scripts/bms.sh --config ${CONFIG_PATH} & # Wait for the server to start timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' ${BASEMAPS_HOST}/v1/version)" != "200" ]]; do sleep 0.5; done' || false @@ -246,7 +247,7 @@ jobs: - name: (Screenshot) Screenshot Pull Request Changes run: | - ./scripts/bms.sh serve --config ${CONFIG_PATH} & + ./scripts/bms.sh --config ${CONFIG_PATH} & # Wait for the server to start timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:5000/v1/version)" != "200" ]]; do sleep 0.5; done' || false diff --git a/scripts/bmc.sh b/scripts/bmc.sh index 0792cac2..2484e518 100755 --- a/scripts/bmc.sh +++ b/scripts/bmc.sh @@ -7,5 +7,5 @@ docker run \ -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e AWS_REGION -e AWS_DEFAULT_REGION -e BASEMAPS_HOST \ --rm \ --network="host" \ - ghcr.io/linz/basemaps/cli:${BASEMAPS_CONTAINER_VERSION:-latest} \ + ghcr.io/linz/basemaps/cli:${BASEMAPS_CLI_CONTAINER_VERSION:-latest} \ "$@" \ No newline at end of file diff --git a/scripts/bms.sh b/scripts/bms.sh index e3506805..0a6b7d84 100755 --- a/scripts/bms.sh +++ b/scripts/bms.sh @@ -8,5 +8,5 @@ docker run \ -p 5000:5000 \ -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_SESSION_TOKEN -e AWS_REGION -e AWS_DEFAULT_REGION -e BASEMAPS_HOST \ --rm \ - ghcr.io/linz/basemaps/cli:${BASEMAPS_CONTAINER_VERSION:-latest} \ + ghcr.io/linz/basemaps/server:${BASEMAPS_SERVER_CONTAINER_VERSION:-latest} \ "$@" \ No newline at end of file