Replies: 1 comment
-
|
@CMeeg We have an active issue tracking this very topic. Github & AzDO environments make a perfect fit here |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I like that the
azd pipeline configcommand automates setting up service principals and service connections, but I think there is room for improvement in how it handles environments and environment variables.When I used the command to configure GitHub Actions some environment variables were created in my repository, but this made me think about what would happen if I wanted my pipeline to support CI/CD for multiple target environments, e.g. a
uatand aprodenvironment, and those environments required different values for some or all of those environment variables, or other environment variables required by my apps/services. I think this would be a fairly common scenario, and I wanted to support it directly in the azd template I have been developing.GitHub has a concept of Environments that can be used to support this type of requirement.
Azure DevOps (AZDO) has Environments and Variable groups that can be used similarly.
Another benefit of using Environments in GitHub and AZDO is governance through "Deployment protection rules" and "Approvals & checks" (respectively).
I have made use of the above mentioned features of GitHub Actions and AZDO in my template, but it requires additional setup steps to be documented and followed to get it working. I could (and maybe will) write my own custom scripts to automate some or all of this setup, but it would be fantastic if
azd pipeline configleveraged these platform features and I think it would work really well alongside the concept of environments already available inazd.In summary, this is what I would like
azd pipeline configto do (either by default or as an option):GitHub Actions deploying Azure resourcescredentials to the GitHub EnvironmentAZURE_ENV_NAME,AZURE_SUBSCRIPTION_ID,AZURE_CLIENT_IDetc)AZURE_ENV_NAME,AZURE_SUBSCRIPTION_ID)The GitHub Actions workflow and AZDO Pipelines yaml files provided in the azd template can then include some conditional logic to select the appropriate Environment (and load the associated variables) during a pipeline run, for example, based on source branch e.g. source branch =
main- select theprodEnvironment and variables, source branch =develop- select thebuildEnvironment and variables etc.If you then wanted to support a new Environment through CI/CD you could:
azd envazd pipeline configto create the Environment and variables etc in GitHub/AZDOazd upinto your new environmentBeta Was this translation helpful? Give feedback.
All reactions