Skip to content

Commit 8a566f8

Browse files
committed
pull latest sql server and add extended retry for auth
1 parent c237584 commit 8a566f8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

azure-pipelines.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ jobs:
257257

258258
- script: |
259259
docker version
260-
docker pull mcr.microsoft.com/mssql/server:2022-latest
260+
# Force pull the latest 2022 image
261+
docker pull --disable-content-trust mcr.microsoft.com/mssql/server:2022-latest
261262
docker run -e 'ACCEPT_EULA=Y' -e "SA_PASSWORD=$(TestAppPassword)" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
262263
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
263264
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
@@ -334,14 +335,14 @@ jobs:
334335
export PATH="$PATH:/opt/mssql-tools/bin"
335336
336337
# Retry authentication until SQL Server finishes its internal upgrade process
337-
for i in {1..30}; do
338-
echo "Authentication attempt $i of 30..."
338+
for i in {1..60}; do
339+
echo "Authentication attempt $i of 60..."
339340
if sqlcmd -S localhost -U sa -P "$(TestAppPassword)" -Q "SELECT 1 AS test" -t 10 >/dev/null 2>&1; then
340341
echo "✅ SQL Server authentication successful after $i attempts!"
341342
break
342343
else
343-
if [ $i -eq 30 ]; then
344-
echo "❌ SQL Server authentication FAILED after 30 attempts!"
344+
if [ $i -eq 60 ]; then
345+
echo "❌ SQL Server authentication FAILED after 60 attempts!"
345346
echo "Final attempt with verbose output:"
346347
sqlcmd -S localhost -U sa -P "$(TestAppPassword)" -Q "SELECT 1 AS test" -t 10
347348
echo ""

0 commit comments

Comments
 (0)