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

Branch Deploy Example #4

Closed
wants to merge 2 commits into from
Closed

Branch Deploy Example #4

wants to merge 2 commits into from

Conversation

GrantBirki
Copy link
Owner

This pull request demonstrates an example using IssueOps and GitHub Actions to deploy DNS changes with octodns and github/branch-deploy

Copy link

👋 Thanks for opening a pull request!

Here is a trimmed down summary of the deployment process:

  1. 🧪 Run a noop deployment with .noop as a comment on this PR

  2. 👀 Observe the CI and noop output on this pull request to ensure it is passing and doing what it is supposed to do

  3. ✔️ Obtain an approval/review on this pull request

  4. 🚀 Branch deploy your pull request to production with .deploy

    If anything goes wrong, rollback with .deploy main

  5. 🎉 Merge!

Note: you can use .deploy | FORCE=true to force deploy changes

Repository owner deleted a comment from github-actions bot Mar 10, 2024
Repository owner deleted a comment from github-actions bot Mar 10, 2024
@GrantBirki
Copy link
Owner Author

.noop

Copy link

Deployment Triggered 🚀

GrantBirki, started a noop deployment to production

You can watch the progress here 🔗

noop: branch-deploy-demo

Copy link

Deployment Results ✅

GrantBirki successfully noop deployed branch branch-deploy-demo to production

Show Results

birki.io.

cloudflare

Operation Name Type TTL Value Source
Create example TXT 3600 hello world config
Summary: Creates=1, Updates=0, Deletes=0, Existing Records=24

@GrantBirki
Copy link
Owner Author

.deploy

Copy link

Deployment Triggered 🚀

GrantBirki, started a branch deployment to production

You can watch the progress here 🔗

Branch: branch-deploy-demo

Copy link

Deployment Results ✅

GrantBirki successfully branch deployed branch branch-deploy-demo to production

Show Results

birki.io.

cloudflare

Operation Name Type TTL Value Source
Create example TXT 3600 hello world config
Summary: Creates=1, Updates=0, Deletes=0, Existing Records=24

@GrantBirki
Copy link
Owner Author

Yay the deploy worked! 🎉

Screenshot 2024-03-09 at 10 29 56 PM

... now let's demo a force deploy to ignore things that you might get with octodns like too many changes at once (example)

@GrantBirki
Copy link
Owner Author

.deploy | FORCE=true

Copy link

Deployment Triggered 🚀

GrantBirki, started a branch deployment to production

You can watch the progress here 🔗

Branch: branch-deploy-demo

Copy link

Deployment Results ✅

GrantBirki successfully branch deployed branch branch-deploy-demo to production

Show Results

No changes were planned

@GrantBirki
Copy link
Owner Author

No changes which is expected since the last deploy got everything up to speed. Now lets simulate something going really wrong. I will first check to see if anyone owns the deployment lock. If no one owns it (or if I do), I will start a rollback deploy to bring the main branch back to the production state.

@GrantBirki
Copy link
Owner Author

.wcid

Copy link

Lock Details 🔒

The deployment lock is currently claimed by GrantBirki

  • Reason: null
  • Branch: branch-deploy-demo
  • Created At: 2024-03-10T05:29:20.792Z
  • Created By: GrantBirki
  • Sticky: true
  • Environment: production
  • Comment Link: click here
  • Lock Link: click here

The current lock has been active for 0d:0h:3m:45s

If you need to release the lock, please comment .unlock production

@GrantBirki
Copy link
Owner Author

.deploy main

Copy link

Deployment Triggered 🚀

GrantBirki, started a branch deployment to production

You can watch the progress here 🔗

Branch: main

Copy link

Deployment Results ✅

GrantBirki successfully branch deployed branch main to production

Show Results

birki.io.

cloudflare

Operation Name Type TTL Value Source
Delete example TXT 300 hello world
Summary: Creates=0, Updates=0, Deletes=1, Existing Records=25

@GrantBirki
Copy link
Owner Author

Cool! We have rolled back. Time to unlock production and close this issue as the demo is done

@GrantBirki
Copy link
Owner Author

.unlock production

Copy link

🔓 Deployment Lock Removed

The production deployment lock has been successfully removed

@ross
Copy link

ross commented Mar 10, 2024

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants