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

feat: release automation #8

Merged
merged 45 commits into from
Oct 12, 2023
Merged

Conversation

obs-gh-colinhutchinson
Copy link
Contributor

@obs-gh-colinhutchinson obs-gh-colinhutchinson commented Oct 6, 2023

This PR introduces automation for both github and aws release automation. There's more work that can (should) be done but in the interest of incremental improvements dropping a PR of what I have so far. The sequence of events from this PR to a release should be

todo:

  • remove colin from the three spots in the code
  • run terraform destory on the fork
  • get the PR approved / merged
  • run the terraform to setup the github / aws federation
  • restrict force push to main or the automation gets befuddled
  • restrict pushes to main and release

github actions on main will then:

  • run a aws sam build for every region / app
  • authn/authz with aws
  • generate a pre-release github tag
  • generate a pre-release github release
  • tag pull requests included in the release as released
  • comment on pull requests included in the release what release they are a part of
  • run the AWS SAM release workflow

official releases are ran as a manual workflow dispatch

end result screenshots

the release / tag
image

the pull request comment / label
image

the aws bucket result
image

jta and others added 27 commits October 4, 2023 20:50
SAM will handle uploading the stacks to an S3 bucket for us, which seems
more appropriate than trying to figure out how to dynamically load
the appropriate application Id.
Makefile Outdated Show resolved Hide resolved
infrastructure/backend.tf Outdated Show resolved Hide resolved
infrastructure/main.tf Outdated Show resolved Hide resolved
Comment on lines +3 to +8
{
"name": "release",
"channel": false,
"prerelease": false,
"type": "maintenance"
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

for future historians: this is a hack to trick semantic-release that we want main to do prereleases

Copy link
Contributor Author

@obs-gh-colinhutchinson obs-gh-colinhutchinson left a comment

Choose a reason for hiding this comment

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

Need to resolve why our assets are cross-contaminating.

my bucket colin-observeinc-us-east-1/apps/collection/1.4.0-beta.6/ has README, code, and cloudformation templates for both observe-aws-config and observe-forwarder

edit: looks like this is how AWS SAM handles the fact that collection and config are dependent 🤔
image

@jta
Copy link
Contributor

jta commented Oct 9, 2023

my bucket colin-observeinc-us-east-1/apps/collection/1.4.0-beta.6/ has README, code, and cloudformation templates for both observe-aws-config and observe-forwarder

I'd expect this in the case of nested stacks (rather than referring to external serverless repos). All assets are packaged as part of the same app.

This does bring up a dilemma wrt versioning. Do we want one version for all apps (easier to maintain), or separate versions per app (more accurate from user perspective).

@obs-gh-colinhutchinson obs-gh-colinhutchinson marked this pull request as ready for review October 12, 2023 16:41
@obs-gh-colinhutchinson obs-gh-colinhutchinson merged commit c2f1c24 into observeinc:main Oct 12, 2023
@github-actions
Copy link

🎉 This PR is included in version 1.0.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants