https://github.com/binbashar/le-docker-leverage-toolbox
Docker image for https://github.com/binbashar/leverage
https://github.com/binbashar/le-docker-leverage-toolbox
Last synced: 3 months ago
JSON representation
Docker image for https://github.com/binbashar/leverage
- Host: GitHub
- URL: https://github.com/binbashar/le-docker-leverage-toolbox
- Owner: binbashar
- Created: 2022-08-10T13:10:31.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-05-15T20:01:46.000Z (about 1 year ago)
- Last Synced: 2025-05-15T21:23:04.564Z (about 1 year ago)
- Language: Shell
- Size: 291 KB
- Stars: 2
- Watchers: 10
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# le-docker-leverage















# Release Management
### CircleCi PR auto-release job
- ### 🚀 [**>> View Releases here <<**](https://github.com/binbashar/le-docker-leverage/releases) 🚀
- [**pipeline-job**](https://app.circleci.com/pipelines/github/binbashar/le-docker-leverage) (**NOTE:** Will only run after merged PR)
- [**changelog**](https://github.com/binbashar/le-docker-leverage/blob/master/CHANGELOG.md)
# 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:
- Image tag is composed of -
- The full name then is *binbash/leverage-toolbox:-*
- When bumping version (tag):
- If TOFU_VERSION has changed:
- LEVERAGE_TOOLBOX_IMAGE_VERSION = 0.0.1
- If TOFU_VERSION has not changed:
- LEVERAGE_TOOLBOX_IMAGE_VERSION is bumped (using semver as needed)
E.g., given image *binbash/leverage-toolbox:1.2.1-0.0.1*:
- We know it contains Terraform 1.2.1 and it is the first iteration for this toolbox set.
- If something other than Terraform is updated the LEVERAGE_TOOLBOX_IMAGE_VERSION is bumped, e.g.:
- *binbash/leverage-toolbox:1.2.1-0.0.2* or *binbash/leverage-toolbox:1.2.1-0.1.0* (these examples are a patch and a minor)
- If Terraform is updated then LEVERAGE_TOOLBOX_IMAGE_VERSION is reset and TOFU_VERSION is bumped accordingly to the Terraform version, e.g.:
- *binbash/leverage-toolbox:1.2.2-0.0.1* or *binbash/leverage-toolbox:1.3.0-0.0.1*
Another example, e.g., given image *binbash/leverage-toolbox:1.2.1-0.5.3*:
- We know it contains Terraform 1.2.1 and it is the iteration 0.5.3 for the toolbox set.
- If something other than Terraform is updated the LEVERAGE_TOOLBOX_IMAGE_VERSION is bumped, e.g.:
- *binbash/leverage-toolbox:1.2.1-0.5.4* or *binbash/leverage-toolbox:1.2.1-0.6.0* (these examples are a patch and a minor)
- If Terraform is updated then LEVERAGE_TOOLBOX_IMAGE_VERSION is reset and TOFU_VERSION is bumped accordingly to the Terraform version, e.g.:
- *binbash/leverage-toolbox:1.2.2-0.0.1* or *binbash/leverage-toolbox:1.3.0-0.0.1*
## Where to change it?
In the `Makefile`:
``` shell
# ###############################################################
# TOFU AND CLI VERSIONS #
# ###############################################################
# The LEVERAGE_CLI_TAG should be set per TOFU_TAG
# e.g. if you have TOFU 1.6.0 and LEVERAGE 0.0.1 and
# you update some script other that tofu in the image
# the LEVERAGE tag should be upgraded, let's say to 0.0.2
# But if then you update the tofu tag to 1.3.0 the
# LEVERAGE tag should be reset but used under this new
# tofu tag, e.g. 1.6.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
TOFU_TAG := 1.6.0
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
- 1. create your working branch
- 2. do your changes
- 3. if any of `Dockerfile`, `scripts/*` or `Makefile` were modified then bump the version
- 4. create a PR (add labels!)
- 5. merge the PR
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](https://hub.docker.com/r/binbash/leverage-toolbox/tags).
# Working locally
Requirements: some container engine up and running.
``` shell
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
- [TODO] [2022/08/25] Check CircleCI-Slack connection