Skip to content

Commit

Permalink
Merge pull request #35 from fluxcd/release-v0.0.8
Browse files Browse the repository at this point in the history
Release v0.0.8
  • Loading branch information
stefanprodan authored Sep 2, 2020
2 parents 79345ae + 4e41ea8 commit feb6b30
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 13 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,28 @@ jobs:
cd config/release
kustomize edit set image fluxcd/notification-controller=fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}
kustomize build . > notification-controller.yaml
- name: Push image
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_FLUXCD_USER }}
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
repository: fluxcd/notification-controller
tag_with_ref: true
- uses: crazy-max/ghaction-docker-buildx@v1
- name: Publish image
run: |
echo "${{ secrets.DOCKER_FLUXCD_PASSWORD }}" | docker login --username fluxcdbot --password-stdin
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io --username fluxcdbot --password-stdin
docker buildx build --platform "linux/amd64" \
--output "type=image,push=true" \
--build-arg "REVISION=${GITHUB_SHA}" \
--build-arg "VERSION=${{ steps.get_version.outputs.VERSION }}" \
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--tag "ghcr.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}" \
--tag "docker.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}" \
--file Dockerfile .
docker buildx build --platform "linux/arm64" \
--output "type=image,push=true" \
--build-arg "REVISION=${GITHUB_SHA}" \
--build-arg "VERSION=${{ steps.get_version.outputs.VERSION }}" \
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
--tag "ghcr.io/fluxcd/notification-controller-arm64:${{ steps.get_version.outputs.VERSION }}" \
--file Dockerfile .
- name: Create release
id: create_release
uses: actions/create-release@latest
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## 0.0.8 (2020-09-02)

This prerelease comes with support for publishing events to GitHub commit status API.

## 0.0.7 (2020-08-05)

This prerelease comes with a fix to the Prometheus scraping endpoint.
Expand Down
20 changes: 18 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.14 as builder
FROM golang:1.14-alpine as builder

WORKDIR /workspace

Expand All @@ -16,14 +16,30 @@ COPY controllers/ controllers/
COPY internal/ internal/

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

FROM alpine:3.12

ARG BUILD_DATE
ARG VERSION
ARG REVISION

LABEL org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version=$VERSION \
org.opencontainers.image.revision=$REVISION \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.source="https://github.com/fluxcd/notification-controller" \
org.opencontainers.image.documentation="https://toolkit.fluxcd.io" \
org.opencontainers.image.authors="Flux CD"

RUN apk add --no-cache ca-certificates tini

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

# Create minimal nsswitch.conf file to prioritize the usage of /etc/hosts over DNS queries.
# https://github.com/gliderlabs/docker-alpine/issues/367#issuecomment-354316460
RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf

RUN addgroup -S controller && adduser -S -g controller controller

USER controller
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ docker-build: test
docker-push:
docker push ${IMG}

# Set the docker image in-cluster
docker-deploy:
kubectl -n gitops-system set image deployment/notification-controller manager=${IMG}

# Find or download controller-gen
controller-gen:
ifeq (, $(shell which controller-gen))
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ resources:
images:
- name: fluxcd/notification-controller
newName: fluxcd/notification-controller
newTag: v0.0.7
newTag: v0.0.8
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.14
require (
github.com/fluxcd/pkg/logger v0.0.1
github.com/fluxcd/pkg/recorder v0.0.6
github.com/fluxcd/source-controller/api v0.0.11
github.com/fluxcd/source-controller/api v0.0.13
github.com/go-logr/logr v0.1.0
github.com/google/go-github/v32 v32.0.0
github.com/hashicorp/go-retryablehttp v0.6.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ github.com/fluxcd/pkg/logger v0.0.1 h1:YInMzE4w+crIHQcUI4uLgFI0J+D0IVb8+pgYrseAY
github.com/fluxcd/pkg/logger v0.0.1/go.mod h1:Qg+nqSAmY6OyO9JAIfQr0J2LjNu++M1Sm7KcZVLnjDM=
github.com/fluxcd/pkg/recorder v0.0.6 h1:me/n8syeeGXz50OXoPX3jgIj9AtinvhHdKT9Dy+MbHs=
github.com/fluxcd/pkg/recorder v0.0.6/go.mod h1:IfQxfVRSNsWs3B0Yp5B6ObEWwKHILlAx8N7XkoDdhFg=
github.com/fluxcd/source-controller/api v0.0.11 h1:UJBDtChNXF+0dpVypGEoW8P+EmWNyFeMRgitqfAQ9HA=
github.com/fluxcd/source-controller/api v0.0.11/go.mod h1:PUe+EYQ/s+KPnz2iOCgdf+L6clM0SWkyvdXIpbfpkQE=
github.com/fluxcd/source-controller/api v0.0.13 h1:rf0uZ20OAN+yJVs0uHJUhw3n3ci9ZyjaLqt5Jt/5K9A=
github.com/fluxcd/source-controller/api v0.0.13/go.mod h1:PUe+EYQ/s+KPnz2iOCgdf+L6clM0SWkyvdXIpbfpkQE=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
Expand Down

0 comments on commit feb6b30

Please sign in to comment.