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

Include OPENSHIFT_BUILD_NAME in version string #825

Open
jennydaman opened this issue Feb 3, 2023 · 1 comment
Open

Include OPENSHIFT_BUILD_NAME in version string #825

jennydaman opened this issue Feb 3, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jennydaman
Copy link
Collaborator

When building an image on OpenShift using s2i, the environment has a variable OPENSHIFT_BUILD_NAME which (if available) can be useful information to include in the version string.

The suffix of OPENSHIFT_BUILD_NAME is a monotonic counter indicating the build number, which might be preferable to the git history monotonic counter we're currently using:

"$(git rev-list --use-bitmap-index --count --merges version-0..HEAD)" \

  • git-history-based counter requires entire history to be pulled and git to be installed
  • environment variables are more portable, if we rethink the version string to depend on environment variables, we can maybe drop the dependency on bash
@jennydaman jennydaman added the enhancement New feature or request label Feb 3, 2023
@jennydaman
Copy link
Collaborator Author

OPENSHIFT_BUILD_COMMIT might also be a useful environment variable.

@jennydaman jennydaman changed the title Include OPENSHIFT_BUILD_NAME in print_version.sh Include OPENSHIFT_BUILD_NAME in version string Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant