{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1124","repository_url":"https://api.github.com/repos/GoogleContainerTools/skaffold","labels_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1124/labels{/name}","comments_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1124/comments","events_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1124/events","html_url":"https://github.com/GoogleContainerTools/skaffold/issues/1124","id":367896172,"node_id":"MDU6SXNzdWUzNjc4OTYxNzI=","number":1124,"title":"Proposal: How to handle Jib build directly to registry.","user":{"login":"coollog","id":4852522,"node_id":"MDQ6VXNlcjQ4NTI1MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/4852522?v=4","gravatar_id":"","url":"https://api.github.com/users/coollog","html_url":"https://github.com/coollog","followers_url":"https://api.github.com/users/coollog/followers","following_url":"https://api.github.com/users/coollog/following{/other_user}","gists_url":"https://api.github.com/users/coollog/gists{/gist_id}","starred_url":"https://api.github.com/users/coollog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coollog/subscriptions","organizations_url":"https://api.github.com/users/coollog/orgs","repos_url":"https://api.github.com/users/coollog/repos","events_url":"https://api.github.com/users/coollog/events{/privacy}","received_events_url":"https://api.github.com/users/coollog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-08T18:03:14Z","updated_at":"2018-10-08T18:19:28Z","closed_at":null,"author_association":"MEMBER","body":"Currently, Jib can build to the Docker daemon and share the same logic as the rest of the `local` builders (`docker` and `bazel`):\r\n\r\n`local.go#buildArtifact` performs a series of steps for a build:\r\n\r\n1. `b.runBuildForArtifact` builds to the Docker daemon and gets the initial tag\r\n1. `docker.Digest` gets the digest for the initial tag from the Docker daemon\r\n1. `tagger.GenerateFullyQualifiedImageName` generates the intended tag\r\n1. `b.api.ImageTag` retags the initial tag to the intended tag\r\n1. if `push=true`, `docker.RunPush` pushes the intended tag\r\n\r\nHowever, 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 the `kaniko` builder works:\r\n\r\n1. Generate initial tag as random ID.\r\n1. Run `jib:build` to initial tag.\r\n1. `docker.RemoteDigest` to get the digest\r\n1. `tagger.GenerateFullyQualifiedImageName` to get the intended tag\r\n1. `docker.AddTag` to retag with intended tag\r\n\r\nThe original plan was the perform this logic when `local.push=true`, but we're proposing a new builder type `jib` (only supports `JibMavenArtifact` and `JibGradleArtifact`).\r\n\r\nTherefore, the following would be what users could do with the Jib artifacts:\r\n- `local` and `push=false` - `jib:dockerBuild` builds to Docker daemon\r\n- `local` and `push=true` - `jib:dockerBuild` builds to Docker daemon and then the image is pushed\r\n- `jib` - `jib:build` builds directly to the registry\r\n\r\nThe 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:\r\n- `local` and `push=false` - `jib:dockerBuild` builds to Docker daemon\r\n- `local` and `push=true` - `jib:build` builds directly to the registry\r\n\r\n@GoogleContainerTools/java-tools @GoogleContainerTools/container-tools "},"comment":{"url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/comments/427931924","html_url":"https://github.com/GoogleContainerTools/skaffold/issues/1124#issuecomment-427931924","issue_url":"https://api.github.com/repos/GoogleContainerTools/skaffold/issues/1124","id":427931924,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzkzMTkyNA==","user":{"login":"chanseokoh","id":10523105,"node_id":"MDQ6VXNlcjEwNTIzMTA1","avatar_url":"https://avatars2.githubusercontent.com/u/10523105?v=4","gravatar_id":"","url":"https://api.github.com/users/chanseokoh","html_url":"https://github.com/chanseokoh","followers_url":"https://api.github.com/users/chanseokoh/followers","following_url":"https://api.github.com/users/chanseokoh/following{/other_user}","gists_url":"https://api.github.com/users/chanseokoh/gists{/gist_id}","starred_url":"https://api.github.com/users/chanseokoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chanseokoh/subscriptions","organizations_url":"https://api.github.com/users/chanseokoh/orgs","repos_url":"https://api.github.com/users/chanseokoh/repos","events_url":"https://api.github.com/users/chanseokoh/events{/privacy}","received_events_url":"https://api.github.com/users/chanseokoh/received_events","type":"User","site_admin":false},"created_at":"2018-10-08T18:19:28Z","updated_at":"2018-10-08T18:19:28Z","author_association":"MEMBER","body":"It makes me to wonder what exactly this \"Jib artifact\" is? Is it tangible? Does it have a unique property that distinguish it form other types of artifacts?"}}
{"actor":{"display_login":"chanseokoh"}}