forked from semaphoreci/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (20 loc) · 1.01 KB
/
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
.PHONY: build
BRANCH=$(shell echo "$(SEMAPHORE_GIT_BRANCH)" | sed 's/[^a-z]//g')
IMAGE_REDIRECT="us.gcr.io/semaphore2-prod/docs-redirect"
IMAGE_TAG_REDIRECT="start-$(BRANCH)-$(SEMAPHORE_WORKFLOW_ID)-sha-$(SEMAPHORE_GIT_SHA)"
server:
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material:4.6.3
configure.gcloud:
gcloud auth activate-service-account [email protected] --key-file ~/gce-creds.json
gcloud --quiet auth configure-docker
mkdocs.build:
docker run --rm -it -p 8001:8000 -v ${PWD}:/docs squidfunk/mkdocs-material:4.6.3 -- build
nginx.build:
-docker pull $(IMAGE_REDIRECT):latest
docker build --cache-from $(IMAGE_REDIRECT):latest -t $(IMAGE_REDIRECT) . -f Dockerfile.nginx
nginx.test:
docker run --rm -t -a stdout $(IMAGE_REDIRECT) nginx -c /etc/nginx/nginx.conf -t
nginx.push:
docker tag $(IMAGE_REDIRECT):latest $(IMAGE_REDIRECT):$(IMAGE_TAG_REDIRECT)
docker push $(IMAGE_REDIRECT):$(IMAGE_TAG_REDIRECT)
docker push $(IMAGE_REDIRECT):latest