PR: https://github.com/openshift/ose/pull/1162
Have tested with ocp v3.9.22, met below error when do binary build for custom strategy: $ oc start-build ruby-sample-build --from-file=ruby-hello-world.zip --follow --wait --loglevel=5 Uploading file "ruby-hello-world.zip" as binary input for the build ... build "ruby-sample-build-7" started Could not access source url: F0417 16:58:01.171596 32348 helpers.go:119] error: the build wzheng2/ruby-sample-build-7 status is "Failed" oc get builds -n wzheng2 NAME TYPE FROM STATUS STARTED DURATION ruby-sample-build-2 Custom Binary Failed (GenericBuildFailed) About an hour ago 15s ruby-sample-build-3 Custom Binary Failed (GenericBuildFailed) About an hour ago 5s
Wenjing, what image did you use as your custom builder image? There is no source url because it's a binary build, so the logic in our sample custom builder which tries to access the source url will fail: https://github.com/openshift/origin/blob/master/images/builder/docker/custom-docker-builder/build.sh#L33 To do a binary build w/ a custom builder image, you need your custom builder's entrypoint script to do a "tar -xf -" to extract the incoming binary content (and then whatever logic you want to process the content). You can't use the sample custom builder image. I'm pretty sure we don't have any existing tests for this scenario.
OK, I will build a custom builder image to verify this bug. Thx for the info!
Verified with below steps on v3.9.22 1. Edit custom builder image Dockerfile like below: #CMD ["/tmp/build.sh"] ENTRYPOINT tar -xf - 2. docker build . -t custom-builder 3. Create a custom build with above customized builder image 4. git clone https://github.com/openshift/ruby-hello-world; tar -cf ruby-hello-world.tar.gz ruby-hello-world 5. $ oc start-build ruby-sample-build --from-file=ruby-hello-world.tar.gz --follow --wait --loglevel=5 Uploading file "ruby-hello-world.tar.gz" as binary input for the build ... build "ruby-sample-build-5" started build "ruby-sample-build-5" will go completed at last.
Per comment #6, have verified this bug.
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-2018:1566