Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Set codegate version from build argument in container #615

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Jan 16, 2025

The codegate container does not run the python program via poetry, thus
it does not have the necessary package metadata to determine the
version.

To work around this lack of information, this enhancement leverages
Docker build arguments to set a special variable that will set the
version. This way, we don't need to rely on package metadata nor
manually bump the version. This machinery was set up in both the local
image building and in CI, so we'll get the version and a commit hash.

Sample output looks as follows:

image

The codegate container does not run the python program via poetry, thus
it does not have the necessary package metadata to determine the
version.

To work around this lack of information, this enhancement leverages
Docker build arguments to set a special variable that will set the
version. This way, we don't need to rely on package metadata nor
manually bump the version. This machinery was set up in both the local
image building and in CI, so we'll get the version and a commit hash.

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@JAORMX JAORMX merged commit e1b3b4c into stacklok:main Jan 16, 2025
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants