Skip to content

Github Actions workflow to do deployment paperwork#9859

Merged
matthinz merged 11 commits intomainfrom
matthinz/create-deploy-pr-workflow
Jan 16, 2024
Merged

Github Actions workflow to do deployment paperwork#9859
matthinz merged 11 commits intomainfrom
matthinz/create-deploy-pr-workflow

Conversation

@matthinz
Copy link
Contributor

@matthinz matthinz commented Jan 5, 2024

This PR adds two new Gitub Actions workflows:

  • create-deploy-pr
  • create-release

These workflows are meant to support our existing deployment process, automating some of the "paperwork" associated with creating deployment PRs.

create-deploy-pr

This workflow is meant to be triggered manually. It:

  • Creates a new RC branch based either on the current staging SHA or a branch / sha provided as input
  • Assembles a change log
  • Creates a PR to stages/prod with the appropriate label

create-release

This workflow will be triggered automatically after the PR created by create-deploy-pr is merged. It will create a new Github Release and an accompanying tag. The tag will be signed with the Github Actions bot GPG key (since that's who created it). The release notes will be copied from the original PR (so if you edit the change log after creating the PR, those edits should propagate over to the release).

Testing

The easiest way to test this is probably to fork identity-idp and run the "Create deploy PR" workflow in your fork:

Screenshot 2024-01-05 at 4 02 28 PM

After you create your PR you can merge it, and you should end up with a new release created.

A couple of notes about branches:

  • I've been testing with the workflows on main in my fork, but I think you should be able to trigger the Create deploy pr workflow from another branch if needed.
  • The workflow .yml files must be present on your stages/prod branch for the release to be created after merging. If they are included as part of the release, that should be enough.

Copy link
Contributor

@soniaconnolly soniaconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exciting to see this taking shape!

@matthinz matthinz force-pushed the matthinz/create-deploy-pr-workflow branch from 3645054 to e72f923 Compare January 5, 2024 21:54
This Github Actions workflow can be triggered manually and will create a new PR for a deployment.

changelog: Internal, Deployment, Add Github Actions workflow to create deployment PRs.
- Add command line args, incl. --dry-run
- Refactor some stuff out to funcs
- Check for GH_TOKEN variable
- Push SHA to remote directly rather than checking out local branch
@matthinz matthinz force-pushed the matthinz/create-deploy-pr-workflow branch from e72f923 to b4b4c90 Compare January 5, 2024 23:29
@matthinz matthinz changed the title Initial draft of create-deploy-pr workflow (proof of concept) create-deploy-pr workflow Jan 6, 2024
@matthinz matthinz changed the title create-deploy-pr workflow Github Actions workflow to do deployment paperwork Jan 6, 2024
@matthinz matthinz marked this pull request as ready for review January 6, 2024 00:14
Copy link
Contributor

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had some pending comments I forgot to submit 🤦 But this LGTM! Noting that I haven't had a chance to actually test it, but the code looks sensible. This seems really neat; I didn't know you could launch a parameterized workflow like this on-demand.

@matthinz
Copy link
Contributor Author

Going to land this in the interest of getting out to the relevant branches--there will be some extra work to enable Github actions on the IDP.

@matthinz matthinz merged commit 9f510e9 into main Jan 16, 2024
@matthinz matthinz deleted the matthinz/create-deploy-pr-workflow branch January 16, 2024 17:14
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.

4 participants