Skip to content

Commit

Permalink
build: Update the ci to use basemaps/server container for screenshots…
Browse files Browse the repository at this point in the history
… 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`
linz/basemaps#3348.


### Modifications

Use server container for screenshots and smoke tests

### Verification

<!-- TODO: Say how you tested your changes. -->
  • Loading branch information
Wentao-Kuang authored Oct 2, 2024
1 parent e814f9c commit 409b073
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
- master

env:
BASEMAPS_CONTAINER_VERSION: v7
BASEMAPS_CLI_CONTAINER_VERSION: v7
BASEMAPS_SERVER_CONTAINER_VERSION: v7

jobs:
build:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/bmc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
"$@"
2 changes: 1 addition & 1 deletion scripts/bms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
"$@"

0 comments on commit 409b073

Please sign in to comment.