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

[BUG] GIT_COMMIT env var overriding command line option for update-image-reference #2002

Open
roleyfoley opened this issue May 26, 2022 · 1 comment
Labels

Comments

@roleyfoley
Copy link
Contributor

Current Behaviour

When running hamlet release update-image-reference with a -r flag set and the reference provided, if the env var GIT_COMMIT is defined this overrides the value set when using the -r flag

However this doesn't apply when running hamlet release upload-image with the -r flag set

Expected Behaviour

The command like flag should take precedence over all other values to ensure consistency in behaviour

Possible Solution

Find where GIT_COMMIT is used as part of the manageBuildReferences processing and make sure the command line option is preferred

Steps to Reproduce

  1. Using Jenkins upload an image using the command hamlet release upload-image -r "${GIT_COMMIT}_testing" -u -f spa --image-path
  2. After that run `hamlet release update-image-reference -r "${GIT_COMMIT}_testing" -u -f spa

In this scenario the first command will work, but the second command will fail saying that an image with the reference of the value of GIT_COMMIT doesn't exist

@roleyfoley roleyfoley added the bug label May 26, 2022
@roleyfoley
Copy link
Contributor Author

This is useful when you need to produce unique builds for each environment, such as working with React based SPA's which embed env var values set at build time. As a result of this you need to create a new image for each environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant