Bug 1312477 - oc new-build --binary always creates docker type build
Summary: oc new-build --binary always creates docker type build
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Build
Version: 3.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Cesar Wong
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-26 19:52 UTC by Ben Parees
Modified: 2016-05-12 17:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 17:16:17 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Ben Parees 2016-02-26 19:52:49 UTC
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 06:06:21 UTC
(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 13:54:58 UTC
> 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-02 00:52:15 UTC
Fixed with https://github.com/openshift/origin/pull/7702

Comment 4 Wang Haoran 2016-03-02 03:04:04 UTC
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 05:18:54 UTC
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.