Skip to content

Commit 7ee7ca5

Browse files
Change the release process to use GitHub Release Notes
Signed-off-by: Meghana Jangi <[email protected]> Co-authored-by: sedefsavas <[email protected]>
1 parent b0a3de8 commit 7ee7ca5

File tree

9 files changed

+62
-658
lines changed

9 files changed

+62
-658
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,3 @@ Fixes #
3434
- [ ] includes documentation
3535
- [ ] adds unit tests
3636
- [ ] adds or updates e2e tests
37-
38-
**Release note**:
39-
<!-- Write your release note:
40-
1. Enter your extended release note in the below block.
41-
2. If the PR requires additional action from users switching to the new release, include the string "action required".
42-
2. If no release note is required, just write "NONE"....however we encourage contributors to never use this as release notes are incredible useful.
43-
-->
44-
```release-note
45-
46-
```

.github/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
changelog:
2+
categories:
3+
- title: ⚠ API Changes
4+
labels:
5+
- kind/api-change
6+
- title: 🚀 Features
7+
labels:
8+
- kind/feature
9+
- title: 🐛 Bug Fixes
10+
labels:
11+
- kind/bug
12+
- kind/regression
13+
- title: 📖 Documentation
14+
labels:
15+
- kind/documentation
16+
- title: Dependencies
17+
labels:
18+
- area/dependency
19+
- title: 🌱 Others
20+
labels:
21+
- "*"

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,9 @@ release-manifests: ## Release manifest files
527527
cp metadata.yaml $(RELEASE_DIR)/metadata.yaml
528528

529529
.PHONY: release-changelog
530-
release-changelog: $(RELEASE_NOTES) check-release-tag check-previous-release-tag check-github-token $(RELEASE_DIR) ## Builds the changelog for a release
531-
$(RELEASE_NOTES) --debug --org $(GH_ORG_NAME) --repo $(GH_REPO_NAME) --start-sha $(shell git rev-list -n 1 ${PREVIOUS_VERSION}) --end-sha $(shell git rev-list -n 1 ${RELEASE_TAG}) --output $(RELEASE_DIR)/CHANGELOG.md --go-template go-template:$(REPO_ROOT)/hack/changelog.tpl --dependencies=false --branch=$(BRANCH)
532-
530+
release-changelog: $(GH) ## Generates release notes using Github release notes.
531+
./hack/releasechangelog.sh -v $(VERSION) -pv $(PREVIOUS_VERSION) -gh $(GH) -ghorg $(GH_ORG_NAME) -ghrepo $(GH_REPO_NAME) -cimg $(CORE_CONTROLLER_IMG) > $(RELEASE_DIR)/CHANGELOG.md
532+
533533
.PHONY: release-binaries
534534
release-binaries: ## Builds the binaries to publish with a release
535535
RELEASE_BINARY=./cmd/clusterawsadm GOOS=linux GOARCH=amd64 $(MAKE) release-binary

hack/changelog.tpl

Lines changed: 0 additions & 26 deletions
This file was deleted.

hack/releasechangelog.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
# Copyright 2022 The Kubernetes Authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
set -o errexit
17+
set -o nounset
18+
set -o pipefail
19+
20+
while getopts v:pv:gh:ghorg:ghrepo:cimg: flag
21+
do
22+
case "${flag}" in
23+
v) VERSION=${OPTARG};;
24+
pv) PREVIOUS_VERSION=${OPTARG};;
25+
gh) GH=${OPTARG};;
26+
ghorg) GH_ORG_NAME=${OPTARG};;
27+
ghrepo) GH_REPO_NAME=${OPTARG};;
28+
cimg) CORE_CONTROLLER_IMG=${OPTARG};;
29+
esac
30+
done
31+
32+
echo "# Release notes for Cluster API Provider AWS (CAPA) $VERSION"
33+
echo "[Documentation](https://cluster-api-aws.sigs.k8s.io/)"
34+
echo "# Changelog since $PREVIOUS_VERSION"
35+
$GH api repos/$GH_ORG_NAME/$GH_REPO_NAME/releases/generate-notes -F tag_name=$VERSION --jq '.body'
36+
echo "**The image for this release is**: $CORE_CONTROLLER_IMG:$VERSION"
37+
echo "Thanks to all our contributors!"
38+

hack/tools/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,6 @@ MOCKGEN := $(BIN_DIR)/mockgen
152152
$(MOCKGEN): $(BIN_DIR) go.mod go.sum # Build mockgen from tools folder.
153153
go build -tags=tools -o $@ github.com/golang/mock/mockgen
154154

155-
RELEASE_NOTES := $(BIN_DIR)/release-notes
156-
$(RELEASE_NOTES): $(BIN_DIR) go.mod go.sum
157-
go build -tags tools -o $@ k8s.io/release/cmd/release-notes
158-
159155
PLANTUML := $(BIN_DIR)/plantuml-sentinal
160156
$(PLANTUML): plantuml.Dockerfile ../../versions.mk
161157
docker build --build-arg PLANTUML_VERSION=$(PLANTUML_VERSION) . -f plantuml.Dockerfile -t "plantuml-builder"

hack/tools/go.mod

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ require (
1515
k8s.io/code-generator v0.23.0-alpha.4
1616
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c
1717
k8s.io/klog/v2 v2.60.1
18-
k8s.io/release v0.12.0
1918
sigs.k8s.io/cluster-api/hack/tools v0.0.0-20211111175208-4cc2fce2111a
2019
sigs.k8s.io/controller-tools v0.7.1-0.20211110210727-ab52f76cc7d1
2120
sigs.k8s.io/kind v0.12.0
@@ -25,8 +24,6 @@ require (
2524

2625
require (
2726
4d63.com/gochecknoglobals v0.1.0 // indirect
28-
cloud.google.com/go v0.99.0 // indirect
29-
cloud.google.com/go/storage v1.16.1 // indirect
3027
github.com/Antonboom/errname v0.1.5 // indirect
3128
github.com/Antonboom/nilnil v0.1.0 // indirect
3229
github.com/BurntSushi/toml v1.0.0 // indirect
@@ -37,7 +34,6 @@ require (
3734
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect
3835
github.com/PuerkitoBio/purell v1.1.1 // indirect
3936
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
40-
github.com/VividCortex/ewma v1.1.1 // indirect
4137
github.com/acomagu/bufpipe v1.0.3 // indirect
4238
github.com/alessio/shellescape v1.4.1 // indirect
4339
github.com/alexkohler/prealloc v1.0.0 // indirect
@@ -46,31 +42,19 @@ require (
4642
github.com/ashanbrown/makezero v1.1.1 // indirect
4743
github.com/beorn7/perks v1.0.1 // indirect
4844
github.com/bkielbasa/cyclop v1.2.0 // indirect
49-
github.com/blang/semver v3.5.1+incompatible // indirect
5045
github.com/blizzy78/varnamelen v0.6.0 // indirect
5146
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
5247
github.com/breml/bidichk v0.2.2 // indirect
5348
github.com/breml/errchkjson v0.2.3 // indirect
5449
github.com/butuzov/ireturn v0.1.1 // indirect
55-
github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect
5650
github.com/cespare/xxhash/v2 v2.1.2 // indirect
5751
github.com/charithe/durationcheck v0.0.9 // indirect
5852
github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect
59-
github.com/cheggaaa/pb/v3 v3.0.8 // indirect
60-
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 // indirect
61-
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 // indirect
62-
github.com/containerd/stargz-snapshotter/estargz v0.7.0 // indirect
6353
github.com/daixiang0/gci v0.3.3 // indirect
6454
github.com/davecgh/go-spew v1.1.1 // indirect
6555
github.com/denis-tingaikin/go-header v0.4.3 // indirect
66-
github.com/docker/cli v20.10.7+incompatible // indirect
67-
github.com/docker/distribution v2.7.1+incompatible // indirect
68-
github.com/docker/docker v20.10.9+incompatible // indirect
69-
github.com/docker/docker-credential-helpers v0.6.3 // indirect
7056
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
7157
github.com/emirpasic/gods v1.12.0 // indirect
72-
github.com/envoyproxy/go-control-plane v0.10.1 // indirect
73-
github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect
7458
github.com/esimonov/ifshort v1.0.4 // indirect
7559
github.com/ettle/strcase v0.1.1 // indirect
7660
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
@@ -85,7 +69,6 @@ require (
8569
github.com/go-git/go-billy/v5 v5.3.1 // indirect
8670
github.com/go-git/go-git/v5 v5.4.2 // indirect
8771
github.com/go-logr/logr v1.2.0 // indirect
88-
github.com/go-ole/go-ole v1.2.6 // indirect
8972
github.com/go-openapi/jsonpointer v0.19.5 // indirect
9073
github.com/go-openapi/jsonreference v0.19.5 // indirect
9174
github.com/go-openapi/swag v0.19.14 // indirect
@@ -102,7 +85,6 @@ require (
10285
github.com/gobwas/glob v0.2.3 // indirect
10386
github.com/gofrs/flock v0.8.1 // indirect
10487
github.com/gogo/protobuf v1.3.2 // indirect
105-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
10688
github.com/golang/protobuf v1.5.2 // indirect
10789
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
10890
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
@@ -113,16 +95,9 @@ require (
11395
github.com/golangci/misspell v0.3.5 // indirect
11496
github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2 // indirect
11597
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
116-
github.com/gomarkdown/markdown v0.0.0-20210514010506-3b9f47219fe7 // indirect
11798
github.com/google/go-cmp v0.5.7 // indirect
118-
github.com/google/go-containerregistry v0.6.0 // indirect
119-
github.com/google/go-github/v39 v39.2.0 // indirect
120-
github.com/google/go-querystring v1.1.0 // indirect
12199
github.com/google/gofuzz v1.1.0 // indirect
122-
github.com/google/licenseclassifier/v2 v2.0.0-alpha.1 // indirect
123100
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
124-
github.com/google/uuid v1.3.0 // indirect
125-
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
126101
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
127102
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
128103
github.com/gostaticanalysis/comment v1.4.2 // indirect
@@ -134,7 +109,6 @@ require (
134109
github.com/hashicorp/hcl v1.0.0 // indirect
135110
github.com/hexops/gotextdiff v1.0.3 // indirect
136111
github.com/imdario/mergo v0.3.12 // indirect
137-
github.com/in-toto/in-toto-golang v0.3.3 // indirect
138112
github.com/inconshreveable/mousetrap v1.0.0 // indirect
139113
github.com/itchyny/timefmt-go v0.1.3 // indirect
140114
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
@@ -147,7 +121,6 @@ require (
147121
github.com/kevinburke/ssh_config v1.1.0 // indirect
148122
github.com/kisielk/errcheck v1.6.0 // indirect
149123
github.com/kisielk/gotool v1.0.0 // indirect
150-
github.com/klauspost/compress v1.13.5 // indirect
151124
github.com/kulti/thelper v0.5.1 // indirect
152125
github.com/kunwardeep/paralleltest v1.0.3 // indirect
153126
github.com/kyoh86/exportloopref v0.1.8 // indirect
@@ -166,7 +139,6 @@ require (
166139
github.com/mgechev/revive v1.1.4 // indirect
167140
github.com/mitchellh/go-homedir v1.1.0 // indirect
168141
github.com/mitchellh/mapstructure v1.4.3 // indirect
169-
github.com/mmarkdown/mmark v2.0.40+incompatible // indirect
170142
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
171143
github.com/modern-go/reflect2 v1.0.2 // indirect
172144
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
@@ -175,18 +147,14 @@ require (
175147
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
176148
github.com/nishanths/exhaustive v0.7.11 // indirect
177149
github.com/nishanths/predeclared v0.2.1 // indirect
178-
github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect
179150
github.com/nxadm/tail v1.4.8 // indirect
180151
github.com/olekukonko/tablewriter v0.0.5 // indirect
181152
github.com/onsi/gomega v1.18.1 // indirect
182-
github.com/opencontainers/go-digest v1.0.0 // indirect
183-
github.com/opencontainers/image-spec v1.0.2-0.20200206005212-79b036d80240 // indirect
184153
github.com/pelletier/go-toml v1.9.4 // indirect
185154
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
186155
github.com/pkg/errors v0.9.1 // indirect
187156
github.com/pmezard/go-difflib v1.0.0 // indirect
188157
github.com/polyfloyd/go-errorlint v0.0.0-20211125173453-6d6d39c5bb8b // indirect
189-
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
190158
github.com/prometheus/client_golang v1.11.0 // indirect
191159
github.com/prometheus/client_model v0.2.0 // indirect
192160
github.com/prometheus/common v0.28.0 // indirect
@@ -199,12 +167,9 @@ require (
199167
github.com/ryancurrah/gomodguard v1.2.3 // indirect
200168
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect
201169
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect
202-
github.com/saschagrunert/go-modiff v1.3.0 // indirect
203170
github.com/securego/gosec/v2 v2.10.0 // indirect
204171
github.com/sergi/go-diff v1.2.0 // indirect
205172
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
206-
github.com/shibumi/go-pathspec v1.2.0 // indirect
207-
github.com/shirou/gopsutil/v3 v3.22.2 // indirect
208173
github.com/sirupsen/logrus v1.8.1 // indirect
209174
github.com/sivchari/containedctx v1.0.2 // indirect
210175
github.com/sivchari/tenv v1.4.7 // indirect
@@ -215,8 +180,6 @@ require (
215180
github.com/spf13/cobra v1.4.0 // indirect
216181
github.com/spf13/jwalterweatherman v1.1.0 // indirect
217182
github.com/spf13/viper v1.10.1 // indirect
218-
github.com/spiegel-im-spiegel/errs v1.0.2 // indirect
219-
github.com/spiegel-im-spiegel/go-cvss v0.4.0 // indirect
220183
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
221184
github.com/stretchr/objx v0.2.0 // indirect
222185
github.com/stretchr/testify v1.7.0 // indirect
@@ -234,25 +197,17 @@ require (
234197
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca // indirect
235198
github.com/yagipy/maintidx v1.0.0 // indirect
236199
github.com/yeya24/promlinter v0.1.1-0.20210918184747-d757024714a1 // indirect
237-
github.com/yusufpapurcu/wmi v1.2.2 // indirect
238200
gitlab.com/bosi/decorder v0.2.1 // indirect
239-
go.opencensus.io v0.23.0 // indirect
240201
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
241202
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
242203
golang.org/x/exp v0.0.0-20211029160041-3396431c207b // indirect
243204
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
244205
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
245-
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
246206
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
247207
golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9 // indirect
248-
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
249208
golang.org/x/text v0.3.7 // indirect
250209
golang.org/x/tools v0.1.10 // indirect
251210
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
252-
google.golang.org/api v0.63.0 // indirect
253-
google.golang.org/appengine v1.6.7 // indirect
254-
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
255-
google.golang.org/grpc v1.43.0 // indirect
256211
google.golang.org/protobuf v1.27.1 // indirect
257212
gopkg.in/inf.v0 v0.9.1 // indirect
258213
gopkg.in/ini.v1 v1.66.2 // indirect
@@ -275,9 +230,6 @@ require (
275230
sigs.k8s.io/kustomize/api v0.11.2 // indirect
276231
sigs.k8s.io/kustomize/cmd/config v0.10.4 // indirect
277232
sigs.k8s.io/kustomize/kyaml v0.13.3 // indirect
278-
sigs.k8s.io/mdtoc v1.1.0 // indirect
279-
sigs.k8s.io/release-sdk v0.2.1-0.20211005095109-f50f5112261c // indirect
280-
sigs.k8s.io/release-utils v0.3.0 // indirect
281233
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
282234
sigs.k8s.io/yaml v1.3.0 // indirect
283235
)

0 commit comments

Comments
 (0)