Skip to content

Explicitly set image tag to production and other azure resources to prod#2439

Merged
Aibono1225 merged 5 commits intomainfrom
prod-deploy-bugfix
Feb 6, 2026
Merged

Explicitly set image tag to production and other azure resources to prod#2439
Aibono1225 merged 5 commits intomainfrom
prod-deploy-bugfix

Conversation

@jakebayliss
Copy link
Member

@jakebayliss jakebayliss commented Feb 5, 2026

Description

During deployment there was a mismatch between image tags and environment passed through the bicep. This was causing the container image to be 'production' but the app service was looking for 'prod'.
This PR fixes up this mismatch by explicitly setting image tag to production and using this in the app service, while keeping azure resources as 'prod'

Other updates:

  • Created a new template for the deploy-infra code so we can re-use this.
  • Now running staging PR deployments on PR comment - /deploy. This is so we dont spam deployments + github actions on unnecessary PR's

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a deployment configuration mismatch where Docker images were tagged as 'production' but Azure App Service was configured to look for images tagged as 'prod'. The fix introduces a separate imageTag parameter that preserves the original environment name ('production' or 'staging') for Docker image references, while keeping Azure resource names using the normalized form ('prod' or 'staging').

Changes:

  • Introduced a new imageTag parameter to Bicep templates that defaults to the environment value but can be explicitly set
  • Modified deploy.ps1 to preserve the original environment name for Docker image tagging before normalizing to 'prod' for resource naming
  • Updated documentation and parameter descriptions to clarify the distinction between resource naming and image tagging

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
infra/modules/appService.bicep Added imageTag parameter and updated Docker image references to use it instead of environment
infra/main.bicep Added imageTag parameter with default value and passed it to the appService module
infra/deploy.ps1 Preserved original environment name as $ImageTag before normalization and passed it to Bicep templates; updated documentation to reflect 'staging' and 'production' as valid values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Aibono1225 Aibono1225 merged commit 0a0b456 into main Feb 6, 2026
@Aibono1225 Aibono1225 deleted the prod-deploy-bugfix branch February 6, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants