I'm currently using a modified AZD pipeline generated GitHub workflow to deploy to my Azure test environment, which is working great. I've created two environments locally using `azd env new` – one for testing (aspire-test) and one for production (aspire-prod), and I can deploy to them using `azd deploy`. However, I'm struggling to update my workflow for production deployment. It seems to rely on the AZD_INITIAL_ENVIRONMENT_CONFIG that's set up during `azd pipeline config`, but this only works with the environment selected when that configuration was last run. I thought Aspire was ready for CI/CD, but it's frustrating if I can only deploy to one environment!
3 Answers
What I do is use GitHub Actions environments for deployment. You just rename your environment and it handles the rest. We have dev, test, and prod setups. The key for AZD is to adjust the variables you pass to it. Have you considered modifying your AZURE_ENV_NAME? That's usually the trick to get it working.
I appreciate the input! I get stuck because `azd provision` pulls its configuration from secrets.AZD_INITIAL_ENVIRONMENT_CONFIG, which is linked to the environment set at the time. When I try to use a different environment, the deployment fails due to mismatching values. How do you guys work around that in your setups?
Honestly, AZD can be a real hassle for CI/CD setups, not so much due to Aspire's capabilities. I’d recommend looking into using `dotnet publish` and managing your provisioning and infrastructure tasks manually. Trying to make AZD work without all the unnecessary complexity is like reinventing the wheel. It might be easier this way!
Related Questions
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically
[Centos] Delete All Files And Folders That Contain a String