Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforced Deployment Order #304

Merged
merged 28 commits into from
Sep 20, 2024
Merged

Enforced Deployment Order #304

merged 28 commits into from
Sep 20, 2024

Conversation

GrantBirki
Copy link
Member

@GrantBirki GrantBirki commented Sep 19, 2024

Enforced Deployment Order 🚀

Introducing a long requested feature, enforced deployment order...

Summary

This pull request does the following:

  • adds a new enforced_deployment_order input option that can be used to require deployments to take place "in order" and for each to pass before the next one can be triggered
  • adds a new needs_to_be_deployed output that maps to the environments that require successful deployments if a deployment attempt is rejected

Detailed

This feature is one that has been requested by folks internally and externally to GitHub for a long time (over a year). This pull request makes it so that users can now control the order in which deployments are made (if they choose to do so).

This feature is optional and can be enabled by setting, enforced_deployment_order: <env1>,<env2>,<env3>. The value for enforced_deployment_order is a string that is read from left->right with each value separated by commas. Each value in this comma separated list is an environment that you wish to use in an "enforced deployment order". Here is an example:

- uses: github/[email protected]
  id: branch-deploy
  with:
    environment_targets: development,staging,production
    enforced_deployment_order: development,staging,production

This means that your project has three environments in total (development,staging,production). The enforced_deployment_order input option specifies that your environments must now be deployed in the order in which they are written. So if you want to deploy to production, you must first have a successful (and active) deployment to development and staging before the branch-deploy Action will allow you to trigger a deployment to production.

Examples 📸

Screenshot 2024-09-19 at 6 21 42 PM

Screenshot 2024-09-19 at 5 50 30 PM

related: #303

@GrantBirki GrantBirki added the enhancement New feature or request label Sep 19, 2024
@GrantBirki GrantBirki self-assigned this Sep 19, 2024
@GrantBirki GrantBirki marked this pull request as ready for review September 20, 2024 01:44
northrup
northrup previously approved these changes Sep 20, 2024
@GrantBirki GrantBirki merged commit a5f65d4 into main Sep 20, 2024
4 checks passed
@GrantBirki GrantBirki deleted the enforced-deployment-order branch September 20, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants