-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
49 lines (41 loc) · 1.04 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
38
39
40
41
42
43
44
45
46
47
48
49
.DEFAULT_GOAL := help
SHELL := /bin/bash
.PHONY: *
help:
echo "See Makefile for usage"
build:
echo "Building Tag: $(TAG)"
@docker build \
--no-cache \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
-t laratools/ci:$(TAG) \
-f Dockerfile-$(TAG) .
test:
echo "Testing Tag: $(TAG)"
dgoss run -it laratools/ci:$(TAG)
push:
echo "Pushing Tag: $(TAG)"; \
docker push laratools/ci:$(TAG); \
if [ "$(TAG)" = "7.4" ]; then \
docker tag laratools/ci:$(TAG) laratools/ci:7; \
docker push laratools/ci:7; \
fi
if [ "$(TAG)" = "8.0" ]; then \
docker tag laratools/ci:$(TAG) laratools/ci:8; \
docker tag laratools/ci:$(TAG) laratools/ci:latest; \
docker push laratools/ci:8; \
docker push laratools/ci:latest; \
fi
build-all:
make build TAG="7.4"
make build TAG="8.0"
test-all:
make test TAG="7.4"
make test TAG="8.0"
push-all:
make push TAG="7.4"
make push TAG="8.0"
clean:
docker ps -a -q | xargs docker rm -f
docker images -q | xargs docker rmi -f