Skip to content

Commit

Permalink
Update tests to use new build args
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-ax committed Dec 23, 2023
1 parent d2acdab commit 40b2c56
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ jobs:
- < Dockerfile
- name: Run tests
id: smoketest
run: |
docker-compose -f tests/docker-compose.test.postgres.yml build \
--build-arg VCS_REF=${{ github.sha }} \
--build-arg VERSION=$(cat VERSION)
docker-compose -f tests/docker-compose.test.postgres.yml up --exit-code-from tester
run: >-
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
RELEASE=$(cat VERSION)
VERSION=${{ github.sha }}
docker-compose
-f tests/docker-compose.test.mongodb.yml
up
--build
--quiet-pull
--exit-code-from tester
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
Expand All @@ -48,11 +53,16 @@ jobs:
- < Dockerfile
- name: Run tests
id: smoketest
run: |
docker-compose -f tests/docker-compose.test.mongodb.yml build \
--build-arg VCS_REF=${{ github.sha }} \
--build-arg VERSION=$(cat VERSION)
docker-compose -f tests/docker-compose.test.mongodb.yml up --exit-code-from tester
run: >-
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
RELEASE=$(cat VERSION)
VERSION=${{ github.sha }}
docker-compose
-f tests/docker-compose.test.mongodb.yml
up
--build
--quiet-pull
--exit-code-from tester
- uses: act10ns/slack@v2
with:
status: ${{ job.status }}
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: '3.1'

services:
web:
image: alerta/alerta-web
Expand Down
5 changes: 3 additions & 2 deletions tests/docker-compose.test.mongodb.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
version: '3'
version: '3.1'

services:
sut:
build:
context: ..
args:
VCS_REF: ${VCS_REF}
BUILD_DATE: ${BUILD_DATE}
RELEASE: ${RELEASE}
VERSION: ${VERSION}
# image: alerta/alerta-web
ports:
Expand Down
5 changes: 3 additions & 2 deletions tests/docker-compose.test.postgres.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
version: '3'
version: '3.1'

services:
sut:
build:
context: ..
args:
VCS_REF: ${VCS_REF}
BUILD_DATE: ${BUILD_DATE}
RELEASE: ${RELEASE}
VERSION: ${VERSION}
# image: alerta/alerta-web
ports:
Expand Down

0 comments on commit 40b2c56

Please sign in to comment.