forked from openspending/os-explorer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (24 loc) · 676 Bytes
/
Makefile
File metadata and controls
32 lines (24 loc) · 676 Bytes
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
.PHONY: ci-build ci-run ci-test ci-remove ci-push-tag ci-push-latest ci-login
NAME := os-explorer
ORG := openspending
REPO := ${ORG}/${NAME}
TAG := $(shell git log -1 --pretty=format:"%h")
IMG := ${REPO}:${TAG}
LATEST := ${REPO}:latest
ci-build:
docker build -t ${IMG} -t ${LATEST} .
ci-run:
docker run ${RUN_ARGS} --name ${NAME} -d ${LATEST}
ci-test:
docker ps | grep latest
docker exec ${NAME} npm test
ci-remove:
docker rm -f ${NAME}
ci-push: ci-login
docker push ${IMG}
docker push ${LATEST}
ci-push-tag: ci-login
docker build -t ${REPO}:${TAG} .
docker push ${REPO}:${TAG}
ci-login:
docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}