Skip to content

Commit

Permalink
Update azure-pipelines.yml for Azure Pipelines
Browse files Browse the repository at this point in the history
Getting the Revision to update dynamically AB#379
  • Loading branch information
thattonBL committed Jan 9, 2025
1 parent 5d26042 commit 0bf855b
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,23 @@ steps:
--image $(DOCKER_IMAGE):latest \
--query "[].properties.provisioningState"
az containerapp revision restart \
# Get the active revision
REVISION_NAME=$(az containerapp revision list \
--name $(AZURE_CONTAINER_APP_NAME) \
--resource-group $(RESOURCE_GROUP) \
--revision building33-mock-api-iac--drms06e
--query "[?properties.active].name" -o tsv)
echo "Global Integration API Container App updated successfully for Azure Subscription $(AZURE_SUBSCRIPTION)"
echo "Active Revision: $REVISION_NAME"
# Restart to update live deployment if we have an active revision
if [ -n "$REVISION_NAME" ]; then
az containerapp revision restart \
--name $(AZURE_CONTAINER_APP_NAME) \
--resource-group $(RESOURCE_GROUP) \
--revision $REVISION_NAME
else
echo "No active revision found"
exit 1
fi
echo "Building 33 Mock API Container App updated successfully for Azure Subscription $(AZURE_SUBSCRIPTION)"

0 comments on commit 0bf855b

Please sign in to comment.