/ansible-operator-plugins

Experimental extraction/refactoring of the Operator SDK's ansible operator plugin

Primary LanguageGoApache License 2.0Apache-2.0

ansible-operator-plugins

Experimental extraction/refactoring of the Operator SDK's ansible operator plugin

Releasing Guide

Pre-Requisites

  • Push access to this repository
  • Forked repository and local clone of fork
  • Remote ref named upstream that points to this repository

Release Prep (Applies to all releases)

Since this project is currently consumed as a library there are some manual steps that need to take place prior to creating a release. They are as follows:

  1. Checkout the main branch:
git checkout main
  1. Ensure the main branch is up to date:
git fetch upstream && git pull upstream main
  1. Checkout a new branch for release prep work:
git checkout -b release/prep-vX.Y.Z
  1. Update the ImageVersion variable in internal/version/version.go to be the version you are prepping for release
  2. Update the line with export IMAGE_VERSION in Makefile to be the version you are prepping for release
  3. Regenerate the testdata:
make generate
  1. Commit and push your changes to your fork
  2. Create a PR against the main branch

Creating Major/Minor Releases

  1. Ensure the steps in Release Prep have been completed. Do NOT progress past this point until the release prep PR has merged.
  2. Checkout the main branch:
git checkout main
  1. Ensure your local branch is up to date:
git fetch upstream && git pull upstream main
  1. Checkout a new branch for the new release following the pattern release-vX.Y. In this example we will create a branch for a v0.2.0 release:
git checkout -b release-v0.2
  1. Push the newly created release branch:
git push -u upstream release-v0.2
  1. Create a new release tag:
git tag -a -s -m "ansible-operator-plugins release v0.2.0" v0.2.0
  1. Push the new tag:
git push upstream v0.2.0

Creating Patch Releases

  1. Ensure the steps in Release Prep have been completed. Do NOT progress past this point until the release prep PR has merged.
  2. Cherry pick the merged release prep PR to the proper major/minor branch by commenting the following on the PR:
/cherry-pick release-vX.Y

where X is the major version and Y is the minor version. An example of cherry picking for a v0.2.1 release would be:

/cherry-pick release-v0.2
  1. A bot will have created the cherry pick PR. Merge this. Do NOT progress past this point until the cherry pick PR has merged.
  2. Checkout the appropriate release branch. In this example we will be "creating" a v0.2.1 release:
git checkout release-v0.2
  1. Ensure it is up to date:
git fetch upstream && git pull upstream release-v0.2
  1. Create a new release tag:
git tag -a -s -m "ansible-operator-plugins release v0.2.1" v0.2.1
  1. Push the new tag:
git push upstream v0.2.1

Note

While the release process is automated once the tag is pushed it can occasionally timeout. If this happens, re-running the action will re-run the release process and typically succeed.