Skip to content
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

Builders should build all artifact types #953

Closed
r2d4 opened this issue Sep 6, 2018 · 4 comments
Closed

Builders should build all artifact types #953

r2d4 opened this issue Sep 6, 2018 · 4 comments

Comments

@r2d4
Copy link
Contributor

r2d4 commented Sep 6, 2018

Currently some builder types (GCB, Local, Kaniko) are incompatible with artifact types (Bazel, Dockerfile, jib (soon)).

dockerfile bazel jib
local x x x
GCB x x
Kaniko x

How can GCB Support other builder types?
The generated cloud build YAML should use the skaffold docker image as the builder, which contains bazel and will soon contain jib.

The context tarball will be generated from the dependencies as normal (in the case of bazel, if the dependencies aren't exactly correct, we'll need to change this).

In addition, we can also upload the skaffold.yaml. The generated cloudbuild.yaml will run a skaffold run --builder=local inside the skaffold docker image, which will just build the same artifact types overriding the "builder type" using the local bazel or jib installation in the image.

How can Kaniko Support other builder types?

This would be the same strategy as GCB, but instead of creating a cloudbuild.yaml that uses the skaffold image and skaffold run inside the image, we would use kaniko in the "dockerfile" case, but generate a pod.yaml with skaffold for the bazel/jib case.

Essentially this would be the "on cluster" build strategy

@dlorenc
Copy link
Contributor

dlorenc commented Sep 6, 2018

I wonder if it would instead make sense to revisit the configuration schema to make the unsupported combinations impossible to specify.

One way to do that would be to nest artifact under build (or vice versa), and only allow the supported types to be specified.

Do we have any use cases for bazel/jib in GCB?

@balopat
Copy link
Contributor

balopat commented Sep 6, 2018

Nesting/restructuring is orthogonal to this. We can validate the config in its current form too.
Added #955 to discuss that further.

+1 on that validation could be a useful stop-gap until we make a combination supported. Added #954.

Whether to support GCB+bazel/jib and kaniko + bazel/jib I think we need more evidence, and this issue would be for collecting user feedback on it.

If users find these combinations interesting, please upvote, thumbs up here :)

@dlorenc
Copy link
Contributor

dlorenc commented Sep 7, 2018

Nesting/restructuring is orthogonal to this. We can validate the config in its current form too.
Added #955 to discuss that further.

Thanks for the explanation, that makes sense to me!

@dgageot
Copy link
Contributor

dgageot commented Jan 20, 2019

I'm going to close this one.

  • The issue to track Bazel support in GCB is here
  • Supporting non-Docker artifacts in Kaniko is a non-goal

@dgageot dgageot closed this as completed Jan 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants