Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hack/lib/build/version: Use BUILD_VERSION and SOURCE_GIT_COMMIT if no…
…n-empty Avoid: I0207 15:51:43.662541 1 builder.go:425] openshift-builder v4.3.0-202001211731+b93dcc9-dirty in 4.3.0 builder logs, which is from Git looking at the build directory and seeing: * The commit b93dcc9, which is in the dist-git repository, not in openshift/builder. The commit hash logged for 4.3.0 should have been: $ oc adm release info --commits quay.io/openshift-release-dev/ocp-release:4.3.0-x86_64 | grep builder docker-builder https://github.com/openshift/builder 50c6e17 * -dirty because Doozer is adjusting our Dockerfile? With this commit we pivot to BUILD_VERSION and SOURCE_GIT_COMMIT, set by Doozer since [1] and [2] respectively. If either is unset, we fall back to Git calls in the local repository. [1]: https://gitlab.cee.redhat.com/openshift-art/tools/doozer/commit/b02114a0bb26bbb7f60f1cc484c17fc3172c6df4 distgit.py: ART-165 add build ENV vars, 2019-07-07 [2]: https://gitlab.cee.redhat.com/openshift-art/tools/doozer/commit/204f92b328b28b696cf112444c1da797f8d57fd7 distgit: OS_GIT_COMMIT -> SOURCE_GIT_COMMIT, 2019-05-14
- Loading branch information