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

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 <[email protected]>
@JAORMX JAORMX merged commit e1b3b4c into stacklok:main Jan 16, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants