Bug 1312477 - oc new-build --binary always creates docker type build
oc new-build --binary always creates docker type build
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Build (Show other bugs)
3.x
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Cesar Wong
Wenjing Zheng
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-26 14:52 EST by Ben Parees
Modified: 2016-05-12 13:16 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-05-12 13:16:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ben Parees 2016-02-26 14:52:49 EST
Description of problem:

oc new-build --binary <some s2i imagestream> should create a source type build(because the image is a builder), but it creates a docker type build instead.

you can't specify --strategy because that requires you also specify source, and you can't specify source with a binary build.


oc new-build --binary should create a docker or s2i type build as appropriate based on the image type (since it can't check the repo like it normally would)
Comment 1 Wang Haoran 2016-02-29 01:06:21 EST
(In reply to Ben Parees from comment #0)
> Description of problem:
> 
> oc new-build --binary <some s2i imagestream> should create a source type
> build(because the image is a builder), but it creates a docker type build
> instead.
> 
> you can't specify --strategy because that requires you also specify source,
> and you can't specify source with a binary build.
> 
> 
> oc new-build --binary should create a docker or s2i type build as
> appropriate based on the image type (since it can't check the repo like it
> normally would)
Does this mean if the image is a builder image will create a s2i build type,and for normal image, will create a docker build type ?
Comment 2 Ben Parees 2016-02-29 08:54:58 EST
> Does this mean if the image is a builder image will create a s2i build type,and > for normal image, will create a docker build type ?

by default yes (though we may only detect that for imagestreams.  detecting it for raw docker images is harder), but regardless the user should also be able to override the behavior with --strategy
Comment 3 Cesar Wong 2016-03-01 19:52:15 EST
Fixed with https://github.com/openshift/origin/pull/7702
Comment 4 Wang Haoran 2016-03-01 22:04:04 EST
verified against origin,update the status to modified.
steps:
#oc new-build --binary ruby
#oc new-build --binary registry.access.redhat.com/rhscl/ruby-22-rhel7:latest -n haowang --to=haowang/ruby22test
#oc new-build --binary registry.access.redhat.com/rhscl/ruby-22-rhel7:latest -n haowang --to=haowang/ruby22test1 --strategy=docker
[root@ip-172-18-8-159 origin]# oc get bc
NAME          TYPE      FROM      LATEST
ruby          Source    Binary    0
ruby22test    Source    Binary    0
ruby22test1   Docker    Binary    0
Comment 5 Wang Haoran 2016-03-02 00:18:54 EST
As bug is against the origin ,mark verified.

Note You need to log in before you can comment on or make changes to this bug.