github.com/google/cadvisor@v0.49.1/docs/development/releasing.md (about) 1 # cAdvisor Release Instructions 2 3 ## 1. Send Release PR 4 5 Example: https://github.com/google/cadvisor/pull/1281 6 7 Add release notes to [CHANGELOG.md](../../CHANGELOG.md) 8 9 - Tip: Use a github PR search to find changes since the last release 10 `is:pr is:merged merged:>2016-04-21` 11 12 ## 2. Create the release tag 13 14 ### 2.a Create the release branch (only for major/minor releases) 15 16 Skip this step for patch releases. 17 18 ``` 19 # Example version 20 VERSION=v0.23 21 PATCH_VERSION=$VERSION.0 22 # Sync to HEAD, or the commit to branch at 23 git fetch upstream && git checkout upstream/master 24 # Create the branch 25 git branch release-$VERSION 26 # Push it to upstream 27 git push git@github.com:google/cadvisor.git release-$VERSION 28 ``` 29 30 ### 2.b Tag the release (for all releases) 31 32 ``` 33 # Example patch version 34 VERSION=v0.23 35 PATCH_VERSION=$VERSION.0 36 # Checkout the release branch 37 git fetch upstream && git checkout upstream/release-$VERSION 38 # Tag the release commit. If you aren't signing, ommit the -s 39 git tag -s -a $PATCH_VERSION 40 # Push it to upstream 41 git push git@github.com:google/cadvisor.git $PATCH_VERSION 42 ``` 43 44 ## 3. Build release artifacts 45 46 Command: `make release` 47 48 - Make sure your git client is synced to the release cut point 49 - Use the same go version as kubernetes: [dependencies.yaml](https://github.com/kubernetes/kubernetes/blob/master/build/dependencies.yaml#L101) 50 - Tip: use https://github.com/moovweb/gvm to manage multiple go versions. 51 - Try to build it from the release branch, since we include that in the binary version 52 - Verify the ldflags output, in particular check the Version, BuildUser, and GoVersion are expected 53 54 Once the build is complete, copy the output after `Release info...` and save it to use in step 5 55 56 Example: 57 58 ``` 59 Multi Arch Container: 60 gcr.io/cadvisor/cadvisor:v0.44.1-test-8 61 62 Architecture Specific Containers: 63 gcr.io/cadvisor/cadvisor-arm:v0.44.1-test-8 64 gcr.io/cadvisor/cadvisor-arm64:v0.44.1-test-8 65 gcr.io/cadvisor/cadvisor-amd64:v0.44.1-test-8 66 67 Binaries: 68 SHA256 (cadvisor-v0.44.1-test-8-linux-arm64) = e5e3f9e72208bc6a5ef8b837473f6c12877ace946e6f180bce8d81edadf66767 69 SHA256 (cadvisor-v0.44.1-test-8-linux-arm) = 7d714e495a4f50d9cc374bd5e6b5c6922ffa40ff1cc7244f2308f7d351c4ccea 70 SHA256 (cadvisor-v0.44.1-test-8-linux-amd64) = ea95c5a6db8eecb47379715c0ca260a8a8d1522971fd3736f80006c7f6cc9466 71 ``` 72 73 ## 4. Check that the Containers for the release work 74 75 The only argument to the script is the tag of the Multi Arch Container from step 76 3. To verify that the container images for the release were built successfully, 77 use the check_container.sh script. The script will start each cadvisor image and 78 curl the `/healthz` endpoint to confirm that it is working. 79 80 Running this script requires that you have installed `qemu-user-static` and 81 configured qemu as a binary interpreter. 82 83 ``` 84 $ sudo apt install qemu-user-static 85 $ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes 86 ``` 87 88 The only argument to the script is the tag of the Multi Arch Container from step 89 3. 90 91 ```sh 92 build/check_container.sh gcr.io/tstapler-gke-dev/cadvisor:v0.44.1-test-8 93 ``` 94 95 ## 5. Cut the release 96 97 Go to https://github.com/google/cadvisor/releases and click "Draft a new 98 release" 99 100 - "Tag version" and "Release title" should be preceded by 'v' and then the 101 version. Select the tag pushed in step 2.b 102 - Copy an old release as a template (e.g. 103 github.com/google/cadvisor/releases/tag/v0.23.1) 104 - Body should start with release notes (from CHANGELOG.md) 105 - Next are the docker images and binary hashes you copied (from step 3). 106 - Upload the binaries build in step 3, they are located in the `_output` 107 directory. 108 - If this is a minor version release, mark the release as a "pre-release" 109 - Click publish when done