File tree Expand file tree Collapse file tree 3 files changed +71
-0
lines changed Expand file tree Collapse file tree 3 files changed +71
-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} "
Original file line number Diff line number Diff line change @@ -11,3 +11,33 @@ cluster is automically joined up.
11
11
If the deployment is scaled * up* after the initial creation those new Pods will
12
12
be automatically added. Scaling * down* does not automatically remove the Pods
13
13
from the membership database at this time.
14
+
15
+ ## Building
16
+
17
+ ### Master
18
+
19
+ On push/merge to master, CI will automatically build and push
20
+ ` gpii/couchdb-statefulset-assembler:latest ` image.
21
+
22
+ ### Tags
23
+
24
+ Create and push git tag and CI will build and publish corresponding ` gpii/couchdb-statefulset-assembler:${git_tag} ` docker image.
25
+
26
+ #### Tag format
27
+
28
+ Tags should follow actual couchdb-statefulset-assembler version, suffixed by
29
+ ` -gpii.${gpii_build_number} ` , where ` gpii_build_number ` is monotonically
30
+ increasing number denoting Docker image build number, starting from ` 0 `
31
+ for each upstream version.
32
+
33
+ Example:
34
+ ```
35
+ 0.0.3-gpii.0
36
+ 0.0.3-gpii.1
37
+ ...
38
+ 0.0.4-gpii.0
39
+ ```
40
+
41
+ ### Manually
42
+
43
+ Run ` make ` to see all available steps.
You can’t perform that action at this time.
0 commit comments