Skip to content

Commit

Permalink
Refactoring makefile pipeline for building container image
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroc0d3 committed Aug 17, 2022
1 parent 32949b3 commit a7481ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,31 +91,31 @@ build-tf-infra:
@echo " Task : Create Container Image Terraform "
@echo " Date/Time : `date` "
@echo "=========================================================="
@cd ${PATH_DOCKER} && ./ecr-build.sh $(ARGS) alpine Dockerfile.alpine alpine-${ALPINE_VERSION} $(CI_PATH)
@cd ${PATH_DOCKER} && ./ecr-build.sh $(ARGS) alpine Dockerfile.alpine ${ALPINE_VERSION} $(CI_PATH)
@echo '- DONE -'

build-tf-alpine:
@echo "=========================================================="
@echo " Task : Create Container Image Terraform Alpine "
@echo " Date/Time : `date` "
@echo "=========================================================="
@cd ${PATH_DOCKER} && ./ecr-build.sh $(ARGS) alpine Dockerfile.alpine alpine-${ALPINE_VERSION} $(CI_PATH)
@cd ${PATH_DOCKER} && ./ecr-build.sh $(ARGS) alpine Dockerfile.alpine ${ALPINE_VERSION} $(CI_PATH)
@echo '- DONE -'

build-tf-ubuntu:
@echo "=========================================================="
@echo " Task : Create Container Image Terraform Ubuntu "
@echo " Date/Time : `date` "
@echo "=========================================================="
@cd ${PATH_DOCKER} && ./ecr-build.sh $(ARGS) ubuntu Dockerfile.ubuntu ubuntu-${UBUNTU_VERSION} $(CI_PATH)
@cd ${PATH_DOCKER} && ./ecr-build.sh $(ARGS) ubuntu Dockerfile.ubuntu ${UBUNTU_VERSION} $(CI_PATH)
@echo '- DONE -'

build-tf-codebuild:
@echo "=========================================================="
@echo " Task : Create Container Image Terraform CodeBuild "
@echo " Date/Time : `date` "
@echo "=========================================================="
@cd ${PATH_DOCKER} && ./ecr-build.sh $(ARGS) codebuild Dockerfile.codebuild codebuild-${CODEBUILD_VERSION} $(CI_PATH)
@cd ${PATH_DOCKER} && ./ecr-build.sh $(ARGS) codebuild Dockerfile.codebuild ${CODEBUILD_VERSION} $(CI_PATH)
@echo '- DONE -'

# ============================ #
Expand Down
6 changes: 3 additions & 3 deletions dockerhub-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ docker_build() {
}

main() {
# docker_build alpine Dockerfile.alpine devopscorner/terraform-infra
# docker_build ubuntu Dockerfile.ubuntu devopscorner/terraform-infra
# docker_build codebuild Dockerfile.codebuild devopscorner/terraform-infra
# docker_build alpine Dockerfile.alpine 3.16 devopscorner/terraform-infra
# docker_build ubuntu Dockerfile.ubuntu 22.04 devopscorner/terraform-infra
# docker_build codebuild Dockerfile.codebuild 4.0 devopscorner/terraform-infra
docker_build $1 $2 $3 $4
echo ''
echo '-- ALL DONE --'
Expand Down

0 comments on commit a7481ab

Please sign in to comment.