Add release instructions and reference docker image

This commit is contained in:
Jake Spain 2023-03-20 14:58:31 -04:00
parent 68843c1ecf
commit 4ab4d511f7
No known key found for this signature in database
GPG key ID: BC1C4DA0A085E113
2 changed files with 45 additions and 20 deletions

View file

@ -1,14 +1,17 @@
# vmfloaty # vmfloaty
[![Gem Version](https://badge.fury.io/rb/vmfloaty.svg)](https://badge.fury.io/rb/vmfloaty) [![Gem Version](https://badge.fury.io/rb/vmfloaty.svg)](https://badge.fury.io/rb/vmfloaty)
[![CI](https://github.com/puppetlabs/vmfloaty/actions/workflows/ci.yml/badge.svg)](https://github.com/puppetlabs/vmfloaty/actions/workflows/ci.yml) [![Test](https://github.com/puppetlabs/vmfloaty/actions/workflows/test.yml/badge.svg)](https://github.com/puppetlabs/vmfloaty/actions/workflows/test.yml)
A CLI helper tool for [Puppet's VMPooler](https://github.com/puppetlabs/vmpooler) to help you stay afloat. A CLI helper tool for [Puppet's VMPooler](https://github.com/puppetlabs/vmpooler) to help you stay afloat.
![float image](float.jpg) ![float image](float.jpg)
- [Install](#install) - [vmfloaty](#vmfloaty)
- [Usage](#usage) - [Install](#install)
- [Ruby](#ruby)
- [Docker](#docker)
- [Usage](#usage)
- [Example workflow](#example-workflow) - [Example workflow](#example-workflow)
- [vmfloaty dotfile](#vmfloaty-dotfile) - [vmfloaty dotfile](#vmfloaty-dotfile)
- [Basic configuration](#basic-configuration) - [Basic configuration](#basic-configuration)
@ -16,22 +19,30 @@ A CLI helper tool for [Puppet's VMPooler](https://github.com/puppetlabs/vmpooler
- [Using backends besides VMPooler](#using-backends-besides-vmpooler) - [Using backends besides VMPooler](#using-backends-besides-vmpooler)
- [Valid config keys](#valid-config-keys) - [Valid config keys](#valid-config-keys)
- [Tab Completion](#tab-completion) - [Tab Completion](#tab-completion)
- [VMPooler API](#vmpooler-api) - [VMPooler API](#vmpooler-api)
- [Using the Pooler class](#using-the-pooler-class) - [Using the Pooler class](#using-the-pooler-class)
- [Example Projects](#example-projects) - [Example Projects](#example-projects)
- [Contributing](#contributing) - [Contributing](#contributing)
- [Code Reviews](#code-reviews) - [Code Reviews](#code-reviews)
- [Releasing](#releasing) - [Releasing](#releasing)
- [Special thanks](#special-thanks) - [Special thanks](#special-thanks)
## Install ## Install
### Ruby
Grab the latest from ruby gems... Grab the latest from ruby gems...
```bash ```bash
gem install vmfloaty gem install vmfloaty
``` ```
### Docker
Run the docker image:
`docker run -it --rm -v ~/.vmfloaty.yml:/home/floatyuser/.vmfloaty.yml ghcr.io/puppetlabs/vmfloaty --help`
## Usage ## Usage
```plain ```plain
@ -177,10 +188,12 @@ Please wait for multiple code owners to sign off on any notable change.
## Releasing ## Releasing
Releasing is a two step process: Follow these steps to publish a new GitHub release, build and push the gem to <https://rubygems.org>, and build and push a Docker Image to GitHub Container Registry:
1. Submit a release prep PR that updates `lib/vmfloaty/version.rb` to the desired new version and get that merged 1. Bump the "VERSION" in `lib/vmpooler/version.rb` appropriately based on changes in `CHANGELOG.md` since the last release.
2. Navigate to <https://github.com/puppetlabs/vmfloaty/actions/workflows/release.yml> --> Run workflow --> select "main" branch --> Run workflow. This will publish a GitHub release, build, and push the gem to RubyGems. 2. Run `./release-prep` to update `Gemfile.lock` if necessary and `CHANGELOG.md`.
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 <https://github.com/puppetlabs/vmfloaty/actions/workflows/release.yml> --> Run workflow --> select "main" branch --> Run workflow. This will publish a GitHub release, build and push the gem to RubyGems, and build and push a Docker Image to GitHub Container Registry.
## Special thanks ## Special thanks

12
release-prep Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
# bundle install
docker run -it --rm \
-v $(pwd):/app \
$(grep ^FROM ./Dockerfile |cut -d ' ' -f2) \
/bin/bash -c 'apt-get update -qq && apt-get install -y --no-install-recommends build-essential make openssh-client && cd /app && gem install bundler && bundle install --jobs 3; echo "LOCK_FILE_UPDATE_EXIT_CODE=$?"'
# Update Changelog
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/vmfloaty/version.rb |rev |cut -d "'" -f2 |rev)