Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
docker-makefile-sample
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sample
docker-makefile-sample
Commits
2404fe17
Commit
2404fe17
authored
Oct 16, 2019
by
Chavee Issariyapat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Makefile
parent
954fa72d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
Makefile
+13
-11
No files found.
Makefile
View file @
2404fe17
# a helper shell script
# a helper shell script
MAKE_VERSION
=
1.1.
6
MAKE_VERSION
=
1.1.
7
define
MAKEFUNCTIONCODE
define
MAKEFUNCTIONCODE
function
hasChanges()
{
function
hasChanges()
{
...
@@ -121,18 +121,19 @@ ifeq (deploy,$(firstword $(MAKECMDGOALS)))
...
@@ -121,18 +121,19 @@ ifeq (deploy,$(firstword $(MAKECMDGOALS)))
endif
endif
ifdef
doit
ifdef
doit
# use the rest as arguments for "make xxx"
# use the rest as arguments for "make xxx"
CMD_ARGS
:=
$
(
wordlist 2,
$
(
words
$(MAKECMDGOALS)
)
,
$(MAKECMDGOALS)
)
#
CMD_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
# ...and turn them into do-nothing targets
$(eval $(CMD_ARGS)
:
;@:)
#$(eval $(CMD_ARGS):;@:)
DEPLOYARG
=
-n
$(n)
--context
=
$(c)
endif
endif
ifeq
($(CMD_ARGS),)
#
ifeq ($(CMD_ARGS),)
else
#
else
EMPTY
=
#
EMPTY=
SPACE
=
$(EMPTY)
$(EMPTY)
#
SPACE=$(EMPTY) $(EMPTY)
TDARG
=
$
(
subst
$(SPACE)
,
--context
=
,
$(CMD_ARGS)
)
#
TDARG = $(subst $(SPACE), --context=,$(CMD_ARGS))
DARG
=
-n
$(TDARG)
#
DARG = -n $(TDARG)
endif
#
endif
.PHONY
:
pre-build docker-build post-build build release patch-release minor-release major-release tag check-status check-release showtag show-tag
\
.PHONY
:
pre-build docker-build post-build build release patch-release minor-release major-release tag check-status check-release showtag show-tag
\
...
@@ -251,4 +252,5 @@ env-snippet:
...
@@ -251,4 +252,5 @@ env-snippet:
@
rm env-snippet-nexpieconfig.yaml
@
rm env-snippet-nexpieconfig.yaml
deploy
:
init release.conf
deploy
:
init release.conf
@
cat
k8s/deployment.yaml | sed
"s/{{IMAGE_TAG}}/
$(VERSION)
/g"
| kubectl apply
-f
-
$(DARG)
@
cat
k8s/deployment.yaml | sed
"s/{{IMAGE_TAG}}/
$(VERSION)
/g"
| kubectl apply
-f
-
$(DEPLOYARG)
#@ cat k8s/deployment.yaml | sed "s/{{IMAGE_TAG}}/
$(VERSION)
/g
" | kubectl apply -f -
$(DARG)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment