Skip to content

Commit

Permalink
Merge pull request #447 from nckturner/release-0.5.6
Browse files Browse the repository at this point in the history
Release 0.5.6
  • Loading branch information
k8s-ci-robot committed Apr 6, 2022
2 parents 186ea9d + 9dcb6d1 commit 99f04d6
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
Release v0.5.6
* Bump AWS SDK to v1.43.28 ([#445](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/445), @nckturner)
* Use the apiversion from KUBERNETES_EXEC_INFO ([#439](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/439), @jyotimahapatra)
* Bump promptui module to v0.9.0 ([#437](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/437), @abhay-krishna)

Release v0.5.5
* Use full package name for goreleaser version ([#433](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/433), @nckturner)
* add sts error metric ([#430](https://github.com/kubernetes-sigs/aws-iam-authenticator/pull/430), @jyotimahapatra)
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Expand Up @@ -13,10 +13,10 @@
# limitations under the License.
ARG image=public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonroot:2021-12-01-1638322424

FROM golang:1.16 AS builder
FROM --platform=$BUILDPLATFORM golang:1.16 AS builder
WORKDIR /go/src/github.com/kubernetes-sigs/aws-iam-authenticator
COPY . .
RUN make bin
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make bin
RUN chown 65532 _output/bin/aws-iam-authenticator

FROM public.ecr.aws/eks-distro/kubernetes/go-runner:v0.9.0-eks-1-21-4 as go-runner
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -3,7 +3,7 @@ default: bin/aws-iam-authenticator
PKG ?= sigs.k8s.io/aws-iam-authenticator
GORELEASER := $(shell command -v goreleaser 2> /dev/null)

VERSION ?= v0.5.5
VERSION ?= v0.5.6
GOOS ?= $(shell go env GOOS)
GOARCH ?= $(shell go env GOARCH)
GOPROXY ?= $(shell go env GOPROXY)
Expand Down
5 changes: 1 addition & 4 deletions cloudbuild.yaml
@@ -1,6 +1,3 @@
images:
- 'gcr.io/$PROJECT_ID/aws-iam-authenticator:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/aws-iam-authenticator:latest'
options:
substitution_option: ALLOW_LOOSE
steps:
Expand All @@ -17,4 +14,4 @@ steps:
substitutions:
_GIT_TAG: '12345'
_PULL_BASE_REF: 'master'
timeout: 1200s
timeout: 1600s
20 changes: 20 additions & 0 deletions docs/RELEASE.md
Expand Up @@ -39,6 +39,18 @@ You also might need to create a release branch, if it doesn't already exist, if

## Creating the release commit

### Updating the Makefile

Bump the version number in the Makefile:

```
VERSION ?= v0.5.2
```

This ensures the binary version is correct.

### Updating the CHANGELOG

We need to generate the CHANGELOG for the new release by running `./hack/changelog.py`. First check the correctness of the output using the `--print-only` flag. Pass the previous release tag, and the commit SHA of the most recent commit (the new tag will include the changelog, so it hasn't been created yet). The commands use a `--token` field. Generate it from [github personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).

```
Expand Down Expand Up @@ -115,3 +127,11 @@ $(aws ecr get-login --no-include-email --region us-west-2 --registry-ids 6024011
* `docker pull 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-iam-authenticator:v0.5.2-alpine-3.6`
* `docker pull 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-iam-authenticator:v0.5.2-scratch`
````

## Post Release

In a new PR after the images are pushed to ECR, update the yaml in `deploy/example.yaml`:

```
image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon/aws-iam-authenticator:v0.5.2
```
10 changes: 7 additions & 3 deletions hack/changelog.py
Expand Up @@ -27,7 +27,7 @@ def git_log(range=''):
if __name__ == '__main__':
parser = argparse.ArgumentParser(prog='changelog')
parser.add_argument('--token', help='Your github token.')
parser.add_argument('--changelog-file', help='The path to the changelog output file.')
parser.add_argument('--changelog-file', default='CHANGELOG.md', help='The path to the changelog output file.')
parser.add_argument('--print-only', action='store_true', help='Only print the output.')
parser.add_argument('--range', help='The range of commit logs to inspect in the repository. You can (and should) use tags here. Example: v5..v10 (This argument is passed to git log, so read the git log documentation for clarification.')
parser.add_argument('--section-title', help='The title for the section in the changelog that is generated')
Expand All @@ -50,8 +50,12 @@ def git_log(range=''):

changelog = f'{args.section_title}\n'
g = ChangelogGenerator('kubernetes-sigs/aws-iam-authenticator', args.token)
for pr_match in re.finditer(r'Merge pull request #(\d+)', logs):
pr_id = int(pr_match.group(1))
for pr_match in re.finditer(r'Merge pull request #(\d+)|\(#([\d]{1,7})\)', logs):
groups = pr_match.groups()
if groups[0]:
pr_id = int(groups[0])
elif groups[1]:
pr_id = int(groups[1])
changelog += f'* {g.generate(pr_id)}\n'

if args.print_only:
Expand Down

0 comments on commit 99f04d6

Please sign in to comment.