-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
25 lines (22 loc) · 904 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
# Variables. Yes.
DOCKER=docker
DOCKER_BUILDKIT=0
IMAGE_NAME=iasc-site
IMAGE_TAG=local
# The main build recipe.
build: clean
DOCKER_BUILDKIT=$(DOCKER_BUILDKIT) $(DOCKER) build \
--build-arg BRANCH_ENVIRONMENT=$(NODE_ENV) \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg VCS_URL=`git config --get remote.origin.url | sed 's#[email protected]:#https://github.com/#'` \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg GITHUB_ACTOR=`whoami` \
--build-arg GITHUB_REPOSITORY=`git config --get remote.origin.url` \
--build-arg GITHUB_SHA=`git rev-parse --short HEAD` \
. --file docker/Dockerfile --tag public.ecr.aws/unocha/${IMAGE_NAME}:${IMAGE_TAG} \
2>&1 | tee buildlog.txt
@echo "Built a shiny new public.ecr.aws/unocha/${IMAGE_NAME}:${IMAGE_TAG} for you."
clean:
rm -rf ./buildlog.txt
# Always build, never claim cache.
.PHONY: build