From 4ded9307c31c992c1d21a34a34dc8a7b4bcd2031 Mon Sep 17 00:00:00 2001 From: Muhammad Talal Anwar Date: Wed, 29 Sep 2021 21:41:06 +0200 Subject: [PATCH] Release v0.7.2 --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yml | 4 ++-- .goreleaser.yml | 6 +++--- CHANGELOG.md | 9 ++++++++- Dockerfile | 4 ++-- Dockerfile.goreleaser | 9 +++++---- Makefile | 2 +- Makefile.maker.yaml | 2 +- 8 files changed, 23 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ba1142e0..29cf99f0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -56,7 +56,7 @@ jobs: uses: actions/cache@v2 with: path: test/bin - key: ${{ runner.os }}-kubebuilder-${{ hashFiles('test/.envtest-version') }} + key: ${{ runner.os }}-envtest-${{ hashFiles('test/.envtest-version') }} - name: Run tests and generate coverage report run: GO_BUILDFLAGS='-mod vendor' make build/cover.out - name: Upload coverage report to Coveralls diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 280c6fa8..1a95ce25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ name: goreleaser on: push: tags: - - 'v*.*.*' + - "v[0-9]+.[0-9]+.[0-9]+" jobs: release: @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.15 + go-version: 1.17 - name: Docker Login env: diff --git a/.goreleaser.yml b/.goreleaser.yml index 72d9001f..50a7f4a2 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -5,6 +5,8 @@ builds: - linux goarch: - amd64 + flags: + - -mod=vendor ldflags: - -s -w -X main.version={{.Version}} -X main.commit={{.FullCommit}} -X main.date={{.CommitDate}} mod_timestamp: "{{ .CommitTimestamp }}" # Ensure builds are reproducible @@ -15,11 +17,8 @@ archives: dockers: - image_templates: - "sapcc/absent-metrics-operator:{{ .Tag }}" - - "sapcc/absent-metrics-operator:v{{ .Major }}.{{ .Minor }}" - "sapcc/absent-metrics-operator:latest" dockerfile: Dockerfile.goreleaser - binaries: - - absent-metrics-operator build_flag_templates: - "--pull" - "--label=org.opencontainers.image.created={{.Date}}" @@ -27,6 +26,7 @@ dockers: - "--label=org.opencontainers.image.source={{.GitURL}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" - "--label=org.opencontainers.image.version={{.Version}}" + - "--label=source_repository={{.GitURL}}" # this label is needed for Keppel checksum: name_template: "checksums.txt" diff --git a/CHANGELOG.md b/CHANGELOG.md index cac93d1b..81bc784e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.7.2] - 2021-09-29 + +### Changed + +- Updated Go to `1.17` and all dependencies to their latest version. + ## [0.7.1] - 2020-11-17 ### Fixed @@ -75,7 +81,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release. -[unreleased]: https://github.com/sapcc/absent-metrics-operator/compare/v0.7.1...HEAD +[unreleased]: https://github.com/sapcc/absent-metrics-operator/compare/v0.7.2...HEAD +[0.7.2]: https://github.com/sapcc/absent-metrics-operator/compare/v0.7.1...v0.7.2 [0.7.1]: https://github.com/sapcc/absent-metrics-operator/compare/v0.7.0...v0.7.1 [0.7.0]: https://github.com/sapcc/absent-metrics-operator/compare/v0.6.0...v0.7.0 [0.6.0]: https://github.com/sapcc/absent-metrics-operator/compare/v0.5.2...v0.6.0 diff --git a/Dockerfile b/Dockerfile index c99d7f63..e49cb593 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.16-alpine3.13 as builder +FROM golang:1.17-alpine3.13 as builder RUN apk add --no-cache make gcc git musl-dev COPY . /src @@ -6,7 +6,7 @@ RUN make -C /src install PREFIX=/pkg GO_BUILDFLAGS='-mod vendor' ################################################################################ -FROM alpine:latest +FROM alpine:3.13 LABEL source_repository="https://github.com/sapcc/absent-metrics-operator" RUN apk add --no-cache ca-certificates diff --git a/Dockerfile.goreleaser b/Dockerfile.goreleaser index 30901d51..20adbe81 100644 --- a/Dockerfile.goreleaser +++ b/Dockerfile.goreleaser @@ -1,10 +1,11 @@ -# We use this additional file instead of the other Dockerfile because -# GoReleaser already compiles a static binary and we can just copy it over -# compared to the other Dockerfile which first compiles it. -# +# This Dockerfile is used by GoReleaser. +# We use this additional file instead of the regular Dockerfile because when GoReleaser +# runs, it also compiles the required binary which can be subsequently used for this +# Dockerfile. # This saves extra work and time in our CI release workflow. FROM alpine:latest +# No need for source_repository label here, it will be added by GoReleaser. RUN apk add --no-cache ca-certificates COPY absent-metrics-operator /usr/bin/ ENTRYPOINT [ "/usr/bin/absent-metrics-operator" ] diff --git a/Makefile b/Makefile index dc5f448c..63efdac7 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ test/bin: # attach `make test/bin` as a dependency to the autogenerated `make build/cover.out` build/cover.out: test/bin -build/release-info: build CHANGELOG.md +build/release-info: CHANGELOG.md | build go run $(GO_BUILDFLAGS) tools/releaseinfo.go $< $(shell git describe --tags --abbrev=0) > $@ build-all: build/absent-metrics-operator diff --git a/Makefile.maker.yaml b/Makefile.maker.yaml index 0b4913b2..3739b416 100644 --- a/Makefile.maker.yaml +++ b/Makefile.maker.yaml @@ -39,5 +39,5 @@ verbatim: | # attach `make test/bin` as a dependency to the autogenerated `make build/cover.out` build/cover.out: test/bin - build/release-info: build CHANGELOG.md + build/release-info: CHANGELOG.md | build go run $(GO_BUILDFLAGS) tools/releaseinfo.go $< $(shell git describe --tags --abbrev=0) > $@