-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·37 lines (28 loc) · 1.06 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
29
30
31
32
33
34
35
36
37
include dockerfile-commons/Makefile
IMAGE_NAME=semenovp/tiny-elm
VCS_REF=$(shell git rev-parse --short HEAD)
.DEFAULT_GOAL := build
define test_image
$(call goss_docker_image,"$(IMAGE_NAME):$(1)","tests/$(2).yaml")
endef
.PHONY: test
test: ## Tests the the already built images.
@$(call test_image,latest,elm)
@$(call test_image,a-latest,elm-analyse)
@$(call test_image,t-latest,elm-test)
@$(call test_image,r-latest,elm-review)
define build_image
$(call build_docker_image,"$(IMAGE_NAME):$(1)","vcsref=\"$(VCS_REF)\" elmpackages=\"$(2)\"")
endef
.PHONY: build
build: lint-dockerfiles ## Builds all the images.
@$(call build_image,latest,)
@$(call build_image,t-latest,elm-test)
@$(call build_image,a-latest,elm-analyse)
@$(call build_image,r-latest,elm-review)
@$(call build_image,ta-latest,elm-test elm-analyse)
@$(call build_image,all-latest,elm-test elm-analyse elm-review)
.PHONY: clean
clean: clean-docker ## Cleans out the docker images built by 'make build'.
@(docker rmi $$(docker images -q $(IMAGE_NAME)) 2> /dev/null || true)
@docker system prune -f