...
 
Commits (1)
VERSION
IMAGE
rendered_k8s_manifests.yaml
......@@ -3,14 +3,15 @@ all:
serve: all
cd public && python -m SimpleHTTPServer
.PHONY: VERSION
VERSION:
git rev-parse --short HEAD > $@
build: all VERSION
docker build . -t eu.gcr.io/code-supply/code-supply:$$(cat VERSION)
.PHONY: IMAGE
IMAGE:
[ "x$$(git status --porcelain)" = x ]
echo eu.gcr.io/code-supply/code-supply:$$(git rev-parse --short HEAD) > $@
build: all IMAGE
docker build . -t $$(cat IMAGE)
push: build
docker push eu.gcr.io/code-supply/code-supply
rendered_k8s_manifests.yaml: VERSION k8s/deployment.yaml k8s/service.yaml k8s/ingress.yaml
cat k8s/*.yaml | VERSION=$$(cat VERSION) envsubst > $@
docker push $$(cat IMAGE)
rendered_k8s_manifests.yaml: IMAGE k8s/deployment.yaml k8s/service.yaml k8s/ingress.yaml
cat k8s/*.yaml | IMAGE=$$(cat IMAGE) envsubst > $@
deploy: rendered_k8s_manifests.yaml
kubectl --context=code-supply-production apply -f $<
......@@ -17,7 +17,7 @@ spec:
spec:
containers:
- name: *name
image: eu.gcr.io/codesupply/code-supply:${VERSION}
image: $IMAGE
ports:
- name: http
containerPort: 80
......