forked from rbauction/sfdclib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (28 loc) · 937 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
CONTAINER_NAME := acv-sfdc-ci
VERSION := $(shell git fetch --tags && git describe --tags)
.PHONY: clean
clean:
find . -type f -name '.DS_Store' -delete -o -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
.PHONY: deps
deps:
pipenv install
pipenv install --dev
build: clean
git submodule update --init --recursive
@docker build \
--build-arg NEXUS_USER=${NEXUS_USER} \
--build-arg NEXUS_PASSWORD=${NEXUS_PASSWORD} \
--build-arg VERSION=${VERSION} \
--tag $(CONTAINER_NAME):$(VERSION) .
.PHONY: deploy
deploy: build
docker run \
-e APP_MODE=deploy \
-e NEXUS_USER=${NEXUS_USER} \
-e NEXUS_PASSWORD=${NEXUS_PASSWORD} \
-v /var/run/docker.sock:/var/run/docker.sock \
$(CONTAINER_NAME):$(VERSION)
.PHONY: stop-ci
stop-ci:
docker ps -a -q --filter ancestor=$(CONTAINER_NAME):$(VERSION) | xargs docker rm -f
docker ps -a -q --filter ancestor=mysql:5.7git s | xargs docker rm -f