binbashar / le-docker-leverage-toolbox

Docker image for https://github.com/binbashar/leverage
3 stars 0 forks source link
drawing

le-docker-leverage

GitHub GitHub language count GitHub top language GitHub repo size GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests GitHub release GitHub Release Date GitHub contributors

GitHub followers GitHub forks GitHub stars GitHub watchers

Release Management

CircleCi PR auto-release job

leverage-circleci

Version bumping process

This process will be automated in the furure.

For now is manual, but there is a check, when image built is requested, verifying whether or not the version was bumped.

Container image tagging or versioning process is as follows:

E.g., given image binbash/leverage-toolbox:1.2.1-0.0.1:

Another example, e.g., given image binbash/leverage-toolbox:1.2.1-0.5.3:

Where to change it?

In the Makefile:

# ###############################################################
# TERRAFORM AND CLI VERSIONS                                    #
# ###############################################################
# The LEVERAGE_CLI_TAG should be set per TERRAFORM_TAG
# e.g. if you have TERRA 1.2.1 and LEVERAGE 0.0.1 and
# you update some script other that terraform in the image
# the LEVERAGE tag should be upgraded, let's say tp 0.0.2
# But if then you update the terraform tag to 1.3.0 the
# LEVERAGE tag should be resetted to bu used under this new
# terraform tag, e.g. 1.3.0 and 0.0.1
# The resulting images should be:
# 1.2.1-0.0.1
# 1.2.1-0.0.2
# 1.3.0-0.0.1
TERRAFORM_TAG    := 1.2.7
LEVERAGE_CLI_TAG := 0.0.2

NOTE In any case, as a rule of thumb no version (tag) has to be pushed into the image repository if it already exists there.

Dev and Deploy

The container image components are, basically, the Dockerfile and the scripts/*.

Then, there is a Makefile and a few other configuration files for tools.

Note for an image to be built the version (a.k.a. the image tag) has to change!

Pipelines

CircleCi pipelines are being used.

There are two basic pipelines: SumoLogic tests and BuildDeploy.

The first one will be triggered in any modification.

The second one, will be only when Dockerfile, scripts/* or Makefile are changed.

Basic Procedure

If none of the files listed in 3 were modified (e.g. only README.md changed), the PR can be merged and no image will be deployed.

Finally the image can be found here.

Working locally

Requirements: some container engine up and running.

git clone git@github.com:binbashar/le-docker-leverage-toolbox.git
cd le-docker-leverage-toolbox
make init-makefiles
# only for building the image
make build-local
# or just for testing
make test-local

TODO List