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

feat(ko): Enable the ko builder in the API #6820

Merged
merged 1 commit into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/content/en/api/skaffold.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3022,10 +3022,11 @@
"BUILDPACKS",
"CUSTOM",
"KANIKO",
"DOCKER"
"DOCKER",
"KO"
],
"default": "UNKNOWN_BUILDER_TYPE",
"description": "Enum indicating builders used\n- UNKNOWN_BUILDER_TYPE: Could not determine builder type\n - JIB: JIB Builder\n - BAZEL: Bazel Builder\n - BUILDPACKS: Buildpacks Builder\n - CUSTOM: Custom Builder\n - KANIKO: Kaniko Builder\n - DOCKER: Docker Builder"
"description": "Enum indicating builders used\n- UNKNOWN_BUILDER_TYPE: Could not determine builder type\n - JIB: JIB Builder\n - BAZEL: Bazel Builder\n - BUILDPACKS: Buildpacks Builder\n - CUSTOM: Custom Builder\n - KANIKO: Kaniko Builder\n - DOCKER: Docker Builder\n - KO: Ko Builder"
},
"enumsClusterType": {
"type": "string",
Expand Down
1 change: 1 addition & 0 deletions docs/content/en/docs/references/api/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,7 @@ Enum indicating builders used
| CUSTOM | 4 | Custom Builder |
| KANIKO | 5 | Kaniko Builder |
| DOCKER | 6 | Docker Builder |
| KO | 7 | Ko Builder |



Expand Down
2 changes: 2 additions & 0 deletions pkg/skaffold/event/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ func getBuilders(b latestV1.BuildConfig) []*proto.BuildMetadata_ImageBuilder {
updateOrAddKey(m, proto.BuilderType_JIB)
case a.KanikoArtifact != nil:
updateOrAddKey(m, proto.BuilderType_KANIKO)
case a.KoArtifact != nil:
updateOrAddKey(m, proto.BuilderType_KO)
default:
updateOrAddKey(m, proto.BuilderType_UNKNOWN_BUILDER_TYPE)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/skaffold/event/v2/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ func getArtifacts(b latestV1.BuildConfig) []*proto.BuildMetadata_Artifact {
case a.KanikoArtifact != nil:
artifact.Type = proto.BuilderType_KANIKO
artifact.Dockerfile = a.KanikoArtifact.DockerfilePath
case a.KoArtifact != nil:
artifact.Type = proto.BuilderType_KO
default:
artifact.Type = proto.BuilderType_UNKNOWN_BUILDER_TYPE
}
Expand Down
1,078 changes: 541 additions & 537 deletions proto/enums/enums.pb.go

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion proto/enums/enums.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ enum BuilderType {
KANIKO = 5;
// Docker Builder
DOCKER = 6;
// Ko Builder
KO = 7;
}

// Enum indicating build type i.e. local, cluster vs GCB
Expand Down Expand Up @@ -673,7 +675,7 @@ enum SuggestionCode {
INSPECT_USE_ADD_BUILD_ENV = 801;
// Check profile flag value
INSPECT_CHECK_INPUT_PROFILE = 802;

// Open an issue so this situation can be diagnosed
OPEN_ISSUE = 900;

Expand Down
1 change: 1 addition & 0 deletions proto/v1/skaffold.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions proto/v2/skaffold.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.