mirror of
https://github.com/puppetlabs/vmpooler-provider-vsphere.git
synced 2026-01-25 19:08:41 -05:00
Add changelog generation and release instructions
This commit is contained in:
parent
c7d24001c5
commit
e87b425573
5 changed files with 109 additions and 6 deletions
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
|
|
@ -7,27 +7,64 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.repository == 'puppetlabs/vmpooler-provider-vsphere'
|
if: github.repository == 'puppetlabs/vmpooler-provider-vsphere'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: gv
|
id: gv
|
||||||
run: |
|
run: |
|
||||||
ver=$(grep VERSION lib/vmpooler-provider-vsphere/version.rb |rev |cut -d "'" -f2 |rev)
|
version=$(grep VERSION lib/vmpooler-provider-vsphere/version.rb |rev |cut -d "'" -f2 |rev)
|
||||||
echo "ver=$ver" >> $GITHUB_OUTPUT
|
echo "version=$version" >> $GITHUB_OUTPUT
|
||||||
echo "Found version $ver from lib/vmpooler-provider-vsphere/version.rb"
|
echo "Found version $version from lib/vmpooler-provider-vsphere/version.rb"
|
||||||
|
|
||||||
|
- name: Generate Changelog
|
||||||
|
uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
|
||||||
|
with:
|
||||||
|
args: >-
|
||||||
|
--future-release ${{ steps.nv.outputs.version }}
|
||||||
|
env:
|
||||||
|
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Validate Changelog
|
||||||
|
run : |
|
||||||
|
set -e
|
||||||
|
if [[ -n $(git status --porcelain) ]]; then
|
||||||
|
echo "Here is the current git status:"
|
||||||
|
git status
|
||||||
|
echo
|
||||||
|
echo "The following changes were detected:"
|
||||||
|
git --no-pager diff
|
||||||
|
echo "Uncommitted PRs found in the changelog. Please submit a release prep PR of changes after running '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 ${{ steps.nv.outputs.version }}'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Generate Release Notes
|
||||||
|
uses: docker://githubchangeloggenerator/github-changelog-generator:1.16.2
|
||||||
|
with:
|
||||||
|
args: >-
|
||||||
|
--since-tag ${{ steps.cv.outputs.result }}
|
||||||
|
--future-release ${{ steps.nv.outputs.version }}
|
||||||
|
--output release-notes.md
|
||||||
|
env:
|
||||||
|
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Tag Release
|
- name: Tag Release
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
tag: ${{ steps.gv.outputs.ver }}
|
tag: ${{ steps.nv.outputs.version }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
bodyfile: release-notes.md
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
generateReleaseNotes: true
|
|
||||||
|
# This step should closely match what is used in `docker/Dockerfile` in vmpooler-deployment
|
||||||
- name: Install Ruby jruby-9.3.6.0
|
- name: Install Ruby jruby-9.3.6.0
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 'jruby-9.3.6.0'
|
ruby-version: 'jruby-9.3.6.0'
|
||||||
|
|
||||||
- name: Build gem
|
- name: Build gem
|
||||||
run: gem build *.gemspec
|
run: gem build *.gemspec
|
||||||
|
|
||||||
- name: Publish gem
|
- name: Publish gem
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $HOME/.gem
|
mkdir -p $HOME/.gem
|
||||||
|
|
|
||||||
3
.github_changelog_generator
Normal file
3
.github_changelog_generator
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
project=vmpooler-provider-vsphere
|
||||||
|
user=puppetlabs
|
||||||
|
exclude_labels=maintenance
|
||||||
48
CHANGELOG.md
Normal file
48
CHANGELOG.md
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [Unreleased](https://github.com/puppetlabs/vmpooler-provider-vsphere/tree/HEAD)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-vsphere/compare/1.6.0...HEAD)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- \(RE-15111\) Migrate Snyk to Mend Scanning [\#22](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/22) ([yachub](https://github.com/yachub))
|
||||||
|
- \(RE-14811\) Remove DIO as codeowners [\#21](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/21) ([yachub](https://github.com/yachub))
|
||||||
|
- Add Snyk action [\#20](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/20) ([yachub](https://github.com/yachub))
|
||||||
|
- Add release-engineering to codeowners [\#19](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/19) ([yachub](https://github.com/yachub))
|
||||||
|
- Update rubocop requirement from ~\> 1.1.0 to ~\> 1.28.2 [\#17](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/17) ([dependabot[bot]](https://github.com/apps/dependabot))
|
||||||
|
|
||||||
|
## [1.6.0](https://github.com/puppetlabs/vmpooler-provider-vsphere/tree/1.6.0) (2022-07-25)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-vsphere/compare/1.5.0...1.6.0)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- pin to vmpooler 2.4 [\#18](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/18) ([sbeaulie](https://github.com/sbeaulie))
|
||||||
|
|
||||||
|
## [1.5.0](https://github.com/puppetlabs/vmpooler-provider-vsphere/tree/1.5.0) (2021-12-13)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-vsphere/compare/1.4.0...1.5.0)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Bump version to 1.5.0, require vmpooler \>= 2.1 [\#5](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/5) ([genebean](https://github.com/genebean))
|
||||||
|
- Move vsphere specific methods out of vmpooler [\#4](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/4) ([sbeaulie](https://github.com/sbeaulie))
|
||||||
|
|
||||||
|
## [1.4.0](https://github.com/puppetlabs/vmpooler-provider-vsphere/tree/1.4.0) (2021-12-08)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-vsphere/compare/1.3.0...1.4.0)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Prep for initial standalone release: v1.4.0 [\#3](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/3) ([genebean](https://github.com/genebean))
|
||||||
|
- Add GH Action for releasing gems [\#2](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/2) ([genebean](https://github.com/genebean))
|
||||||
|
- Fix naming, add docs, add missing test file [\#1](https://github.com/puppetlabs/vmpooler-provider-vsphere/pull/1) ([genebean](https://github.com/genebean))
|
||||||
|
|
||||||
|
## [1.3.0](https://github.com/puppetlabs/vmpooler-provider-vsphere/tree/1.3.0) (2021-11-29)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/puppetlabs/vmpooler-provider-vsphere/compare/a08cba099f867b1db01a50940ec3ae9239245db5...1.3.0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
|
||||||
10
README.md
10
README.md
|
|
@ -3,6 +3,7 @@
|
||||||
- [vmpooler-provider-vsphere](#vmpooler-provider-vsphere)
|
- [vmpooler-provider-vsphere](#vmpooler-provider-vsphere)
|
||||||
- [Usage](#usage)
|
- [Usage](#usage)
|
||||||
- [Custom VM Config Attribute](#custom-vm-config-attribute)
|
- [Custom VM Config Attribute](#custom-vm-config-attribute)
|
||||||
|
- [Releasing](#releasing)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
This is a provider for [VMPooler](https://github.com/puppetlabs/vmpooler) allows using vSphere as a source of machines. This provider was originally part of the main VMPooler code base but was extracted to be a standalone gem so that development could be done independently of VMPooler itself.
|
This is a provider for [VMPooler](https://github.com/puppetlabs/vmpooler) allows using vSphere as a source of machines. This provider was originally part of the main VMPooler code base but was extracted to be a standalone gem so that development could be done independently of VMPooler itself.
|
||||||
|
|
@ -22,6 +23,15 @@ Linux or Windows Guest: `vmtoolsd --cmd "info-get guestinfo.hostname"`
|
||||||
|
|
||||||
See the [VMware Tools Administration docs](https://docs.vmware.com/en/VMware-Tools/12.1.0/com.vmware.vsphere.vmwaretools.doc/GUID-D026777B-606D-4442-957A-B953C2049659.html) for more information about querying information from the GuestInfo variable.
|
See the [VMware Tools Administration docs](https://docs.vmware.com/en/VMware-Tools/12.1.0/com.vmware.vsphere.vmwaretools.doc/GUID-D026777B-606D-4442-957A-B953C2049659.html) for more information about querying information from the GuestInfo variable.
|
||||||
|
|
||||||
|
## Releasing
|
||||||
|
|
||||||
|
Follow these steps to publish a new GitHub release, and build and push the gem to <https://rubygems.org>.
|
||||||
|
|
||||||
|
1. Run `./update-changelog` to update `CHANGELOG.md`.
|
||||||
|
2. Bump the "VERSION" in `lib/vmpooler-provider-vsphere/version.rb` appropriately based on changes in `CHANGELOG.md` since the last release.
|
||||||
|
3. Commit and push changes to a new branch, then open a pull request against `main` and be sure to add the "maintenance" label.
|
||||||
|
4. After the pull request is approved and merged, then navigate to Actions --> Release Gem --> run workflow --> Branch: main --> Run workflow.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
vmpooler-provider-vsphere 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.
|
vmpooler-provider-vsphere 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.
|
||||||
|
|
|
||||||
5
update-changelog
Executable file
5
update-changelog
Executable file
|
|
@ -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-vsphere/version.rb |rev |cut -d "'" -f2 |rev)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue