Bug 1732941

Summary: oc build requires git checkout, but we have tar ball
Product: OpenShift Container Platform Reporter: Eric Paris <eparis>
Component: ocAssignee: Tomáš Nožička <tnozicka>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: aos-bugs, jokerman, mfojtik, tnozicka
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-16 06:33:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eric Paris 2019-07-24 19:18:07 UTC
https://github.com/openshift/oc/blob/master/Makefile#L6-L7 namely:

github.com/openshift/oc/vendor/k8s.io/kubernetes/pkg/version.gitVersion="v1.14.0+724e12f93f"

github.com/openshift/oc/vendor/k8s.io/kubernetes/pkg/version.gitCommit="$(shell git rev-parse --short "HEAD^{commit}" 2>/dev/null)" \

are problematic. The first line, I think depends on the second line. The other problem is that when we do official builds the git commit is set via an env var, because we are building from a tar file, not from a git tree. So we need a way to overwrite...

Comment 1 Tomáš Nožička 2019-07-25 08:23:58 UTC
you are right - line 7 should support env var for ART build (we have already made such changes in the shared build system for regular package version).

The line 6 is hardcoded to the rebase of kube, we wan't to parse it from glide/go mod next time

Comment 2 Tomáš Nožička 2019-07-29 07:59:26 UTC
https://github.com/openshift/oc/pull/31

Comment 4 errata-xmlrpc 2019-10-16 06:33:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2922