Repository navigation
Add Binary build type, allow binary files to be used to trigger a build - #4819
Conversation
|
@csrwng if you can look at the refactors to build logs (so that I can share the wait code) as well as the package renames to make them consistent ( |
There was a problem hiding this comment.
why not? can't i supply some binary artifacts and some git source, together?
There was a problem hiding this comment.
In my head they are conflicting - if you really need that case you can tar
your git repo and binary push. That said, since at any time you can do a
binary build, you want to have a clear way to understand the impact. I
feel like if you provide a directory, it conflicts with something else
providing a dir. If you provide a file it doesn't conflict with a dir, and
vice versa. Layering requires order decisions, and that scares me.
On Sep 28, 2015, at 4:38 PM, Ben Parees [email protected] wrote:
In pkg/build/api/validation/validation.go
#4819 (comment):
allErrs = append(allErrs, validateDockerfile(*input.Dockerfile)...)}if input.Binary != nil {allErrs = append(allErrs, fielderrors.NewFieldInvalid("binary", "", "may not be set when type is Git"))}- case buildapi.BuildSourceBinary:
if input.Binary == nil {allErrs = append(allErrs, fielderrors.NewFieldRequired("binary"))} else {allErrs = append(allErrs, validateBinarySource(input.Binary).Prefix("binary")...)}if input.Dockerfile != nil {allErrs = append(allErrs, validateDockerfile(*input.Dockerfile)...)}if input.Git != nil {allErrs = append(allErrs, fielderrors.NewFieldInvalid("git", "", "may not be set when type is Binary"))
why not? can't i supply some binary artifacts and some git source, together?
—
Reply to this email directly or view it on GitHub
https://github.com/openshift/origin/pull/4819/files#r40559076.
There was a problem hiding this comment.
Layering requires order decisions, and that scares me.
except that you did sign up for layering with the separate Dockerfile + binarysource support. but yes in general i agree.
|
what happens when i clone a build created in this way? (oc start-build --from-build=previous_build)? what happens when i have an image change trigger associated with a build like this and it gets triggered? |
|
@smarterclayton do we need to have the build be the main process of the build pod? Could we not start a build watcher process and then simply exec with stdin into the pod once that's running? That wouldn't require any changes to exec. Same could apply to a running pod that we want to do a binary deploy to. |
|
Image change triggers and webhooks probably have to be disallowed in the On Sep 28, 2015, at 4:44 PM, Ben Parees [email protected] wrote: what happens when i clone a build created in this way? (oc start-build what happens when i have an image change trigger associated with a build — |
|
why wouldn't we do this with an intermediary fileserver that can run as infrastructure? that would also allow users to host artifacts on their own fileservers and reference them from a build. push flow would be:
this would allow build triggers to work as long as the artifact was uploaded at some point and allow for rebuilds. challenges are quota'ing the fileserver and tracking versions of uploaded artifacts so a rebuild gets the same version of the artifact, not a new one that has been uploaded since the build last ran, if those are deemed important. |
|
I don't know that we want to do binary deploys to running pods in general. Having a sidecar build is interesting, but it's not clear to me it's easier I don't like having two process when one works normally. On Sep 29, 2015, at 3:50 PM, Cesar Wong [email protected] wrote: @smarterclayton https://github.com/smarterclayton do we need to have the — |
|
On Sep 30, 2015, at 12:00 PM, Ben Parees [email protected] wrote: why wouldn't we do this with an intermediary fileserver that can run as That's a pull model. That's a URL source type with auth. Different that would also allow users to host artifacts on their own fileservers and push flow would be:
this would allow build triggers to work as long as the artifact was challenges are quota'ing the fileserver and tracking versions of uploaded And having an HA file server. It's basically a next step down the road - — |
There was a problem hiding this comment.
There is a subtle difference between doing this vs receiving straight from time.After in the select, mind documenting this so none will carelessly move it in the future?
93a3890 to
39b8cb8
Compare
|
@csrwng or @mfojtik can you review the changes in the STI commit? This avoids a fair amount of duplicate work, and for STI builds on OpenShift setup will be identical between Docker and STI inputs. Still some changes needed, like allowing source info to be passed in on the build vs. having to pull it from Git. |
39b8cb8 to
77f25f4
Compare
|
[test] |
|
continuous-integration/openshift-jenkins/test Running (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6145/) |
|
can you submit it as an s2i PR so we can just merge it there and do a bump here? |
|
+1 to what @bparees is saying |
|
The s2i changes aren't complete - I'd prefer to have you guys review in context of how they're being used before I split the review discussion. |
77f25f4 to
065a8e5
Compare
f0e8d98 to
71d918e
Compare
71d918e to
a706501
Compare
|
[merge] |
|
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/3764/) (Image: devenv-rhel7_2551) |
|
[test] |
0df6cb3 to
89b256a
Compare
Binary builds are driven by a client launching a build and then providing a binary input stream for the contents of the build. The build should accept either a file or archive (tar, tar.gz, or zip) and use the contents provided in place of normal source download. The primary REST endpoint is `/buildconfigs/<name>/instantiatebinary`, which creates a new build from a build config, accepts query parameters to populate a BinaryBuildRequestOptions object, then on POST creates the build, waits for it to be running, and attaches to STDIN and streams the provided input stream to the user. The start-build command is enhanced to support --from-dir, --from-file, and --from-repo, which load local directories or files, set source info (if available) onto the request, and then trigger the build by invoking the REST endpoint. The describers in the CLI have been enhanced to show info about binary builds.
Read input from STDIN, extract an archive with bsdtar, and then initiate the build. Avoid creating a temporary tar file in both STI and Docker and instead stream directly from disk.
|
Evaluated for origin test up to 89b256a |
|
Evaluated for origin merge up to 89b256a |
Merged by openshift-bot
|
Going to push one more fix to context for (we apparently don't test it in On Oct 24, 2015, at 5:22 PM, OpenShift Bot [email protected] wrote: — |
Expose /buildconfigs/foo/instantiatebinary which accepts a binary stream
and command line parameters, then attaches to the running builder and streams
input to STDIN. Builder unpacks that based on the binary type and the binary
settings.
@bparees @mfojtik @csrwng fyi, not working yet but close