-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add remote-build to allow cosa builds remotely using podman remote #2887
Conversation
Does this overlap at all with #2828 ? |
Yeah, I think we can make it. Looks the only thing we will need to do is slightly modify the manifest creation part to not use the #2828 has been there for a while though, is @rmohr still working on it? |
@ravanelli I am no longer working on this. If you can reuse anything from my open PRs, feel free to do so :) |
@rmohr Thanks! I will try to finish it 😃 |
@jlebon and @dustymabe As we discussed, the cosa build (build cosa and push to quay) part is in this PR, and the manifest creation in #2828. I used |
src/cmd-manifest
Outdated
run_cmd("podman --remote push %s:%s-%s" % (repo, arch, commit)) | ||
tags = run_cmd("podman search --list-tags %s" % (repo), "output") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use podman push --digestfile
here as we do in other places to ensure we get the returned digest reliably - a "push then inspect" flow is more racy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just double checked it, and --digestfile
doesn't work with podman remote according to the podman docs and my tests. I probably should add a comment about it there.
9d7801a
to
f189360
Compare
how about |
src/cmd-remote-build
Outdated
run_cmd("podman --remote build --tag %s:%s-%s -f %s" % (repo, arch, commit, file)) | ||
run_cmd("podman --remote push %s:%s-%s" % (repo, arch, commit)) | ||
|
||
# Podman remote doesn't allow push using digestfile. That's why the tag check is done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Podman remote doesn't allow push using digestfile. That's why the tag check is done
Is there an open issue/feature request for this? or is it documented somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about issue/features.
IMO what makes this useful is the remote and multi-arch parts of it, not really that it's building cosa. E.g. we could use this to build multi-arch images of How about |
This is a followup topic, but we should think here about how we could do tagged builds using this mechanism. i.e. |
I guess I could see that assuming it's generic enough (which it seems like it is). I'll counter you and propose EDIT: Also wonder if we should change |
This is just a thin wrapper around But now that I look more...what about dropping the We're effectively just creating a schema for build tag names on top of |
I'm supportive of a more verbose name (as @cgwalters suggests) but I'd still like it wrapped by |
To me, a key aspect of Now, there are some We can solve the discoverability problem by giving tools that don't operate on a cosa dir a different entrypoint name...though bike-shedding would be needed for that. Perhaps I've been noodling on an alternative entrypoint name in the context of #2685 too...the current strawman there was |
Of course also we do have today already alternative entrypoints in Anyways...don't get me wrong, I am not objecting to this PR. If we ship it as is, OK. But...I'd restate that we already have multiple entrypoints, and it makes more sense to me for things that have nothing to do with the "cosa dir" to have an entrypoint other than |
We didn't come to an agreement on the cmd name. I agree with @jlebon in using |
This is totally fine by me for the record! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments.
I think some of how this is used (i.e. how it's coordinated with the followup job that pushes the manifest) are still details that aren't 100% clear to me but I think we can get this in and then fixup anything else in a followup.
one thing I am interested in.. Can we squash these into one commit and add an empty line between the title and body of the commit? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - one suggestion
- cmd-remote-build-container allows cosa builds using podman remote Signed-off-by: Renata Ravanelli <rravanel@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - we can do later fixups in a followup if the workflow changes.
/retest |
2 similar comments
/retest |
/retest |
No description provided.