-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
35 lines (26 loc) · 758 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
.PHONY: ci-build ci-run ci-test ci-remove ci-clean ci-push-tag ci-push-latest ci-login
NAME := os-conductor
ORG := openspending
REPO := ${ORG}/${NAME}
TAG := $(shell git log -1 --pretty=format:"%h")
IMG := ${REPO}:${TAG}
LATEST := ${REPO}:latest
ci-build:
docker pull ${LATEST}
docker build --cache-from ${LATEST} -t ${IMG} -t ${LATEST} .
ci-run:
docker-compose -f docker-compose.ci.yml up -d
ci-test:
docker ps | grep os-conductor
ci-remove:
docker rm -f ${NAME}
ci-clean:
git stash --all
ci-push: ci-clean ci-build ci-login
docker push ${IMG}
docker push ${LATEST}
ci-push-tag: ci-clean ci-login
docker build -t ${REPO}:${TAG} .
docker push ${REPO}:${TAG}
ci-login:
docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}