Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1365440

Summary: Better to improve output warning when start build from a git repository via "oc start-build" without git installed
Product: OpenShift Container Platform Reporter: Dongbo Yan <dyan>
Component: ocAssignee: Cesar Wong <cewong>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, jokerman, mmccomas, tdawson, xtian
Target Milestone: ---   
Target Release: ---   
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: 2016-09-27 09:43:01 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 Dongbo Yan 2016-08-09 09:35:54 UTC
Description of problem:
When git is not installed in local, cannot start build from a git repository using "oc start-build --from-repo=" command.It's better to improve output warning.
 
Version-Release number of selected component (if applicable):
openshift v3.3.0.17
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

How reproducible:
Always

Steps to Reproduce:
1.Make sure git is not installed
 $ rpm -e --nodeps git
2.Clone a source code repo to localhost
 $ git clone https://github.com/openshift/ruby-hello-world
3.Create an application via "oc new-app"
 $ cd ruby-hello-world
 $ oc new-app .
4.Start new build
 $ oc start-build ruby-22-centos7 --from-repo=.

Actual results:
3.Will create a binary build
4.cannot start new build with error output
Uploading "." at commit "HEAD" as binary input for the build ...
error: the directory "." is not a valid Git repository: git binary not available

Expected results:
4.error output:
Git repository is valid, but please make sure git is installed. Git is required to work with git repositories

Additional info:

Comment 1 Cesar Wong 2016-08-12 22:04:18 UTC
PR https://github.com/openshift/origin/pull/10397

Comment 2 Troy Dawson 2016-08-18 16:32:55 UTC
This has been merged into ose and is in OSE v3.3.0.22 or newer.

Comment 4 Dongbo Yan 2016-08-19 11:02:47 UTC
Verified

$oc start-build ruby-22-centos7 --from-repo=.
error: cannot find git. Git is required to start a build from a repository. If git is not available, use --from-dir instead.

openshift v3.3.0.22
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

Comment 6 errata-xmlrpc 2016-09-27 09:43:01 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-2016:1933