From 845de6b3533bea7bc6f55bf00a3493a908a02e45 Mon Sep 17 00:00:00 2001 From: Jake Spain Date: Mon, 30 Jan 2023 09:24:55 -0500 Subject: [PATCH] Add changelog and release instructions --- .github_changelog_generator | 3 +++ CHANGELOG.md | 37 +++++++++++++++++++++++++++++++++++++ README.md | 26 ++++++++++++++++++++++++++ update-changelog | 5 +++++ update-gemfile-lock | 7 +++++++ 5 files changed, 78 insertions(+) create mode 100644 .github_changelog_generator create mode 100644 CHANGELOG.md create mode 100755 update-changelog create mode 100755 update-gemfile-lock diff --git a/.github_changelog_generator b/.github_changelog_generator new file mode 100644 index 0000000..0572251 --- /dev/null +++ b/.github_changelog_generator @@ -0,0 +1,3 @@ +project=vmpooler-provider-ec2 +user=puppetlabs +exclude_labels=maintenance \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..375e395 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,37 @@ +# Changelog + +## [Unreleased](https://github.com/puppetlabs/vmpooler-provider-ec2/tree/HEAD) + +[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-ec2/compare/0.0.2...HEAD) + +**Merged pull requests:** + +- \(RE-15111\) Migrate Snyk to Mend Scanning [\#12](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/12) ([yachub](https://github.com/yachub)) +- \(RE-14811\) Remove DIO as codeowners [\#11](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/11) ([yachub](https://github.com/yachub)) +- Add Snyk action [\#10](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/10) ([yachub](https://github.com/yachub)) +- Add release-engineering to codeowners [\#9](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/9) ([yachub](https://github.com/yachub)) + +## [0.0.2](https://github.com/puppetlabs/vmpooler-provider-ec2/tree/0.0.2) (2022-08-02) + +[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-ec2/compare/0.0.1...0.0.2) + +**Merged pull requests:** + +- Update version.rb [\#8](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/8) ([sbeaulie](https://github.com/sbeaulie)) + +## [0.0.1](https://github.com/puppetlabs/vmpooler-provider-ec2/tree/0.0.1) (2022-08-02) + +[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-ec2/compare/be877a20c5dc7b7ba839ca2c046c6407d1ed22b4...0.0.1) + +**Merged pull requests:** + +- \(DIO-3163\) Implement Cloud DNS for EC2 VMs [\#7](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/7) ([sbeaulie](https://github.com/sbeaulie)) +- \(DIO-3163\) Code improvements after initial testing in vmpooler [\#6](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/6) ([sbeaulie](https://github.com/sbeaulie)) +- Revert "Update net-ssh requirement from ~\> 6.2.0.rc2 to \>= 6.2, \< 7.1" [\#4](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/4) ([sbeaulie](https://github.com/sbeaulie)) +- Change the way we load secrets so that we do not have to pass them as… [\#3](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/3) ([sbeaulie](https://github.com/sbeaulie)) +- Update net-ssh requirement from ~\> 6.2.0.rc2 to \>= 6.2, \< 7.1 [\#2](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/2) ([dependabot[bot]](https://github.com/apps/dependabot)) +- Added aws dependency and renamed directories [\#1](https://github.com/puppetlabs/vmpooler-provider-ec2/pull/1) ([sbeaulie](https://github.com/sbeaulie)) + + + +\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* diff --git a/README.md b/README.md index 2909f3f..9d79a66 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,15 @@ # vmpooler-provider-aws +- [vmpooler-provider-aws](#vmpooler-provider-aws) + - [Usage](#usage) + - [Provisioning the new nodes](#provisioning-the-new-nodes) + - [DNS](#dns) + - [Labels](#labels) + - [Pre-requisite](#pre-requisite) + - [Update the Gemfile Lock](#update-the-gemfile-lock) + - [Releasing](#releasing) + - [License](#license) + This is a provider for [VMPooler](https://github.com/puppetlabs/vmpooler) allows using aws to create instances, disks, snapshots, or destroy instances for specific pools. @@ -55,6 +65,22 @@ do not have the pool label, and can be configured to allow a specific list of un - An IAM user must exist in the target AWS account with permissions to create, delete vms etc - if using DNS see section above, and a service account with permissions to change Cloud DNS need to exist +## Update the Gemfile Lock + +To update the `Gemfile.lock` run `./update-gemfile-lock`. + +Verify, and update if needed, that the docker tag in the script and GitHub action workflows matches what is used in the [vmpooler-deployment Dockerfile](https://github.com/puppetlabs/vmpooler-deployment/blob/main/docker/Dockerfile). + +## Releasing + +Follow these steps to publish a new GitHub release, and build and push the gem to . + +1. Bump the "VERSION" in `lib/vmpooler-provider-ec2/version.rb` appropriately based on changes in `CHANGELOG.md` since the last release. +2. Run `./update-gemfile-lock` to update `Gemfile.lock`. +3. Run `./update-changelog` to update `CHANGELOG.md`. +4. Commit and push changes to a new branch, then open a pull request against `main` and be sure to add the "maintenance" label. +5. After the pull request is approved and merged, then navigate to Actions --> Release Gem --> run workflow --> Branch: main --> Run workflow. + ## License vmpooler-provider-aws is distributed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html). See the [LICENSE](LICENSE) file for more details. \ No newline at end of file diff --git a/update-changelog b/update-changelog new file mode 100755 index 0000000..f3949d4 --- /dev/null +++ b/update-changelog @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +docker run -it --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \ + githubchangeloggenerator/github-changelog-generator:1.16.2 \ + github_changelog_generator --future-release $(grep VERSION lib/vmpooler-provider-ec2/version.rb |rev |cut -d "'" -f2 |rev) diff --git a/update-gemfile-lock b/update-gemfile-lock new file mode 100755 index 0000000..74e9c78 --- /dev/null +++ b/update-gemfile-lock @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# The container tag should closely match what is used in `docker/Dockerfile` in vmpooler-deployment +docker run -it --rm \ + -v $(pwd):/app \ + jruby:9.3.6-jdk \ + /bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends make git && cd /app && gem install bundler && bundle install --jobs 3 && bundle update; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'