Skip to content

Commit feb6b30

Browse files
authored
Merge pull request #35 from fluxcd/release-v0.0.8
Release v0.0.8
2 parents 79345ae + 4e41ea8 commit feb6b30

File tree

7 files changed

+52
-13
lines changed

7 files changed

+52
-13
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,28 @@ jobs:
2121
cd config/release
2222
kustomize edit set image fluxcd/notification-controller=fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}
2323
kustomize build . > notification-controller.yaml
24-
- name: Push image
25-
uses: docker/build-push-action@v1
26-
with:
27-
username: ${{ secrets.DOCKER_FLUXCD_USER }}
28-
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
29-
repository: fluxcd/notification-controller
30-
tag_with_ref: true
24+
- uses: crazy-max/ghaction-docker-buildx@v1
25+
- name: Publish image
26+
run: |
27+
echo "${{ secrets.DOCKER_FLUXCD_PASSWORD }}" | docker login --username fluxcdbot --password-stdin
28+
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io --username fluxcdbot --password-stdin
29+
30+
docker buildx build --platform "linux/amd64" \
31+
--output "type=image,push=true" \
32+
--build-arg "REVISION=${GITHUB_SHA}" \
33+
--build-arg "VERSION=${{ steps.get_version.outputs.VERSION }}" \
34+
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
35+
--tag "ghcr.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}" \
36+
--tag "docker.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}" \
37+
--file Dockerfile .
38+
39+
docker buildx build --platform "linux/arm64" \
40+
--output "type=image,push=true" \
41+
--build-arg "REVISION=${GITHUB_SHA}" \
42+
--build-arg "VERSION=${{ steps.get_version.outputs.VERSION }}" \
43+
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
44+
--tag "ghcr.io/fluxcd/notification-controller-arm64:${{ steps.get_version.outputs.VERSION }}" \
45+
--file Dockerfile .
3146
- name: Create release
3247
id: create_release
3348
uses: actions/create-release@latest

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project are documented in this file.
44

5+
## 0.0.8 (2020-09-02)
6+
7+
This prerelease comes with support for publishing events to GitHub commit status API.
8+
59
## 0.0.7 (2020-08-05)
610

711
This prerelease comes with a fix to the Prometheus scraping endpoint.

Dockerfile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.14 as builder
1+
FROM golang:1.14-alpine as builder
22

33
WORKDIR /workspace
44

@@ -16,14 +16,30 @@ COPY controllers/ controllers/
1616
COPY internal/ internal/
1717

1818
# build
19-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o notification-controller main.go
19+
RUN CGO_ENABLED=0 go build -a -o notification-controller main.go
2020

2121
FROM alpine:3.12
2222

23+
ARG BUILD_DATE
24+
ARG VERSION
25+
ARG REVISION
26+
27+
LABEL org.opencontainers.image.created=$BUILD_DATE \
28+
org.opencontainers.image.version=$VERSION \
29+
org.opencontainers.image.revision=$REVISION \
30+
org.opencontainers.image.licenses="Apache-2.0" \
31+
org.opencontainers.image.source="https://github.com/fluxcd/notification-controller" \
32+
org.opencontainers.image.documentation="https://toolkit.fluxcd.io" \
33+
org.opencontainers.image.authors="Flux CD"
34+
2335
RUN apk add --no-cache ca-certificates tini
2436

2537
COPY --from=builder /workspace/notification-controller /usr/local/bin/
2638

39+
# Create minimal nsswitch.conf file to prioritize the usage of /etc/hosts over DNS queries.
40+
# https://github.com/gliderlabs/docker-alpine/issues/367#issuecomment-354316460
41+
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf
42+
2743
RUN addgroup -S controller && adduser -S -g controller controller
2844

2945
USER controller

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ docker-build: test
7979
docker-push:
8080
docker push ${IMG}
8181

82+
# Set the docker image in-cluster
83+
docker-deploy:
84+
kubectl -n gitops-system set image deployment/notification-controller manager=${IMG}
85+
8286
# Find or download controller-gen
8387
controller-gen:
8488
ifeq (, $(shell which controller-gen))

config/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ resources:
66
images:
77
- name: fluxcd/notification-controller
88
newName: fluxcd/notification-controller
9-
newTag: v0.0.7
9+
newTag: v0.0.8

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.14
55
require (
66
github.com/fluxcd/pkg/logger v0.0.1
77
github.com/fluxcd/pkg/recorder v0.0.6
8-
github.com/fluxcd/source-controller/api v0.0.11
8+
github.com/fluxcd/source-controller/api v0.0.13
99
github.com/go-logr/logr v0.1.0
1010
github.com/google/go-github/v32 v32.0.0
1111
github.com/hashicorp/go-retryablehttp v0.6.6

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ github.com/fluxcd/pkg/logger v0.0.1 h1:YInMzE4w+crIHQcUI4uLgFI0J+D0IVb8+pgYrseAY
6969
github.com/fluxcd/pkg/logger v0.0.1/go.mod h1:Qg+nqSAmY6OyO9JAIfQr0J2LjNu++M1Sm7KcZVLnjDM=
7070
github.com/fluxcd/pkg/recorder v0.0.6 h1:me/n8syeeGXz50OXoPX3jgIj9AtinvhHdKT9Dy+MbHs=
7171
github.com/fluxcd/pkg/recorder v0.0.6/go.mod h1:IfQxfVRSNsWs3B0Yp5B6ObEWwKHILlAx8N7XkoDdhFg=
72-
github.com/fluxcd/source-controller/api v0.0.11 h1:UJBDtChNXF+0dpVypGEoW8P+EmWNyFeMRgitqfAQ9HA=
73-
github.com/fluxcd/source-controller/api v0.0.11/go.mod h1:PUe+EYQ/s+KPnz2iOCgdf+L6clM0SWkyvdXIpbfpkQE=
72+
github.com/fluxcd/source-controller/api v0.0.13 h1:rf0uZ20OAN+yJVs0uHJUhw3n3ci9ZyjaLqt5Jt/5K9A=
73+
github.com/fluxcd/source-controller/api v0.0.13/go.mod h1:PUe+EYQ/s+KPnz2iOCgdf+L6clM0SWkyvdXIpbfpkQE=
7474
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
7575
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
7676
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=

0 commit comments

Comments
 (0)