|
1 | 1 | # ansible-operator-plugins
|
2 | 2 | Experimental extraction/refactoring of the Operator SDK's ansible operator plugin
|
| 3 | + |
| 4 | + |
| 5 | +# Releasing Guide |
| 6 | + |
| 7 | +## Pre-Requisites |
| 8 | +- Push access to this repository |
| 9 | +- Forked repository and local clone of fork |
| 10 | +- Remote ref named `upstream` that points to this repository |
| 11 | + |
| 12 | +## Release Prep (Applies to all releases) |
| 13 | +Since this project is currently consumed as a library there are some manual steps that need to take |
| 14 | +place prior to creating a release. They are as follows: |
| 15 | +1. Checkout the `main` branch: |
| 16 | +```sh |
| 17 | +git checkout main |
| 18 | +``` |
| 19 | +2. Ensure the `main` branch is up to date: |
| 20 | +```sh |
| 21 | +git fetch upstream && git pull upstream main |
| 22 | +``` |
| 23 | +3. Checkout a new branch for release prep work: |
| 24 | +```sh |
| 25 | +git checkout -b release/prep-vX.Y.Z |
| 26 | +``` |
| 27 | +4. Update the `ImageVersion` variable in `internal/version/version.go` to be the version you are prepping for release |
| 28 | +5. Update the line with `export IMAGE_VERSION` in `Makefile` to be the version you are prepping for release |
| 29 | +6. Regenerate the testdata: |
| 30 | +```sh |
| 31 | +make generate |
| 32 | +``` |
| 33 | +7. Commit and push your changes to your fork |
| 34 | +8. Create a PR against the `main` branch |
| 35 | + |
| 36 | +## Creating Major/Minor Releases |
| 37 | +1. Ensure the steps in [Release Prep](#release-prep-applies-to-all-releases) have been completed. Do **NOT** progress past this point until the release prep PR has merged. |
| 38 | +2. Checkout the `main` branch: |
| 39 | +```sh |
| 40 | +git checkout main |
| 41 | +``` |
| 42 | +3. Ensure your local branch is up to date: |
| 43 | +```sh |
| 44 | +git fetch upstream && git pull upstream main |
| 45 | +``` |
| 46 | +4. 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: |
| 47 | +```sh |
| 48 | +git checkout -b release-v0.2 |
| 49 | +``` |
| 50 | +5. Push the newly created release branch: |
| 51 | +```sh |
| 52 | +git push -u upstream release-v0.2 |
| 53 | +``` |
| 54 | +6. Create a new release tag: |
| 55 | +```sh |
| 56 | +git tag -a -s -m "ansible-operator-plugins release v0.2.0" v0.2.0 |
| 57 | +``` |
| 58 | +7. Push the new tag: |
| 59 | +```sh |
| 60 | +git push upstream v0.2.0 |
| 61 | +``` |
| 62 | + |
| 63 | +## Creating Patch Releases |
| 64 | +1. Ensure the steps in [Release Prep](#release-prep-applies-to-all-releases) have been completed. Do **NOT** progress past this point until the release prep PR has merged. |
| 65 | +2. Cherry pick the merged release prep PR to the proper major/minor branch by commenting the following on the PR: |
| 66 | +``` |
| 67 | +/cherry-pick release-vX.Y |
| 68 | +``` |
| 69 | +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: |
| 70 | +``` |
| 71 | +/cherry-pick release-v0.2 |
| 72 | +``` |
| 73 | +3. A bot will have created the cherry pick PR. Merge this. Do **NOT** progress past this point until the cherry pick PR has merged. |
| 74 | +4. Checkout the appropriate release branch. In this example we will be "creating" a `v0.2.1` release: |
| 75 | +```sh |
| 76 | +git checkout release-v0.2 |
| 77 | +``` |
| 78 | +5. Ensure it is up to date: |
| 79 | +```sh |
| 80 | +git fetch upstream && git pull upstream release-v0.2 |
| 81 | +``` |
| 82 | +6. Create a new release tag: |
| 83 | +```sh |
| 84 | +git tag -a -s -m "ansible-operator-plugins release v0.2.1" v0.2.1 |
| 85 | +``` |
| 86 | +7. Push the new tag: |
| 87 | +```sh |
| 88 | +git push upstream v0.2.1 |
| 89 | +``` |
| 90 | + |
| 91 | +> [!NOTE] |
| 92 | +> While the release process is automated once the tag is pushed it can occasionally timeout. |
| 93 | +> If this happens, re-running the action will re-run the release process and typically succeed. |
0 commit comments