Skip to content
Merged
Changes from 25 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cbb5e93
CHORE: Make ADO pipelines public
bewithgaurav Aug 19, 2025
7d2d95e
added resources
bewithgaurav Aug 19, 2025
53db1c5
changed endpoint
bewithgaurav Aug 20, 2025
8751def
disabled self checkout
bewithgaurav Aug 20, 2025
9f31642
disabled none checkout
bewithgaurav Aug 20, 2025
87762cf
commented out explicit service connection mapping
bewithgaurav Aug 20, 2025
9fdf70f
commented out explicit service connection mapping
bewithgaurav Aug 20, 2025
c1e48e4
restored ADO SSO connection
bewithgaurav Aug 20, 2025
46a92b5
checking reasons and where builds are coming from
bewithgaurav Aug 20, 2025
e7bf48c
recreated pipeline, cleanup done
bewithgaurav Aug 20, 2025
9217d1e
readded resources
bewithgaurav Aug 20, 2025
6b9cbf0
cleanup of resources
bewithgaurav Aug 20, 2025
f1e6a22
triggering
bewithgaurav Aug 21, 2025
53e253e
triggering
bewithgaurav Aug 22, 2025
055a490
triggers changed
bewithgaurav Aug 22, 2025
db109f7
removed echo statements
bewithgaurav Aug 22, 2025
b5a5158
waiting for sql server to start
bewithgaurav Aug 22, 2025
a7ba415
waiting for sql server to start
bewithgaurav Aug 22, 2025
4411656
test pass issues
bewithgaurav Aug 22, 2025
021c089
test pass issues
bewithgaurav Aug 22, 2025
6303c69
test pass issues
bewithgaurav Aug 22, 2025
0cc50c2
test pass issues
bewithgaurav Aug 22, 2025
df96f10
test pass issues
bewithgaurav Aug 22, 2025
3748241
increase timeout for sql server
bewithgaurav Aug 25, 2025
eb3c5c1
add a test step
bewithgaurav Aug 25, 2025
c237584
add a retry auth step
bewithgaurav Aug 25, 2025
8a566f8
pull latest sql server and add extended retry for auth
bewithgaurav Aug 25, 2025
6dcad7d
switch to sql server 2019
bewithgaurav Aug 25, 2025
e0876fe
forcefully redirect localhost
bewithgaurav Aug 28, 2025
51b44e6
cleanup and ready for review
bewithgaurav Aug 28, 2025
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
70 changes: 62 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
trigger:
- master
- dev
- 1ES

pr:
branches:
Expand All @@ -16,9 +14,6 @@
- dev
always: true

variables:
- group: DjangoTestApp

jobs:
- job: Windows
pool:
Expand Down Expand Up @@ -149,7 +144,7 @@
displayName: Restart SQL Server
- powershell: |
(Get-Content -ReadCount 0 testapp\settings.py) -replace 'MyPassword42', '$(TestAppPassWord)' | Set-Content testapp\settings.py
(Get-Content -ReadCount 0 testapp\settings.py) -replace 'MyPassword42', '$(TestAppPassword)' | Set-Content testapp\settings.py
displayName: Change PASSWORD in settings.py
- powershell: |
Expand Down Expand Up @@ -263,9 +258,36 @@
- script: |
docker version
docker pull mcr.microsoft.com/mssql/server:2022-latest
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=$(TestAppPassword)' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
docker run -e 'ACCEPT_EULA=Y' -e "SA_PASSWORD=$(TestAppPassword)" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
# Wait for SQL Server to be ready with increased timeout
echo "Waiting for SQL Server to start..."
# Extended wait for the container to be running and SQL Server service to be listening
for i in {1..60}; do
if docker logs $(docker ps -q --filter ancestor=mcr.microsoft.com/mssql/server:2022-latest) 2>&1 | grep -q "SQL Server is now ready for client connections"; then
echo "SQL Server service is ready after $i attempts ($(($i * 3)) seconds)"
break
fi
echo "Attempt $i: Waiting for SQL Server service to be ready, checking again in 3 seconds..."
sleep 3
done
# Increased wait to ensure full initialization for database operations
echo "Waiting additional 60 seconds for full SQL Server initialization..."
sleep 60
# Verify we can connect using a simple network test first
echo "Testing SQL Server connectivity..."
if ! timeout 30 bash -c 'until echo > /dev/tcp/localhost/1433; do sleep 1; done'; then
echo "Cannot connect to SQL Server on port 1433"
docker logs $(docker ps -q --filter ancestor=mcr.microsoft.com/mssql/server:2022-latest)
exit 1
fi
echo "SQL Server is ready and accepting connections"
displayName: Install SQL Server
- script: |
Expand Down Expand Up @@ -303,6 +325,25 @@
fi
displayName: Install ODBC Driver
- script: |
# Install mssql-tools to get sqlcmd
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools
# Test SQL Server authentication
echo "Testing SQL Server authentication with SA user..."
export PATH="$PATH:/opt/mssql-tools/bin"
# Try to connect and run a simple query
if sqlcmd -S localhost -U sa -P "$(TestAppPassword)" -Q "SELECT 1 AS test" -t 30; then
echo "✅ SQL Server authentication successful!"
else
echo "❌ SQL Server authentication FAILED!"
echo "Container logs:"
docker logs $(docker ps -q --filter ancestor=mcr.microsoft.com/mssql/server:2022-latest)
exit 1
fi
displayName: Test SQL Server Authentication
- script: |
# Since pylibmc isn't supported for Python 3.12+
# We need to install libmemcached-dev to build it - dependency for Django test suite
Expand All @@ -320,9 +361,22 @@
displayName: Install Python requirements
- script: |
sed -i 's/MyPassword42/$(TestAppPassword)/g' testapp/settings.py
# Use a different delimiter (|) to avoid issues with special characters in password
sed -i "s|MyPassword42|$(TestAppPassword)|g" testapp/settings.py
displayName: Change PASSWORD in settings.py
- script: |
echo "Verifying password replacement..."
if grep -q "MyPassword42" testapp/settings.py; then
echo "ERROR: Password replacement failed - MyPassword42 still found"
exit 1
else
echo "Password replacement successful"
fi
echo "Database configuration:"
grep -A 10 -B 2 "PASSWORD" testapp/settings.py
displayName: Verify PASSWORD replacement
- script: tox -e $(tox.env)
displayName: Run tox

Expand Down
Loading