Commit 1d7fd5f0 authored by Andrew Bruce's avatar Andrew Bruce

pass image to deployment manifest

parent 2b499382
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment