Skip to content

Commit 8e918bd

Browse files
committed
Update version to 2.2
1 parent 3c483ce commit 8e918bd

File tree

3 files changed

+76
-31
lines changed

3 files changed

+76
-31
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
## Changelog GO App
22

3+
### version 2.2
4+
5+
- Add multiple container registry (DockerHub & ECR) deployment
6+
- Update Golang version 1.18 for Alpine 3.15 & Alpine 3.16 container
7+
- Refactoring makefile for added multiple container registry
8+
- Add documentation for build, tag & push container image to **DockerHub**, go to [this](docs/Container-Image-DockerHub.md) link
9+
- Add documentation for build, tag & push container to **Amazon ECR (Elastic Container Registry)**, go to [this](docs/Container-Image-ECR.md) link
10+
311
### version 2.1
12+
413
- Add Configuration Pipeline Synchronize for Mirroring Repository into AWS CodeCommit
514
- [GitHub Repository](.github/workflows/synchronize.yml)
615
- [GitLab Repository](.gitlab-ci.yml)
@@ -14,6 +23,7 @@
1423
![Azure DevSecOps Pipeline](docs/assets/gitops-devsecops-azure.png)
1524

1625
### version 2.0
26+
1727
- IAM Role sample for CodeBuild & CodePipeline
1828
- Buildspec CodePipeline for Build Container Image inside CodeBuild using Spesific CodeCommit
1929
- Buildspec CodePipeline for Deploy EKS Cluster inside CodeBuild using Spesific CodeCommit
@@ -24,6 +34,7 @@
2434
- Dynamic Tags with COMMIT_HASH
2535

2636
### version 1.0
37+
2738
- Golang API Rest (bookstore)
2839
- Postman Collection
2940
- Container Builder GO
@@ -32,6 +43,7 @@
3243
- Buildspec for AWS CodeBuild & AWS CodePipeline
3344

3445
### version 0.1
46+
3547
- First deployment GO Apps
3648
- Script build image
3749
- Script ecr-tag & ecr-push

Makefile

Lines changed: 46 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ IMAGE = $(CI_REGISTRY)/${CI_PROJECT_PATH}/${CI_PROJECT_NAME}
1818
DIR = $(shell pwd)
1919
VERSION ?= 1.5.0
2020

21-
BASE_IMAGE = alpine
22-
BASE_VERSION = 3.16
21+
export BASE_IMAGE=alpine
22+
export BASE_VERSION=3.16
23+
export ALPINE_VERSION=3.16
2324

2425
GO_APP ?= bookstore
2526
SOURCES = $(shell find . -name '*.go' | grep -v /vendor/)
@@ -79,41 +80,59 @@ git-clone:
7980
@echo " Task : Clone Repository Sources "
8081
@echo " Date/Time : `date`"
8182
@echo "================================================="
82-
@./git-clone.sh $(SOURCE) $(TARGET)
83+
@sh ./git-clone.sh $(SOURCE) $(TARGET)
8384
@echo '- DONE -'
8485

86+
# ========================== #
87+
# BUILD CONTAINER GO-APP #
88+
# ========================== #
89+
.PHONY: dockerhub-build-alpine ecr-build-alpine
90+
dockerhub-build-alpine:
91+
@echo "========================================================"
92+
@echo " Task : Create Container GO-APP Alpine Image "
93+
@echo " Date/Time : `date`"
94+
@echo "========================================================"
95+
@sh ./dockerhub-build.sh alpine Dockerfile ${ALPINE_VERSION}
96+
97+
ecr-build-alpine:
98+
@echo "========================================================"
99+
@echo " Task : Create Container GO-APP Alpine Image "
100+
@echo " Date/Time : `date`"
101+
@echo "========================================================"
102+
@sh ./ecr-build.sh $(ARGS) alpine Dockerfile ${ALPINE_VERSION}
103+
85104
# ========================= #
86-
# BUILD CONTAINER CI/CD #
105+
# TAGS CONTAINER GO-APP #
87106
# ========================= #
88-
.PHONY: ecr-build-alpine
89-
ecr-build-alpine:
90-
@echo "================================================="
91-
@echo " Task : Create Container CI/CD Alpine Image "
107+
.PHONY: tag-dockerhub-alpine tag-ecr-alpine
108+
dockerhub-tag-alpine:
109+
@echo "========================================================"
110+
@echo " Task : Set Tags Image Alpine to DockerHub"
92111
@echo " Date/Time : `date`"
93-
@echo "================================================="
94-
@cd ${PATH_DOCKER} && ./ecr-build-alpine.sh $(ARGS) $(CI_PATH)
95-
@echo '- DONE -'
112+
@echo "========================================================"
113+
@sh ./dockerhub-tag.sh alpine ${ALPINE_VERSION}
96114

97-
# ======================== #
98-
# TAGS CONTAINER CI/CD #
99-
# ======================== #
100-
.PHONY: ecr-tag-alpine
101115
ecr-tag-alpine:
102-
@echo "================================================="
116+
@echo "========================================================"
103117
@echo " Task : Set Tags Image Alpine to ECR"
104118
@echo " Date/Time : `date`"
105-
@echo "================================================="
106-
@cd ${PATH_DOCKER} && ./ecr-tag-alpine.sh $(ARGS) $(CI_PATH)
107-
@echo '- DONE -'
119+
@echo "========================================================"
120+
@sh ./ecr-tag.sh $(ARGS) alpine ${ALPINE_VERSION} $(CI_PATH)
121+
122+
# ========================= #
123+
# PUSH CONTAINER GO-APP #
124+
# ========================= #
125+
.PHONY: dockerhub-push-alpine ecr-push-alpine
126+
dockerhub-push-alpine:
127+
@echo "========================================================"
128+
@echo " Task : Push Image Alpine to DockerHub"
129+
@echo " Date/Time : `date`"
130+
@echo "========================================================"
131+
@sh ./dockerhub-push.sh alpine $(CI_PATH)
108132

109-
# ======================== #
110-
# PUSH CONTAINER CI/CD #
111-
# ======================== #
112-
.PHONY: ecr-push-alpine
113133
ecr-push-alpine:
114-
@echo "================================================="
134+
@echo "========================================================"
115135
@echo " Task : Push Image Alpine to ECR"
116136
@echo " Date/Time : `date`"
117-
@echo "================================================="
118-
@cd ${PATH_DOCKER} && ./ecr-push-alpine.sh $(ARGS) $(TAGS)
119-
@echo '- DONE -'
137+
@echo "========================================================"
138+
@sh ./ecr-push.sh $(ARGS) alpine $(CI_PATH)

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ Kubernetes Deployment for Simple Golang API
66
![all contributors](https://img.shields.io/github/contributors/devopscorner/golang-deployment)
77
![tags](https://img.shields.io/github/v/tag/devopscorner/golang-deployment?sort=semver)
88
[![docker pulls](https://img.shields.io/docker/pulls/devopscorner/bookstore.svg)](https://hub.docker.com/r/devopscorner/bookstore/)
9-
[![docker image size](https://img.shields.io/docker/image-size/devopscorner/bookstore.svg?sort=date)](https://hub.docker.com/r/devopscorner/bookstore/)
109
![download all](https://img.shields.io/github/downloads/devopscorner/golang-deployment/total.svg)
11-
![download latest](https://img.shields.io/github/downloads/devopscorner/golang-deployment/2.1/total)
10+
![download latest](https://img.shields.io/github/downloads/devopscorner/golang-deployment/2.2/total)
1211
![view](https://views.whatilearened.today/views/github/devopscorner/golang-deployment.svg)
1312
![clone](https://img.shields.io/badge/dynamic/json?color=success&label=clone&query=count&url=https://github.com/devopscorner/golang-deployment/blob/master/clone.json?raw=True&logo=github)
1413
![issues](https://img.shields.io/github/issues/devopscorner/golang-deployment)
@@ -17,9 +16,24 @@ Kubernetes Deployment for Simple Golang API
1716
![stars](https://img.shields.io/github/stars/devopscorner/golang-deployment)
1817
[![license](https://img.shields.io/github/license/devopscorner/golang-deployment)](https://img.shields.io/github/license/devopscorner/golang-deployment)
1918

20-
## Workflow
19+
## Available Tags
2120

22-
- Documentation workflow (reproduce step) of this ci/cd pipeline, go to [this](WORKFLOW.md) link
21+
### Alpine
22+
23+
| Image name | Size |
24+
|------------|------|
25+
| `devopscorner/bookstore:latest` | [![docker image size](https://img.shields.io/docker/image-size/devopscorner/bookstore/latest.svg?label=Image%20size&logo=docker)](https://hub.docker.com/repository/docker/devopscorner/bookstore/tags?page=1&ordering=last_updated&name=latest) |
26+
| `devopscorner/bookstore:alpine` | [![docker image size](https://img.shields.io/docker/image-size/devopscorner/bookstore/alpine.svg?label=Image%20size&logo=docker)](https://hub.docker.com/repository/docker/devopscorner/bookstore/tags?page=1&ordering=last_updated&name=alpine) |
27+
| `devopscorner/bookstore:alpine-latest` | [![docker image size](https://img.shields.io/docker/image-size/devopscorner/bookstore/alpine-latest.svg?label=Image%20size&logo=docker)](https://hub.docker.com/repository/docker/devopscorner/bookstore/tags?page=1&ordering=last_updated&name=alpine-latest) |
28+
| `devopscorner/bookstore:alpine-3.15` | [![docker image size](https://img.shields.io/docker/image-size/devopscorner/bookstore/alpine-3.15.svg?label=Image%20size&logo=docker)](https://hub.docker.com/repository/docker/devopscorner/bookstore/tags?page=1&ordering=last_updated&name=alpine-3.15) |
29+
| `devopscorner/bookstore:go1.18-alpine3.15` | [![docker image size](https://img.shields.io/docker/image-size/devopscorner/bookstore/go1.18-alpine3.15.svg?label=Image%20size&logo=docker)](https://hub.docker.com/repository/docker/devopscorner/bookstore/tags?page=1&ordering=last_updated&name=go1.18-alpine3.15) |
30+
| `devopscorner/bookstore:alpine-3.16` | [![docker image size](https://img.shields.io/docker/image-size/devopscorner/bookstore/alpine-3.15.svg?label=Image%20size&logo=docker)](https://hub.docker.com/repository/docker/devopscorner/bookstore/tags?page=1&ordering=last_updated&name=alpine-3.16) |
31+
| `devopscorner/bookstore:go1.18-alpine3.16` | [![docker image size](https://img.shields.io/docker/image-size/devopscorner/bookstore/go1.18-alpine3.16.svg?label=Image%20size&logo=docker)](https://hub.docker.com/repository/docker/devopscorner/bookstore/tags?page=1&ordering=last_updated&name=go1.18-alpine3.16) |
32+
33+
## Documentation
34+
35+
- Build, Tag & Push container image to **DockerHub**, go to [this](docs/Container-Image-DockerHub.md) link
36+
- Build, Tag & Push container image to **Amazon ECR (Elastic Container Registry)**, go to [this](docs/Container-Image-ECR.md) link
2337

2438
## Development
2539

0 commit comments

Comments
 (0)