Skip to content

Use Docker images from ACR in GHA workflows #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 6 additions & 34 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,29 +76,16 @@ jobs:

test-docker-images:
name: verify that the docker images work
needs: publish_docker_image_to_docker_hub
needs: publish_docker_image_to_acr
runs-on: ubuntu-24.04
env:
SA_PASSWORD: "P@ssw0rd"

strategy:
matrix:
include:
# empty image, no test dumps are imported
- dockerImage: empty
volumeMapping: ""
expectedOutput: |
name
--------------------------------------------------------------------------------------------------------------------------------
master
model
msdb
tempdb

(4 rows affected)
# schema-only image, no test dumps are imported
- dockerImage: schema-only
volumeMapping: ""
# no test dumps are imported
- volumeMapping: ""
expectedOutput: |
name
--------------------------------------------------------------------------------------------------------------------------------
Expand All @@ -109,23 +96,8 @@ jobs:
tempdb

(5 rows affected)
# empty image, but test dumps are imported
- dockerImage: empty
volumeMapping: ' -v "$(pwd)/docker-image-test-data:/data:ro"'
expectedOutput: |
name
--------------------------------------------------------------------------------------------------------------------------------
bardb
foodb
master
model
msdb
tempdb

(6 rows affected)
# schema-only image, also test dumps are imported
- dockerImage: schema-only
volumeMapping: ' -v "$(pwd)/docker-image-test-data:/data:ro"'
# test dumps are imported
- volumeMapping: ' -v "$(pwd)/docker-image-test-data:/data:ro"'
expectedOutput: |
name
--------------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -168,7 +140,7 @@ jobs:
--network hsl \
-e SA_PASSWORD="$SA_PASSWORD" \
${{ matrix.volumeMapping }} \
$IMAGE_NAME:${{ matrix.dockerImage }}-$COMMIT_ID
"${{ needs.publish_docker_image_to_acr.outputs.docker_image }}"

- name:
Verify that dockerized MSSQL database is up and can be connected to
Expand Down