Reusing same environment rule within same workflow
Running our workflow in Github, we split our tasks up into 2 jobs; Building docker image & attach tags and deploying to AWS using CodeDeploy. The reason for splitting the tasks up is to avoid creating new tags whenever our deployment fails.
However... using environment protection rules creates a roadblock as every job needs to be approved(even though we already ran the same environment previously)
The deployment job is a conditional job, meaning it depends on the success of the Build job.
Is there any way to get around this?
Github workflow
I'm not sure I have the full context here but based on the above screenshot here would be my recommendation.
dev -> pre-prod -> prod by adding a needs block for each environment.environment for each deployment job which will have their own protection rules. Or maybe you don't care about approving deployments to the dev environment -- so just don't add an environment rule for that deployment environment.Hopefully this helps provide some guidance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With