-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (22 loc) · 1.07 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
# This Makefile helps on building the production container image
# Author: Manuel Bernal Llinares <[email protected]>
# Environment
container_name = identifiersorg/http-to-https-redirector
tag_version = $(shell cat VERSION)
# Default target
all:
@echo "<===|DEVOPS|===> [WARNING] There is no 'default target'"
release: deploy
@echo "<===|DEVOPS|===> [RELEASE] New Software Release"
deploy: clean container_production_push
@echo "<===|DEVOPS|===> [DEPLOY] Deploying service container version ${tag_version}"
container_production_build:
@echo "<===|DEVOPS|===> [BUILD] Production container $(container_name):$(tag_version)"
@docker build -t $(container_name):$(tag_version) -t $(container_name):latest .
container_production_push: container_production_build
@echo "<===|DEVOPS|===> [PUBLISH]> Production container $(container_name):$(tag_version)"
@docker push $(container_name):$(tag_version)
@docker push $(container_name):latest
clean:
@echo "<===|DEVOPS|===> [CLEAN] Cleaning the space"
.PHONY: all clean container_production_build container_production_push deploy release