Skip to content

Commit 94b28ad

Browse files
author
Janne Rönkkö
committed
Do not require sqlcmd to be installed on the GHA runner when setting up e2e environment
1 parent 09c558a commit 94b28ad

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

github-actions/setup-e2e-environment/action.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,16 @@ runs:
173173
SA_PASSWORD: "P@ssw0rd"
174174
with:
175175
command:
176-
'sqlcmd -S 127.0.0.1 -U sa -P "$SA_PASSWORD" -d master -Q "SELECT
177-
''OK'';"'
176+
docker run
177+
--rm
178+
--network docker_jore4 $(docker inspect mssqltestdb | jq -r '.[0].Config.Image')
179+
/opt/mssql-tools18/bin/sqlcmd
180+
-C
181+
-S $(docker inspect mssqltestdb | jq -r '.[0].NetworkSettings'.Networks.docker_jore4.IPAddress)
182+
-U sa
183+
-P "$SA_PASSWORD"
184+
-d master
185+
-Q "SELECT ''OK'';"
178186
# it takes a while for the database to start
179187
retries: 50
180188

0 commit comments

Comments
 (0)