github.com/noironetworks/cilium-net@v1.6.12/contrib/release/README.md (about) 1 Cilium Release Scripts 2 ====================== 3 4 ## relnotes - Release Notes generation 5 6 `GITHUB_TOKEN=xxx relnotes <git revision range>` 7 8 The `relnotes` script is derived from Kubernetes and scans for PRs which have 9 been merged in the specified git revision range and extracts all PRs which have 10 one of the following labels set: 11 12 * release-note/major 13 * release-note/minor 14 * release-note/bug 15 16 Every PR with one of the above mentioned labels set will be included in the 17 release notes. The release notes will be sorted according to category defined 18 by label. 19 20 See [Write Release Notes if Needed][1] for details on how to format the body of 21 a PR to specify the release note text. 22 23 ### System dependencies 24 25 * `lsb_release` tool (Fedora package: `redhat-lsb`) 26 27 ### Example 28 29 1. Generate a GitHub developer access token. (User Profile -> Settings -> 30 Developer Settings -> Personal access token -> Generate new token) 31 32 The access token requires access to `public_repo`. 33 34 2. Run the script to generate the NEWS.rst file: 35 36 `Usage: relnotes [OPTIONS] RELEASE-TAG RANGE` 37 38 `GITHUB_TOKEN=xxx ./relnotes --markdown-file=NEWS.rst v1.0.0-rc4 v1.0.0-rc3..` 39 40 In case the generated `NEWS.rst` file is not as expected, you can run 41 `relnotes` with the `--verbose` flag to see individual decision taken for 42 each PR. 43 44 ## uploadrev 45 46 The `uploadrev` script takes a git revision as the only argument and uploads 47 all relevant files to releases.cilium.io. For the script to work AWS 48 credentials are required. Please see the [AWS CLI documentation][2] for 49 configuration. 50 51 The below commands should work when run from a Cilium tree. Note that the 52 script will stash away any uncommitted staged changes and attempts to checkout 53 the revision. The files uploaded to the AWS bucket are in \_build/<revision>. 54 55 This includes the source code in zip and tar.gz format, binaries for Cilium 56 CLI, agent, health, bugtool, monitor and seperate sha256 files. Using 57 `v1.0.0-rc2` the following files would be uploaded: 58 59 cilium-agent-x86_64 60 cilium-agent-x86_64.sha256sum 61 cilium-bugtool-x86_64 62 cilium-bugtool-x86_64.sha256sum 63 cilium-health-x86_64 64 cilium-health-x86_64.sha256sum 65 cilium-health-responder-x86_64 66 cilium-health-responder-x86_64.sha256sum 67 cilium-node-monitor-x86_64 68 cilium-node-monitor-x86_64.sha256sum 69 cilium-x86_64 70 cilium-x86_64.sha256sum 71 v1.0.0-rc2.tar.gz 72 v1.0.0-rc2.tar.gz.sha256sum 73 v1.0.0-rc2.zip 74 v1.0.0-rc2.zip.sha256sum 75 76 If no arguments are supplied the usage is printed 77 78 ``` 79 $ ./contrib/release/uploadrev 80 Usage: ./contrib/release/uploadrev <tag> 81 Example: ./contrib/release/uploadrev v1.0.0-rc2 82 Environment: 83 ARCH=${ARCH:-"`uname -m`"} 84 DOMAIN=${DOMAIN:-"releases.cilium.io"} 85 REMOTE_DIR=${REMOTE_DIR:-"$VER"} 86 PREPEND=${PREPEND:-"cilium-$VER/"} 87 ZIP_FILE=${ZIP_FILE:-"$VER.zip"} 88 TARBALL=${TARBALL:-"$VER.tar.gz"} 89 DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 90 TARGET_DIR=${TARGET_DIR:-"$DIR/../../_build/`basename $REMOTE_DIR`"} 91 CILIUM_SOURCE=${CILIUM_SOURCE:-"$DIR/../../"} 92 SKIP_UPLOAD=${SKIP_UPLOAD:-0} 93 ``` 94 95 ### Uploading 96 97 98 Uploading a tag 99 100 $ ./contrib/release/uploadrev v1.0.0-rc2 101 102 Uploading a branch 103 104 $ ./contrib/release/uploadrev master 105 106 ### Staging 107 108 If you'd like todo a test upload to a private bucket before releasing, the 109 `DOMAIN` variable can be overriden. 110 111 $ DOMAIN=releases.example.io ./uploadrev v1.0.0-rc2 112 113 [1]: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#write-release-notes-if-needed 114 [2]: https://docs.aws.amazon.com/cli/latest/userguide/installing.html