forked from gmr/env-aws-params
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (30 loc) · 912 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
34
35
# Params for dev environment
APPLICATION_NAME = env-aws-params
PARAMS ?= --help
# Docker images
ECR_URL=746038518762.dkr.ecr.sa-east-1.amazonaws.com
DOCKER_LINTER_IMAGE=${ECR_URL}/docker-linter:latest
ROOT=$(shell pwd)
COMMITLINT_TARGET_BRANCH=origin/master
.PHONY: all
all: build
.PHONY: build
build:
@docker build \
--tag ${APPLICATION_NAME}:development \
--build-arg APPLICATION_NAME=${APPLICATION_NAME} .
@docker build \
--tag ${APPLICATION_NAME}-example:development \
--build-arg APPLICATION_NAME=${APPLICATION_NAME} \
--file Dockerfile.example .
.PHONY: run
run:
@docker run --rm ${APPLICATION_NAME}-example:development /app/${APPLICATION_NAME} ${PARAMS}
lint:
@docker pull ${DOCKER_LINTER_IMAGE}
@docker run --rm -v ${ROOT}:/app ${DOCKER_LINTER_IMAGE} " \
lint-commit ${COMMITLINT_TARGET_BRANCH} \
&& lint-dockerfile \
&& lint-markdown \
&& lint-shell-script \
&& lint-yaml"