Skip to content

Commit 938bef4

Browse files
committed
Add release instructions and reference docker image
1 parent d8bb72e commit 938bef4

File tree

2 files changed

+45
-20
lines changed

2 files changed

+45
-20
lines changed

README.md

+33-20
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,48 @@
11
# vmfloaty
22

33
[![Gem Version](https://badge.fury.io/rb/vmfloaty.svg)](https://badge.fury.io/rb/vmfloaty)
4-
[![CI](https://github.com/puppetlabs/vmfloaty/actions/workflows/ci.yml/badge.svg)](https://github.com/puppetlabs/vmfloaty/actions/workflows/ci.yml)
4+
[![Test](https://github.com/puppetlabs/vmfloaty/actions/workflows/test.yml/badge.svg)](https://github.com/puppetlabs/vmfloaty/actions/workflows/test.yml)
55

66
A CLI helper tool for [Puppet's VMPooler](https://github.com/puppetlabs/vmpooler) to help you stay afloat.
77

88
![float image](float.jpg)
99

10-
- [Install](#install)
11-
- [Usage](#usage)
12-
- [Example workflow](#example-workflow)
13-
- [vmfloaty dotfile](#vmfloaty-dotfile)
14-
- [Basic configuration](#basic-configuration)
15-
- [Using multiple services](#using-multiple-services)
16-
- [Using backends besides VMPooler](#using-backends-besides-vmpooler)
17-
- [Valid config keys](#valid-config-keys)
18-
- [Tab Completion](#tab-completion)
19-
- [VMPooler API](#vmpooler-api)
20-
- [Using the Pooler class](#using-the-pooler-class)
21-
- [Example Projects](#example-projects)
22-
- [Contributing](#contributing)
23-
- [Code Reviews](#code-reviews)
24-
- [Releasing](#releasing)
25-
- [Special thanks](#special-thanks)
10+
- [vmfloaty](#vmfloaty)
11+
- [Install](#install)
12+
- [Ruby](#ruby)
13+
- [Docker](#docker)
14+
- [Usage](#usage)
15+
- [Example workflow](#example-workflow)
16+
- [vmfloaty dotfile](#vmfloaty-dotfile)
17+
- [Basic configuration](#basic-configuration)
18+
- [Using multiple services](#using-multiple-services)
19+
- [Using backends besides VMPooler](#using-backends-besides-vmpooler)
20+
- [Valid config keys](#valid-config-keys)
21+
- [Tab Completion](#tab-completion)
22+
- [VMPooler API](#vmpooler-api)
23+
- [Using the Pooler class](#using-the-pooler-class)
24+
- [Example Projects](#example-projects)
25+
- [Contributing](#contributing)
26+
- [Code Reviews](#code-reviews)
27+
- [Releasing](#releasing)
28+
- [Special thanks](#special-thanks)
2629

2730
## Install
2831

32+
### Ruby
33+
2934
Grab the latest from ruby gems...
3035

3136
```bash
3237
gem install vmfloaty
3338
```
3439

40+
### Docker
41+
42+
Run the docker image:
43+
44+
`docker run -it --rm -v ~/.vmfloaty.yml:/home/floatyuser/.vmfloaty.yml ghcr.io/puppetlabs/vmfloaty --help`
45+
3546
## Usage
3647

3748
```plain
@@ -177,10 +188,12 @@ Please wait for multiple code owners to sign off on any notable change.
177188

178189
## Releasing
179190

180-
Releasing is a two step process:
191+
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:
181192

182-
1. Submit a release prep PR that updates `lib/vmfloaty/version.rb` to the desired new version and get that merged
183-
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.
193+
1. Bump the "VERSION" in `lib/vmpooler/version.rb` appropriately based on changes in `CHANGELOG.md` since the last release.
194+
2. Run `./release-prep` to update `Gemfile.lock` if necessary and `CHANGELOG.md`.
195+
3. Commit and push changes to a new branch, then open a pull request against `main` and be sure to add the "maintenance" label.
196+
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.
184197

185198
## Special thanks
186199

release-prep

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
# bundle install
4+
docker run -it --rm \
5+
-v $(pwd):/app \
6+
$(grep ^FROM ./Dockerfile |cut -d ' ' -f2) \
7+
/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=$?"'
8+
9+
# Update Changelog
10+
docker run -it --rm -e CHANGELOG_GITHUB_TOKEN -v $(pwd):/usr/local/src/your-app \
11+
githubchangeloggenerator/github-changelog-generator:1.16.2 \
12+
github_changelog_generator --future-release $(grep VERSION lib/vmfloaty/version.rb |rev |cut -d "'" -f2 |rev)

0 commit comments

Comments
 (0)