File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ stages :
2
+ - build
3
+
4
+ build-push-master :
5
+ stage : build
6
+ script :
7
+ - make build
8
+ - make push
9
+ only :
10
+ refs :
11
+ - master
12
+
13
+ build-push-tag :
14
+ stage : build
15
+ script :
16
+ - make build-tag
17
+ - make push-tag
18
+ only :
19
+ - tags
Original file line number Diff line number Diff line change
1
+ .PHONY : help build build-tag push
2
+ .DEFAULT_GOAL: = help
3
+ .ONESHELL :
4
+
5
+ DOCKER_IMAGE = gpii/couchdb-statefulset-assembler
6
+
7
+ help : # # Prints list of tasks
8
+ @awk ' BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' Makefile
9
+
10
+ build : # # Build image as latest
11
+ docker build -t " ${DOCKER_IMAGE} :latest" ./
12
+
13
+ build-tag : # # Build image as tag (use CI_COMMIT_TAG env var)
14
+ @CI_COMMIT_TAG=" $$ {CI_COMMIT_TAG:?Required variable not set}"
15
+ docker build -t " ${DOCKER_IMAGE} :${CI_COMMIT_TAG} " ./
16
+
17
+ push : # # Push image - latest
18
+ docker push " ${DOCKER_IMAGE} :latest"
19
+
20
+ push-tag : # # Push image - tag
21
+ @CI_COMMIT_TAG=" $$ {CI_COMMIT_TAG:?Required variable not set}"
22
+ docker push " ${DOCKER_IMAGE} :${CI_COMMIT_TAG} "
You can’t perform that action at this time.
0 commit comments