The container itself is what determines whether the image will be used
and what directory is it expecting to see WARs in

I *think* you need to do

$ mkdir deployments
$ mv .../sample.war deployments/
$ oc start-build --from-dir=.

Binary builds require you to launch start-build --from-X, otherwise
the build will wait forever for you to send it the binary.




On Wed, Mar 9, 2016 at 11:04 PM, Srinivas Naga Kotaru (skotaru)
<[email protected]> wrote:
> I think that is pretty desired feature. I can think multiple use cases, one 
> could by taking final artifacts from Jenkins builds.
>
> BTY, am still having issues. Am creating an application using template. This 
> time I mentioned sample.war and copied sample.war file to folder where am 
> running oc. Also copied same file to templates folder where my template 
> exist. In either cases build is failing
>
> "spec": {
>                 "source": {
>                    "type": "Binary",
>                     "binary": {
>                         "asFile": "sample.war"
>                     },
>                     "contextDir": "${CONTEXT_DIR}"
>
>
>
> # oc logs sales-dev-1-build                                              
> master  ✗ ✭ ✱
>
> I0309 22:58:52.610618       1 sti.go:173] The value of ALLOWED_UIDS is [1-]
> I0309 22:58:52.642387       1 docker.go:242] Pulling Docker image 
> registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2 ...
> I0309 22:58:59.932801       1 sti.go:195] Creating a new S2I builder with 
> build config: "Builder Name:\t\tJBoss EAP 6.4\nBuilder 
> Image:\t\tregistry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2\nSource:\t\t\tfile:///tmp/s2i-build632502898/upload/src\nContext
>  Directory:\t/Users/skotaru/lae3/build/ose-binary-builds\nOutput Image 
> Tag:\t172.30.238.173:5000/sales/sales-dev:latest\nEnvironment:\t\tOPENSHIFT_BUILD_NAME=sales-dev-1,OPENSHIFT_BUILD_NAMESPACE=sales\nIncremental
>  Build:\tdisabled\nRemove Old Build:\tdisabled\nBuilder Pull 
> Policy:\talways\nQuiet:\t\t\tdisabled\nLayered 
> Build:\t\tdisabled\nWorkdir:\t\t/tmp/s2i-build632502898\nDocker 
> NetworkMode:\tcontainer:05752cac5dbdce4a5f77d60ed23030dda17a9344aa904ec3c9786e231a858233\nDocker
>  Endpoint:\tunix:///var/run/docker.sock\n"
> I0309 22:58:59.932858       1 docker.go:242] Pulling Docker image 
> registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2 ...
> I0309 22:59:01.449811       1 sti.go:140] Preparing to build 
> 172.30.238.173:5000/sales/sales-dev:latest
> I0309 22:59:01.453593       1 source.go:151] Receiving source from STDIN as 
> file sample.war
> [ose-binary-builds]                                                           
>              master  ✗ ✭ ✱
> [ose-binary-builds]                                                           
>              master  ✗ ✭ ✱
> [ose-binary-builds] oc logs sales-dev-1-build -f                              
>              master  ✗ ✭ ✱
> I0309 22:58:52.610618       1 sti.go:173] The value of ALLOWED_UIDS is [1-]
> I0309 22:58:52.642387       1 docker.go:242] Pulling Docker image 
> registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2 ...
> I0309 22:58:59.932801       1 sti.go:195] Creating a new S2I builder with 
> build config: "Builder Name:\t\tJBoss EAP 6.4\nBuilder 
> Image:\t\tregistry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2\nSource:\t\t\tfile:///tmp/s2i-build632502898/upload/src\nContext
>  Directory:\t/Users/skotaru/lae3/build/ose-binary-builds\nOutput Image 
> Tag:\t172.30.238.173:5000/sales/sales-dev:latest\nEnvironment:\t\tOPENSHIFT_BUILD_NAME=sales-dev-1,OPENSHIFT_BUILD_NAMESPACE=sales\nIncremental
>  Build:\tdisabled\nRemove Old Build:\tdisabled\nBuilder Pull 
> Policy:\talways\nQuiet:\t\t\tdisabled\nLayered 
> Build:\t\tdisabled\nWorkdir:\t\t/tmp/s2i-build632502898\nDocker 
> NetworkMode:\tcontainer:05752cac5dbdce4a5f77d60ed23030dda17a9344aa904ec3c9786e231a858233\nDocker
>  Endpoint:\tunix:///var/run/docker.sock\n"
> I0309 22:58:59.932858       1 docker.go:242] Pulling Docker image 
> registry.access.redhat.com/jboss-eap-6/eap64-openshift:1.2 ...
> I0309 22:59:01.449811       1 sti.go:140] Preparing to build 
> 172.30.238.173:5000/sales/sales-dev:latest
> I0309 22:59:01.453593       1 source.go:151] Receiving source from STDIN as 
> file sample.war
>
>
>
> I think build is still expecting sample.war file from STDIN
>
>
> --
> Srinivas Kotaru
>
>
>
>
>
>
>
> On 3/9/16, 7:55 PM, "Clayton Coleman" <[email protected]> wrote:
>
>>No, binaries are passed directly to the build, we don't support
>>download from URL as a build source yet.
>>
>>On Wed, Mar 9, 2016 at 10:35 PM, Srinivas Naga Kotaru (skotaru)
>><[email protected]> wrote:
>>> Can we pass FQDN to fetch WAR file like below?
>>>
>>> "spec": {
>>>                 "source": {
>>>                    "type": "Binary",
>>>                     "binary": {
>>>                         "asFile":
>>> "https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/sample.war";
>>>                     },
>>>                     "contextDir": "${CONTEXT_DIR}”
>>>
>>>
>>> When I try it is failing …
>>>
>>> spec.source.binary.asFile: invalid value
>>> 'https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/sample.war',
>>> Details: file name may not contain slashes or relative path segments and
>>> must be a valid POSIX filename
>>>
>>> --
>>> Srinivas Kotaru
>>>
>>> _______________________________________________
>>> users mailing list
>>> [email protected]
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>

_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to