diff --git a/Dockerfile b/Dockerfile index 6b09902a9b4bf70162d0941341f3b1fac92ab453..1c5da29ecf8574581cb11b7f0422359bdb4ce2be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,4 +19,4 @@ WORKDIR / COPY --from=go_builder /go/src/app/app /app COPY templates /templates COPY --from=asset_builder /app/assets /assets -ENTRYPOINT ["/app"] \ No newline at end of file +ENTRYPOINT ["/app"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..1949a53a90813eeb4dd4499fcd0ca9d00aa2a68c --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +IMAGE := k8r.eu/justjanne/$(shell basename $(shell git remote get-url origin) .git) +TAGS := $(shell git describe --always --tags HEAD) + +.PHONY: build +build: + docker build --pull -t $(IMAGE):$(TAGS) . + docker tag $(IMAGE):$(TAGS) $(IMAGE):latest + @echo Successfully tagged $(IMAGE):$(TAGS) as latest + +.PHONY: push +push: build + docker push $(IMAGE):$(TAGS) + docker push $(IMAGE):latest + @echo Successfully pushed $(IMAGE):$(TAGS) as latest diff --git a/build.sh b/build.sh deleted file mode 100755 index c7770967927e1858258d7faa2217af675b148584..0000000000000000000000000000000000000000 --- a/build.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -IMAGE=k8r.eu/justjanne/imghost-frontend -TAGS=$(git describe --always --tags HEAD) - -docker build -t $IMAGE:$TAGS . -docker tag $IMAGE:$TAGS $IMAGE:latest -echo Successfully tagged $IMAGE:latest -docker push $IMAGE:$TAGS -docker push $IMAGE:latest \ No newline at end of file diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index 71d569abf4f8eb7cce166feb62456a502cf57238..0000000000000000000000000000000000000000 --- a/deploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -IMAGE=k8r.eu/justjanne/imghost-frontend -TAGS=$(git describe --always --tags HEAD) -DEPLOYMENT=imghost-frontend -POD=imghost-frontend - -kubectl -n imghost set image deployment/$DEPLOYMENT $POD=$IMAGE:$TAGS \ No newline at end of file