-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Proposal: How to handle Jib build directly to registry. #1124
Comments
It makes me wonder what exactly this "Jib artifact" is? Is it tangible? Does it have a unique property that distinguish it form other types of artifacts? |
The |
|
It is named like the other |
There is no clear agreement yet where we will be heading with the builders/artifacts - I believe it's a confusing situation. See: #953 and #955. I would not put this on the critical path for Jib yet. I think we should go with the jib builder as a local builder for now even if it's not the most optimal flow for jib yet and when we reshuffle the builder/artifact structure, we can rethink how a more optimal jib flow fits in. The artifact name is misleading I agree - it refers more to an "descriptor format" like Dockerfile for docker, or bazel files for bazel or pom.xml and build.gradle for jibMaven and jibGradle... |
I'm +1000 on just keeping the original approach based on In a project with multiple artifacts, we want a builder to be able to build all the artifacts. It's already not always the case. Let's not make it worth. I can see myself working on a backend in Java built with Jib and a front end in Node built with Docker |
@dgageot Do you mean keeping the original approach as in the current approach (as implemented) of:
Or the original "proposed" approach of:
|
The latter seems good to me |
Okay, for that approach, then, we would deviate from the normal local builder logic and perform the steps like the
|
I think it makes sense |
Currently, Jib can build to the Docker daemon and share the same logic as the rest of the
local
builders (docker
andbazel
):local.go#buildArtifact
performs a series of steps for a build:b.runBuildForArtifact
builds to the Docker daemon and gets the initial tagdocker.Digest
gets the digest for the initial tag from the Docker daemontagger.GenerateFullyQualifiedImageName
generates the intended tagb.api.ImageTag
retags the initial tag to the intended tagpush=true
,docker.RunPush
pushes the intended tagHowever, to leverage the full benefits of Jib, we would need to add the ability to call
jib:build
to build directly to the registry. The implementation logic would be very similar to how thekaniko
builder works:jib:build
to initial tag.docker.RemoteDigest
to get the digesttagger.GenerateFullyQualifiedImageName
to get the intended tagdocker.AddTag
to retag with intended tagThe original plan was the perform this logic when
local.push=true
, but we're proposing a new builder typejib
(only supportsJibMavenArtifact
andJibGradleArtifact
).Therefore, the following would be what users could do with the Jib artifacts:
local
andpush=false
-jib:dockerBuild
builds to Docker daemonlocal
andpush=true
-jib:dockerBuild
builds to Docker daemon and then the image is pushedjib
-jib:build
builds directly to the registryThe caveat, though, is that the
jib
builder would not support other artifact types. The alternative is to just keep the original approach, where users could do:local
andpush=false
-jib:dockerBuild
builds to Docker daemonlocal
andpush=true
-jib:build
builds directly to the registry@GoogleContainerTools/java-tools @GoogleContainerTools/container-tools
The text was updated successfully, but these errors were encountered: