Skip to content

Commit

Permalink
Release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
WanzenBug committed Dec 15, 2020
1 parent 58cb430 commit e983972
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ jobs:
docker login --username=${DOCKER_USERNAME} --password-stdin quay.io <<< "${DOCKER_PASSWORD}"
- name: push
run: |
make update upload TAG="${{ github.ref }}" NOCACHE=true
make update upload NOCACHE=true
make update upload TAG="latest" NOCACHE=false
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ COPY pkg /src/pkg

ARG GOOS=linux
ARG GOARCH=amd64
ARG SEMVER=0.0.0-0.unknown
ARG VERSION=v0.0.0-0.unknown

RUN CGO_ENABLED=0 go build -ldflags="-X github.com/piraeusdatastore/piraeus-ha-controller/cmd/piraeus-ha-controller.Version=${SEMVER} -extldflags=-static" -v ./cmd/...
RUN CGO_ENABLED=0 go build -ldflags="-X github.com/piraeusdatastore/piraeus-ha-controller/cmd/piraeus-ha-controller.Version=${VERSION} -extldflags=-static" -v ./cmd/...

FROM scratch
COPY --from=builder /src/piraeus-ha-controller /piraeus-ha-controller
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
PROJECT ?= piraeus-ha-controller
REGISTRY ?= quay.io/piraeusdatastore
ARCH ?= amd64
SEMVER ?= 0.0.0+$(shell git rev-parse --short HEAD)
TAG ?= latest
VERSION ?= $(shell git describe --tags --match "v*.*" HEAD)
TAG ?= $(VERSION)
NOCACHE ?= false

help:
Expand All @@ -12,7 +12,7 @@ all: update upload

.PHONY: update
update:
docker build --build-arg=SEMVER=$(SEMVER) --build-arg=GOARCH=$(ARCH) --no-cache=$(NOCACHE) --pull=$(NOCACHE) -t $(PROJECT):$(TAG) .
docker build --build-arg=VERSION=$(VERSION) --build-arg=GOARCH=$(ARCH) --no-cache=$(NOCACHE) --pull=$(NOCACHE) -t $(PROJECT):$(TAG) .

.PHONY: upload
upload:
Expand Down
2 changes: 1 addition & 1 deletion deploy/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
serviceAccountName: ha-controller
containers:
- name: controller
image: quay.io/piraeusdatastore/piraeus-ha-controller:latest
image: quay.io/piraeusdatastore/piraeus-ha-controller:v0.1.0
args:
- --leader-election=true
- --leader-election-lease-name=$(NAME)
Expand Down

0 comments on commit e983972

Please sign in to comment.