- Detailed result contents
- Configuration Options
- Custom Registries & Airgap Testing
- Using Private Images
- Advanced Customization
Preparing release version
- Update the
versiondefined in the code to the new version number. As of the time of writing, the version is defined in
Is there a Kubernetes release since the last Sonobuoy release? If so, apply the following steps:
Ensure the upstream conformance script is working appropriately:
- Update the
kind-config.yamlfile with the new image version here.
- Run conformance tests
Setup e2e image registry for new version
We have opened an ongoing issue upstream to make this more elegant. Until then, ensuring the registry list did not grow from previous release is somewhat manual.
The important file to keep an eye on is
test/utils/image/manifest.go in kubernetes/kubernetes, ensuring the
RegistryList struct has not changed since previous release.
If you have a local copy of kubernetes/kubernetes repository, here’s a quick way to achieve the above:
- Ensure that you have kubernetes/kubernetes in one of your remotes (i.e.
git remote -vand make sure you have more than just your fork)
- Ensure you have the recent tags pulled in (i.e.
git fetch --allor equivalent)
git diff OLD_TAG NEW_TAG -- test/utils/image/manifest.go
In the event that there are modifications to
RegistryList, new fields need to be added to
our copy of
pkg/image/manifest.go while removed fields need to stay for backwards compatibility reasons (e.g. newer version of Sonobuoy running on an older version of Kubernetes).
Updating the versioned docs
Explicit doc changes (if any) should be made to the appropriate files in directory
Next, generate a set of versioned docs for v0.x.y. For instance, the new docs be generated by running the command:
This will copy the current
master docs into the version given and update
a few of the links in the README to be correct. It will also update
the website config to add the new version and consider it the newest
version of the docs.
- Commit previous changes and open a new PR
- Ensure your commits signed
- Follow PR build progress in circleci.com
- Once all checks passes, merge accordingly
This step will tag the code and triggers a release.
From your local branch, create an annotated
tagfor the commit that was merged:
git tag -a v0.x.y -m "Release v0.x.y"
NOTE: Tag the new tip of
master, not the branch you just merged.
To ensure that the tag is pushed to the correct repository, check which remote corresponds to that repository using the following command:
git remote -v
The output of this command should include at least two configured remotes, typically
origin, which refers to your personal fork, and
upstreamwhich refers to the upstream Sonobuoy repository. For example:
origin firstname.lastname@example.org:<username>/sonobuoy.git (fetch) origin email@example.com:<username>/sonobuoy.git (push) upstream https://github.com/vmware-tanzu/sonobuoy (fetch) upstream https://github.com/vmware-tanzu/sonobuoy (push)
For the following steps, use the remote configured for the
vmware-tanzu/sonobuoyrepository. The following instructions will use
Push the tag with the following command.
NOTE: This will push all tags.
git push upstream --tags
To push just one tag, use the following command format (replacing
v0.x.ywith the tag created in the previous step):
git push upstream refs/tags/v0.x.y
If there is a problem and you need to remove the tag, run the following commands:
git tag -d v0.x.y git push upstream :refs/tags/v0.x.y
:preceding the tag ref is necessary to delete the tag from the remote repository. Git refspecs have the format
<+><src>:<dst>. By pushing an empty
srcto the remote
dst, it makes the destination ref empty, effectively deleting it. For more details, see the
git pushdocumentation or this concise explanation on Stack Overflow.
Open a browser tab and go to: https://circleci.com/gh/vmware-tanzu/sonobuoy and verify go releaser for tag v0.x.y completes successfully.
Upon successful completion of build job above, check the releases tab of Sonobuoy and verify the artifacts and changelog were published correctly.
Run the following command to make sure the image was pushed correctly to Docker Hub:
docker run -it sonobuoy/sonobuoy:v0.x.y /sonobuoy version
Sonobuoy Versionin the output should match the release tag above.
Go to the GitHub release page and download the release binaries and make sure the version matches the expected values.
Run a Kind cluster locally and ensure that you can run
sonobuoy run --mode quick. If this release corresponds to a new Kubernetes release as well, ensure:
you’re using the correct Kubernetes context by checking the output from:
kubectl config current-context
and verifying that it is set to the context for the Kind cluster just created (
you’re testing with the new Kind images by checking the output from:
kubectl version --short
and verifying that the server version matches the intended Kubernetes version.
you can run
sonobuoy imagesand get a list of test images as expected
Update the release notes if desired on GitHub by editing the newly created release.
- Before releasing, ensure all parties are available to resolve any issues that come up. If not, just bump the release.
- If you are building a Windows release you must currently build/push the Windows image outside of CI and push the manifest to also include it. To do this you must:
- Have built the Windows binaries (can be done on a Linux box and should be the default now)
- Have a Windows machine available for the build. The steps below will assume a
docker contextwhich is a Windows machine.
- (Recommended) Build the sample Windows plugin (in our examples directory) to test the image
- (Recommended) Have a cluster with Windows available for testing
docker context use default make build/windows/amd64/sonobuoy.exe docker context use 2019-box make windows_containers PUSH_WINDOWS=true make push