Production deployments need their own automated GitHub action that should be triggered manually. The process should take a source image gallery and version as input and create the required artifacts. This includes importing the source image into the production image gallery and creating the VM offer resources.
Pre-Reqs
Production resource group and production image gallery have already been created
Success Criteria
Github action named ProdBuild.yml lives in the .github/workflows directory
Trigger should be set to workflow_dispatch
Workflow should accept variables for image gallery and image/version
The source image should be successfully copied to the production image
The version of the production image should be be in semantic versioning format with semantic versioning rules
The version should be independent of the source version
The image should be tagged as "prod"
Justification
We need an isolated production workflow that is as focused and simple as possible. It should be triggered manually but produce the necessary steps to create the production assets. Isolating a production deployment allows us to give access to select individuals and reduce the risk of error by eliminating unnecessary branch-by-condition scenarios.
Implementation
Export Image from Source Gallery
Create a snapshot of the image version from the source gallery
Export this snapshot to a VHD in a storage account
Import Image into Target Gallery
Fail if the production image gallery doesn't already exist
Create a new semantic version or take one from input
Clean Up
Once the image is available in the target gallery, delete the intermediate VHD and snapshot to avoid incurring additional costs
Requirement
Production deployments need their own automated GitHub action that should be triggered manually. The process should take a source image gallery and version as input and create the required artifacts. This includes importing the source image into the production image gallery and creating the VM offer resources.
Pre-Reqs
Success Criteria
Justification
We need an isolated production workflow that is as focused and simple as possible. It should be triggered manually but produce the necessary steps to create the production assets. Isolating a production deployment allows us to give access to select individuals and reduce the risk of error by eliminating unnecessary branch-by-condition scenarios.
Implementation