Matteo Scandolo | a4a279a | 2019-03-14 15:56:22 -0700 | [diff] [blame^] | 1 | REGISTRY ?= |
| 2 | REPOSITORY ?= |
| 3 | DOCKER_BUILD_ARGS ?= |
| 4 | SERVICE ?= rcord |
| 5 | MAKEFILE_DIR := $(dir $(realpath $(firstword $(MAKEFILE_LIST)))) |
| 6 | TAG ?= $(shell cat ${MAKEFILE_DIR}/VERSION) |
| 7 | IMAGENAME := ${REGISTRY}${REPOSITORY}${SERVICE}-synchronizer:${TAG} |
| 8 | SHELL := /bin/bash |
| 9 | |
| 10 | all: build push |
| 11 | |
| 12 | build: |
| 13 | docker build $(DOCKER_BUILD_ARGS) -t ${IMAGENAME} -f Dockerfile.synchronizer . |
| 14 | |
| 15 | push: |
| 16 | docker push ${IMAGENAME} |
| 17 | |
| 18 | test: |
| 19 | source ../../xos/venv-xos/bin/activate && cd xos && nose2 --verbose --coverage-report term || echo "Please install the XOS virtual environment" |
| 20 | |
| 21 | migrate: |
| 22 | source ../../xos/venv-xos/bin/activate && cd xos && xos-migrate -s $(SERVICE) |