-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
32 lines (23 loc) · 822 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
# Auto-generated by Baton
BERLIOZ_GROUP := udacity
BERLIOZ_NAME := squawkerfcmserver
DOCKER_REPO := $(BERLIOZ_GROUP)/$(BERLIOZ_NAME)
SERVICE_NAME := $(BERLIOZ_NAME)
VERSION ?= $(shell git rev-parse --short HEAD)
CONDUCTOR_APP_ID := 97c2b0b4-f2ce-11e6-84a1-2ba679393267
export
.PHONY: all deploy docker test
all: docker
test:
echo "no tests at this time"
docker:
docker build -t $(SERVICE_NAME) .
docker tag -f $(SERVICE_NAME) $(DOCKER_REPO):$(VERSION)
docker push $(DOCKER_REPO)
_deploy:
curl -X PUT "https://conductor-beta.udacity.com/api/v1/apps/$(CONDUCTOR_APP_ID)/deploy" \
-H 'X-GitHub-Access-Token: $(CI_GITHUB_ACCESS_TOKEN)' \
-d '{"environment": "$(ENVIRONMENT)", "image": "$(DOCKER_REPO):$(VERSION)"}'
deploy: ENVIRONMENT=production
deploy: docker
deploy: _deploy