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

hack/lib/build/version: Use BUILD_VERSION and SOURCE_GIT_COMMIT if non-empty #133

Merged
merged 1 commit into from Feb 25, 2020

Conversation

wking
Copy link
Member

@wking wking commented Feb 16, 2020

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    50c6e17276dfc7d0acd9d943dac340fb4fa3ff24
  • -dirty because Doozer is adjusting our Dockerfile?

With this commit we pivot to BUILD_VERSION and SOURCE_GIT_COMMIT, set by Doozer since here and here respectively (internal Red Hat links; sorry external folks). If either is unset, we fall back to Git calls in the local repository.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 16, 2020
…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
Copy link
Contributor

@adambkaplan adambkaplan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 24, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adambkaplan, wking

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 24, 2020
@adambkaplan
Copy link
Contributor

/cherrypick release-4.4

@openshift-cherrypick-robot

@adambkaplan: once the present PR merges, I will cherry-pick it on top of release-4.4 in a new PR and assign it to you.

In response to this:

/cherrypick release-4.4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-cherrypick-robot

@adambkaplan: new pull request created: #139

In response to this:

/cherrypick release-4.4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants