mirror of
https://github.com/puppetlabs/vmpooler-provider-vsphere.git
synced 2026-01-26 03:18:41 -05:00
Merge pull request #24 from puppetlabs/fix_workflow_deprecations
Fix workflow deprecations, changelog, and add docs
This commit is contained in:
commit
9f9d8c3486
5 changed files with 124 additions and 5 deletions
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: Release
|
||||
name: Release Gem
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
|
|
@ -7,25 +7,64 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'puppetlabs/vmpooler-provider-vsphere'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Get Version
|
||||
id: gv
|
||||
run: |
|
||||
echo "::set-output name=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 "version=$version" >> $GITHUB_OUTPUT
|
||||
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
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: ${{ steps.gv.outputs.ver }}
|
||||
tag: ${{ steps.nv.outputs.version }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
bodyfile: release-notes.md
|
||||
draft: 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
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: 'jruby-9.3.6.0'
|
||||
|
||||
- name: Build gem
|
||||
run: gem build *.gemspec
|
||||
|
||||
- name: Publish gem
|
||||
run: |
|
||||
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)*
|
||||
24
README.md
24
README.md
|
|
@ -1,5 +1,11 @@
|
|||
# vmpooler-provider-vsphere
|
||||
|
||||
- [vmpooler-provider-vsphere](#vmpooler-provider-vsphere)
|
||||
- [Usage](#usage)
|
||||
- [Custom VM Config Attribute](#custom-vm-config-attribute)
|
||||
- [Releasing](#releasing)
|
||||
- [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.
|
||||
|
||||
## Usage
|
||||
|
|
@ -8,6 +14,24 @@ Include this gem in the same Gemfile that you use to install VMPooler itself and
|
|||
|
||||
Examples of deploying VMPooler with this provider can be found in the [puppetlabs/vmpooler-deployment](https://github.com/puppetlabs/vmpooler-deployment) repository.
|
||||
|
||||
### Custom VM Config Attribute
|
||||
|
||||
This provider sets a custom attribute on the VM called `guestinfo.hostname` to the name of the generated VM, which can be queried from inside the guest OS if VMware Tools is isntalled. For example:
|
||||
|
||||
macOS: `"/Library/Application Support/VMware Tools/vmware-tools-daemon" --cmd "info-get guestinfo.hostname"`
|
||||
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.
|
||||
|
||||
## 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
|
||||
|
||||
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