Skip to content

Commit

Permalink
Release v0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
talal committed Sep 29, 2021
1 parent 6b79680 commit d45abb2
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: goreleaser
on:
push:
tags:
- 'v*.*.*'
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
release:
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -15,18 +17,16 @@ 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}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--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"
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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
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
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile.goreleaser
Original file line number Diff line number Diff line change
@@ -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" ]
2 changes: 1 addition & 1 deletion Makefile.maker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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) > $@

0 comments on commit d45abb2

Please sign in to comment.