Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Standardize Docker image build #862

Open
gcollazo opened this issue Aug 3, 2023 · 1 comment
Open

[Feature] Standardize Docker image build #862

gcollazo opened this issue Aug 3, 2023 · 1 comment
Labels
enhancement Impact - something should be added to or changed about Parsons that isn't causing a current breakage low priority Priority - this is a nice-to-have, is non-urgent, and/or has a minor overall imapact on Parsons testing Work type - writing or changing code tests for core Parsons features or Parsons connectors

Comments

@gcollazo
Copy link
Contributor

gcollazo commented Aug 3, 2023

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?

@gcollazo gcollazo added the enhancement Impact - something should be added to or changed about Parsons that isn't causing a current breakage label Aug 3, 2023
@gcollazo
Copy link
Contributor Author

gcollazo commented Aug 3, 2023

We should wait for #858 to be merged before tackling this.

@shaunagm shaunagm added low priority Priority - this is a nice-to-have, is non-urgent, and/or has a minor overall imapact on Parsons testing Work type - writing or changing code tests for core Parsons features or Parsons connectors labels Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Impact - something should be added to or changed about Parsons that isn't causing a current breakage low priority Priority - this is a nice-to-have, is non-urgent, and/or has a minor overall imapact on Parsons testing Work type - writing or changing code tests for core Parsons features or Parsons connectors
Projects
None yet
Development

No branches or pull requests

2 participants