Skip to content

Branch Deployment Example#11

Merged
GrantBirki merged 1 commit into
mainfrom
branch-deploy-demo
Apr 1, 2022
Merged

Branch Deployment Example#11
GrantBirki merged 1 commit into
mainfrom
branch-deploy-demo

Conversation

@GrantBirki

Copy link
Copy Markdown
Member

Branch Deployment Example

This pull request demonstrates the branch deployment workflow using GitHub Actions, Terraform, and IssueOps

Follow along 👀 with the comments on this PR to see how this works!

@github-actions

github-actions Bot commented Apr 1, 2022

Copy link
Copy Markdown

Terraform Plan - Production 🪐

  • Terraform Format and Style 🖌: success
  • Terraform Initialization ⚙️: success
  • Terraform Validation 🤖: success
  • Terraform Plan 📖: success
Show Plan
cloudflare_record.assets: Refreshing state... [id=fa9d45fc579f68883bce2b2e2bf4e378]
cloudflare_zone.tarkov_dev: Refreshing state... [id=a17204c79af55fcf05e4975f66e2490e]
cloudflare_record.api: Refreshing state... [id=5a6f0c44f89893d479067808915a429f]
cloudflare_record.root: Refreshing state... [id=58772b98e3e902db650041cbe2262633]
cloudflare_record.market: Refreshing state... [id=c0e350a380953cdff74f16c911b3c595]
cloudflare_rate_limit.tarkov_dev: Refreshing state... [id=c17da00a5a7b435680c638b26bf6cc5c]
cloudflare_record.www: Refreshing state... [id=c9b09dbb4885589e1d7a7ed17f0b7bc8]
cloudflare_zone_settings_override.tarkov_dev: Refreshing state... [id=a17204c79af55fcf05e4975f66e2490e]
cloudflare_record.status: Refreshing state... [id=8b78ff4373eb3ed0fedc73ee511c4168]
cloudflare_record.manager: Refreshing state... [id=2e208b66455795c12afd59021c56d891]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # cloudflare_record.manager will be updated in-place
  ~ resource "cloudflare_record" "manager" {
        id              = "2e208b66455795c12afd59021c56d891"
        name            = "manager"
      ~ ttl             = 120 -> 240
        # (10 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @GrantBirki, Action: pull_request, Working Directory: terraform/, Workflow: ci

@GrantBirki

GrantBirki commented Apr 1, 2022

Copy link
Copy Markdown
Member Author

I have reviewed the Terraform plan output above ^ and have confirmed it looks correct. At this point would ask for an approval from a member of the the-hideout reviewer team. I am on that team and this is just example so I will proceed with a branch deployment to deploy my changes to production and ensure that they work!

All I need to do is simply comment .deploy below

@GrantBirki

Copy link
Copy Markdown
Member Author

.deploy

@GrantBirki

Copy link
Copy Markdown
Member Author

If you look at the GitHub Actions tab for this repository, you will now see that a deployment is pending.

image

Once again, a member of the-hideout reviewer team will click "deploy" and your changes will begin rolling out. I will do this now for my PR since I am on said team 🚀

@github-actions

github-actions Bot commented Apr 1, 2022

Copy link
Copy Markdown

🚀 GrantBirki, starting a branch deployment

  • Branch: branch-deploy-demo
  • REF: branch-deploy-demo

You can watch the progress here

@github-actions

github-actions Bot commented Apr 1, 2022

Copy link
Copy Markdown

Deployment Results - Production 🪐

  • Deployment 🚀: success
Show Apply
cloudflare_record.manager: Refreshing state... [id=2e208b66455795c12afd59021c56d891]
cloudflare_record.market: Refreshing state... [id=c0e350a380953cdff74f16c911b3c595]
cloudflare_record.status: Refreshing state... [id=8b78ff4373eb3ed0fedc73ee511c4168]
cloudflare_rate_limit.tarkov_dev: Refreshing state... [id=c17da00a5a7b435680c638b26bf6cc5c]
cloudflare_record.assets: Refreshing state... [id=fa9d45fc579f68883bce2b2e2bf4e378]
cloudflare_zone.tarkov_dev: Refreshing state... [id=a17204c79af55fcf05e4975f66e2490e]
cloudflare_record.www: Refreshing state... [id=c9b09dbb4885589e1d7a7ed17f0b7bc8]
cloudflare_record.api: Refreshing state... [id=5a6f0c44f89893d479067808915a429f]
cloudflare_zone_settings_override.tarkov_dev: Refreshing state... [id=a17204c79af55fcf05e4975f66e2490e]
cloudflare_record.root: Refreshing state... [id=58772b98e3e902db650041cbe2262633]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # cloudflare_record.manager will be updated in-place
  ~ resource "cloudflare_record" "manager" {
        id              = "2e208b66455795c12afd59021c56d891"
        name            = "manager"
      ~ ttl             = 120 -> 240
        # (10 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.
cloudflare_record.manager: Modifying... [id=2e208b66455795c12afd59021c56d891]
cloudflare_record.manager: Modifications complete after 1s [id=2e208b66455795c12afd59021c56d891]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Please wait at least 5 minutes after a deployment to validate your changes before merging

Pusher: @GrantBirki, Action: issue_comment, Working Directory: terraform/, Workflow: branch-deploy

@GrantBirki

Copy link
Copy Markdown
Member Author

Woohoo! 🎉 Looking at an online dig, we can see our DNS record updated exactly as we wanted it too and it is now displaying 240 seconds (4 minutes) as the TTL

image

Now that we have confirmed our changes are valid and live in production we can go ahead and merge our PR. Since these changes are already live and their state is reflected in Terraform, the deploy on merge should be a noop which is exactly what we want in this case. Let's 🚢 it!

@GrantBirki GrantBirki merged commit 10c53aa into main Apr 1, 2022
@GrantBirki GrantBirki deleted the branch-deploy-demo branch April 1, 2022 03:54
@github-actions github-actions Bot mentioned this pull request Apr 27, 2022
This was referenced May 4, 2022
Closed
@github-actions github-actions Bot mentioned this pull request May 17, 2022
@github-actions github-actions Bot mentioned this pull request May 24, 2022
This was referenced Jun 2, 2022
This was referenced Jun 13, 2022
This was referenced Jun 23, 2022
Closed
Closed
@github-actions github-actions Bot mentioned this pull request Aug 27, 2022
This was referenced Nov 24, 2022
@github-actions github-actions Bot mentioned this pull request Jan 3, 2023
This was referenced Feb 15, 2023
This was referenced Mar 13, 2023
This was referenced Apr 10, 2023
@github-actions github-actions Bot mentioned this pull request Apr 30, 2023
@github-actions github-actions Bot mentioned this pull request Jun 2, 2023
@github-actions github-actions Bot mentioned this pull request Jun 19, 2023
@github-actions github-actions Bot mentioned this pull request Sep 3, 2023
@github-actions github-actions Bot mentioned this pull request Dec 6, 2023
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.

1 participant