Build and tag Docker images in a predictable way to facilite their usage.
Detailed Description
Tag the latest stable release with the version number (1.1.0)
Tag the latest stable release with the latest tag
Tag the head of the main branch with a short git commit hash (4b9e1af)
Tag the head of the main branch with the prerelease tag (edited)
Context
Currently the Docker image is built from main and tagged latest. This makes the image very unpredictable because it can change at any time.
This has produced issues in the past where a consumer of the Docker image had issues when a bad PR got merged. The image build was triggered and the latest image was replaced without a Parsons release.
Possible Implementation
Option 1: Keep the current Docker image system using Docker Hub. From my investigation I believe we won't be able to easily implement the "short git commit hash". This option is not available on Docker Hub
Based on what I've learned about Docker hub build this is the required setup to implement the tags we want with the exception of the short git commit hash tag.
Source Type
Source
Docker Tag
Dockerfile
Context
Build
Cache
Example
Branch
main
prerelease
Dockerfile
/
TRUE
TRUE
prerelease
Tag
/^[0-9.]+$/
latest
Dockerfile
/
TRUE
TRUE
latest
Tag
/^[0-9.]+$/
{sourceref}
Dockerfile
/
TRUE
TRUE
1.2.3
Option 2: Build and tag the image in the CI/CD pipeline. This is my preferred option because it will enable us to set all the tags we want.
Priority
I think this is a low priority feature because as far as I know there is only one consumer of the Docker image. One could argue that making the images more predictable might incentivize more people to use it but that's speculation.
Open Questions
Currently it looks like the project is using CicleCI for CI/CD but I recently say an issue that looks like the project is also using GitHub actions.
Should this be implemented in the existing Circle CI pipeline or on top of GitHub actions?
Build and tag Docker images in a predictable way to facilite their usage.
Detailed Description
1.1.0
)latest
tag4b9e1af
)prerelease
tag (edited)Context
Currently the Docker image is built from
main
and taggedlatest
. This makes the image very unpredictable because it can change at any time.This has produced issues in the past where a consumer of the Docker image had issues when a bad PR got merged. The image build was triggered and the
latest
image was replaced without a Parsons release.Possible Implementation
Option 1: Keep the current Docker image system using Docker Hub. From my investigation I believe we won't be able to easily implement the "short git commit hash". This option is not available on Docker Hub
Based on what I've learned about Docker hub build this is the required setup to implement the tags we want with the exception of the short git commit hash tag.
main
prerelease
Dockerfile
/
prerelease
/^[0-9.]+$/
latest
Dockerfile
/
latest
/^[0-9.]+$/
{sourceref}
Dockerfile
/
1.2.3
Option 2: Build and tag the image in the CI/CD pipeline. This is my preferred option because it will enable us to set all the tags we want.
Priority
I think this is a
low
priority feature because as far as I know there is only one consumer of the Docker image. One could argue that making the images more predictable might incentivize more people to use it but that's speculation.Open Questions
Currently it looks like the project is using CicleCI for CI/CD but I recently say an issue that looks like the project is also using GitHub actions.
Should this be implemented in the existing Circle CI pipeline or on top of GitHub actions?