diff --git a/.gitignore b/.gitignore index b259f2fae0f..3781536afed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ out/ examples/bazel/bazel-* integration/examples/bazel/bazel-* -integration/examples/test-plugin/local/bazel/bazel-* +integration/testdata/plugin/local/bazel/bazel-* *.new .idea/ docs/.firebase diff --git a/docs/content/en/schemas/v1beta6.json b/docs/content/en/schemas/v1beta6.json index 14906e68769..cdc96da81c4 100755 --- a/docs/content/en/schemas/v1beta6.json +++ b/docs/content/en/schemas/v1beta6.json @@ -1042,12 +1042,6 @@ "x-intellij-html-description": "should build dependencies be skipped.", "default": "false" }, - "useHelmSecrets": { - "type": "boolean", - "description": "instructs skaffold to use secrets plugin on deployment.", - "x-intellij-html-description": "instructs skaffold to use secrets plugin on deployment.", - "default": "false" - }, "values": { "additionalProperties": { "type": "string" @@ -1090,7 +1084,6 @@ "wait", "recreatePods", "skipBuildDependencies", - "useHelmSecrets", "overrides", "packaged", "imageStrategy" diff --git a/docs/content/en/schemas/v1beta7.json b/docs/content/en/schemas/v1beta7.json index ad789defb44..9670b6dd27c 100755 --- a/docs/content/en/schemas/v1beta7.json +++ b/docs/content/en/schemas/v1beta7.json @@ -1042,6 +1042,12 @@ "x-intellij-html-description": "should build dependencies be skipped.", "default": "false" }, + "useHelmSecrets": { + "type": "boolean", + "description": "instructs skaffold to use secrets plugin on deployment.", + "x-intellij-html-description": "instructs skaffold to use secrets plugin on deployment.", + "default": "false" + }, "values": { "additionalProperties": { "type": "string" @@ -1084,6 +1090,7 @@ "wait", "recreatePods", "skipBuildDependencies", + "useHelmSecrets", "overrides", "packaged", "imageStrategy" diff --git a/pkg/skaffold/build/local/bazel.go b/pkg/skaffold/build/local/bazel.go index 62b523568dd..cc63253c949 100644 --- a/pkg/skaffold/build/local/bazel.go +++ b/pkg/skaffold/build/local/bazel.go @@ -18,136 +18,24 @@ package local import ( "context" - "fmt" "io" - "net/http" - "os" - "os/exec" - "path/filepath" - "strings" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/plugin/builders/bazel" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" - "github.com/google/go-containerregistry/pkg/authn" - "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1/remote" - "github.com/google/go-containerregistry/pkg/v1/tarball" - "github.com/pkg/errors" ) -func (b *Builder) buildBazel(ctx context.Context, out io.Writer, workspace string, a *latest.BazelArtifact, tag string) (string, error) { - args := []string{"build"} - args = append(args, a.BuildArgs...) - args = append(args, a.BuildTarget) +func (b *Builder) buildBazel(ctx context.Context, out io.Writer, a *latest.Artifact, tag string) (string, error) { + builder := bazel.NewBuilder() + builder.LocalBuild = b.cfg + builder.LocalDocker = b.localDocker + builder.KubeContext = b.kubeContext + builder.PushImages = b.pushImages + builder.PluginMode = false - // FIXME: is it possible to apply b.skipTests? - cmd := exec.CommandContext(ctx, "bazel", args...) - cmd.Dir = workspace - cmd.Stdout = out - cmd.Stderr = out - if err := util.RunCmd(cmd); err != nil { - return "", errors.Wrap(err, "running command") + opts := &config.SkaffoldOptions{ + SkipTests: b.skipTests, } - - bazelBin, err := bazelBin(ctx, workspace, a) - if err != nil { - return "", errors.Wrap(err, "getting path of bazel-bin") - } - - tarPath := filepath.Join(bazelBin, buildTarPath(a.BuildTarget)) - - if b.pushImages { - return pushImage(tarPath, tag) - } - - return b.loadImage(ctx, out, tarPath, a, tag) -} - -func pushImage(tarPath, tag string) (string, error) { - t, err := name.NewTag(tag, name.WeakValidation) - if err != nil { - return "", errors.Wrapf(err, "parsing tag %q", tag) - } - - auth, err := authn.DefaultKeychain.Resolve(t.Registry) - if err != nil { - return "", errors.Wrapf(err, "getting creds for %q", t) - } - - i, err := tarball.ImageFromPath(tarPath, nil) - if err != nil { - return "", errors.Wrapf(err, "reading image %q", tarPath) - } - - if err := remote.Write(t, i, auth, http.DefaultTransport); err != nil { - return "", errors.Wrapf(err, "writing image %q", t) - } - - return docker.RemoteDigest(tag) -} - -func (b *Builder) loadImage(ctx context.Context, out io.Writer, tarPath string, a *latest.BazelArtifact, tag string) (string, error) { - imageTar, err := os.Open(tarPath) - if err != nil { - return "", errors.Wrap(err, "opening image tarball") - } - defer imageTar.Close() - - bazelTag := buildImageTag(a.BuildTarget) - imageID, err := b.localDocker.Load(ctx, out, imageTar, bazelTag) - if err != nil { - return "", errors.Wrap(err, "loading image into docker daemon") - } - - if err := b.localDocker.Tag(ctx, imageID, tag); err != nil { - return "", errors.Wrap(err, "tagging the image") - } - - return imageID, nil -} - -func bazelBin(ctx context.Context, workspace string, a *latest.BazelArtifact) (string, error) { - args := []string{"info", "bazel-bin"} - args = append(args, a.BuildArgs...) - - cmd := exec.CommandContext(ctx, "bazel", args...) - cmd.Dir = workspace - - buf, err := util.RunCmdOut(cmd) - if err != nil { - return "", err - } - - return strings.TrimSpace(string(buf)), nil -} - -func trimTarget(buildTarget string) string { - //TODO(r2d4): strip off leading //:, bad - trimmedTarget := strings.TrimPrefix(buildTarget, "//") - // Useful if root target "//:target" - trimmedTarget = strings.TrimPrefix(trimmedTarget, ":") - - return trimmedTarget -} - -func buildTarPath(buildTarget string) string { - tarPath := trimTarget(buildTarget) - tarPath = strings.Replace(tarPath, ":", string(os.PathSeparator), 1) - - return tarPath -} - -func buildImageTag(buildTarget string) string { - imageTag := trimTarget(buildTarget) - imageTag = strings.TrimPrefix(imageTag, ":") - - //TODO(r2d4): strip off trailing .tar, even worse - imageTag = strings.TrimSuffix(imageTag, ".tar") - - if strings.Contains(imageTag, ":") { - return fmt.Sprintf("bazel/%s", imageTag) - } - - return fmt.Sprintf("bazel:%s", imageTag) + builder.Init(opts, &latest.ExecutionEnvironment{}) + return builder.BuildArtifact(ctx, out, a, tag) } diff --git a/pkg/skaffold/build/local/local.go b/pkg/skaffold/build/local/local.go index c7f0a7d41dd..5ec355d4bc1 100644 --- a/pkg/skaffold/build/local/local.go +++ b/pkg/skaffold/build/local/local.go @@ -22,12 +22,12 @@ import ( "io" "strings" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/bazel" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/tag" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/color" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/jib" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/plugin/builders/bazel" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/pkg/errors" @@ -76,7 +76,7 @@ func (b *Builder) runBuildForArtifact(ctx context.Context, out io.Writer, artifa return b.buildDocker(ctx, out, artifact, tag) case artifact.BazelArtifact != nil: - return b.buildBazel(ctx, out, artifact.Workspace, artifact.BazelArtifact, tag) + return b.buildBazel(ctx, out, artifact, tag) case artifact.JibMavenArtifact != nil: return b.buildJibMaven(ctx, out, artifact.Workspace, artifact.JibMavenArtifact, tag) diff --git a/pkg/skaffold/plugin/builders/bazel/bazel.go b/pkg/skaffold/plugin/builders/bazel/bazel.go index 5c718bf8d36..e6fe14f27f6 100644 --- a/pkg/skaffold/plugin/builders/bazel/bazel.go +++ b/pkg/skaffold/plugin/builders/bazel/bazel.go @@ -17,7 +17,6 @@ limitations under the License. package bazel import ( - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/bazel" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/plugin/shared" plugin "github.com/hashicorp/go-plugin" ) @@ -26,7 +25,7 @@ import ( func Execute() error { // pluginMap is the map of plugins we can dispense. var pluginMap = map[string]plugin.Plugin{ - "bazel": &shared.BuilderPlugin{Impl: bazel.NewBuilder()}, + "bazel": &shared.BuilderPlugin{Impl: NewBuilder()}, } plugin.Serve(&plugin.ServeConfig{ diff --git a/pkg/skaffold/build/bazel/bazel.go b/pkg/skaffold/plugin/builders/bazel/builder.go similarity index 69% rename from pkg/skaffold/build/bazel/bazel.go rename to pkg/skaffold/plugin/builders/bazel/builder.go index 9131461da7e..b6ea4b7edff 100644 --- a/pkg/skaffold/build/bazel/bazel.go +++ b/pkg/skaffold/plugin/builders/bazel/builder.go @@ -20,14 +20,12 @@ import ( "context" "io" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/bazel" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build" - "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/local" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/tag" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/config" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/constants" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/event" - kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest" "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" "github.com/pkg/errors" @@ -39,18 +37,28 @@ import ( type Builder struct { opts *config.SkaffoldOptions env *latest.ExecutionEnvironment + *latest.LocalBuild + LocalDocker docker.LocalDaemon + LocalCluster bool + PushImages bool + PluginMode bool + KubeContext string } // NewBuilder creates a new Builder that builds artifacts with Bazel. func NewBuilder() *Builder { - return &Builder{} + return &Builder{ + PluginMode: true, + } } // Init stores skaffold options and the execution environment func (b *Builder) Init(opts *config.SkaffoldOptions, env *latest.ExecutionEnvironment) { - if err := event.SetupRPCClient(opts); err != nil { - logrus.Warn("error establishing gRPC connection to skaffold process; events will not be handled correctly") - logrus.Warn(err.Error()) + if b.PluginMode { + if err := event.SetupRPCClient(opts); err != nil { + logrus.Warn("error establishing gRPC connection to skaffold process; events will not be handled correctly") + logrus.Warn(err.Error()) + } } b.opts = opts b.env = env @@ -71,7 +79,7 @@ func (b *Builder) DependenciesForArtifact(ctx context.Context, artifact *latest. if artifact.BazelArtifact == nil { return nil, errors.New("bazel artifact is nil") } - paths, err := bazel.GetDependencies(ctx, artifact.Workspace, artifact.BazelArtifact) + paths, err := GetDependencies(ctx, artifact.Workspace, artifact.BazelArtifact) if err != nil { return nil, errors.Wrap(err, "getting bazel dependencies") } @@ -89,31 +97,6 @@ func (b *Builder) Build(ctx context.Context, out io.Writer, tags tag.ImageTags, } } -// local sets any necessary defaults and then builds artifacts with bazel locally -func (b *Builder) local(ctx context.Context, out io.Writer, tags tag.ImageTags, artifacts []*latest.Artifact) ([]build.Artifact, error) { - var l *latest.LocalBuild - if err := util.CloneThroughJSON(b.env.Properties, &l); err != nil { - return nil, errors.Wrap(err, "converting execution env to localBuild struct") - } - if l == nil { - l = &latest.LocalBuild{} - } - kubeContext, err := kubectx.CurrentContext() - if err != nil { - return nil, errors.Wrap(err, "getting current cluster context") - } - builder, err := local.NewBuilder(l, kubeContext, b.opts.SkipTests) - if err != nil { - return nil, errors.Wrap(err, "getting local builder") - } - for _, a := range artifacts { - if err := setArtifact(a); err != nil { - return nil, errors.Wrapf(err, "setting artifact %s", a.ImageName) - } - } - return builder.Build(ctx, out, tags, artifacts) -} - func setArtifact(artifact *latest.Artifact) error { if artifact.ArtifactType.BazelArtifact != nil { return nil diff --git a/pkg/skaffold/build/bazel/bazel_test.go b/pkg/skaffold/plugin/builders/bazel/builder_test.go similarity index 100% rename from pkg/skaffold/build/bazel/bazel_test.go rename to pkg/skaffold/plugin/builders/bazel/builder_test.go diff --git a/pkg/skaffold/bazel/bazel.go b/pkg/skaffold/plugin/builders/bazel/dependencies.go similarity index 100% rename from pkg/skaffold/bazel/bazel.go rename to pkg/skaffold/plugin/builders/bazel/dependencies.go diff --git a/pkg/skaffold/bazel/bazel_test.go b/pkg/skaffold/plugin/builders/bazel/dependencies_test.go similarity index 100% rename from pkg/skaffold/bazel/bazel_test.go rename to pkg/skaffold/plugin/builders/bazel/dependencies_test.go diff --git a/pkg/skaffold/plugin/builders/bazel/local.go b/pkg/skaffold/plugin/builders/bazel/local.go new file mode 100644 index 00000000000..ee37fcdbbb6 --- /dev/null +++ b/pkg/skaffold/plugin/builders/bazel/local.go @@ -0,0 +1,234 @@ +/* +Copyright 2019 The Skaffold Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package bazel + +import ( + "context" + "fmt" + "io" + "net/http" + "os" + "os/exec" + "path/filepath" + "strings" + + configutil "github.com/GoogleContainerTools/skaffold/cmd/skaffold/app/cmd/config" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/build/tag" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/color" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/docker" + kubectx "github.com/GoogleContainerTools/skaffold/pkg/skaffold/kubernetes/context" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/schema/latest" + "github.com/GoogleContainerTools/skaffold/pkg/skaffold/util" + "github.com/google/go-containerregistry/pkg/authn" + "github.com/google/go-containerregistry/pkg/name" + "github.com/google/go-containerregistry/pkg/v1/remote" + "github.com/google/go-containerregistry/pkg/v1/tarball" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" +) + +// local sets any necessary defaults and then builds artifacts with bazel locally +func (b *Builder) local(ctx context.Context, out io.Writer, tags tag.ImageTags, artifacts []*latest.Artifact) ([]build.Artifact, error) { + localCluster, err := configutil.GetLocalCluster() + if err != nil { + return nil, errors.Wrap(err, "getting localCluster") + } + b.LocalCluster = localCluster + kubeContext, err := kubectx.CurrentContext() + if err != nil { + return nil, errors.Wrap(err, "getting current cluster context") + } + b.KubeContext = kubeContext + localDocker, err := docker.NewAPIClient() + if err != nil { + return nil, errors.Wrap(err, "getting docker client") + } + b.LocalDocker = localDocker + var l *latest.LocalBuild + if err := util.CloneThroughJSON(b.env.Properties, &l); err != nil { + return nil, errors.Wrap(err, "converting execution env to localBuild struct") + } + if l == nil { + l = &latest.LocalBuild{} + } + b.LocalBuild = l + var pushImages bool + if b.LocalBuild.Push == nil { + pushImages = !localCluster + logrus.Debugf("push value not present, defaulting to %t because localCluster is %t", pushImages, localCluster) + } else { + pushImages = *b.LocalBuild.Push + } + b.PushImages = pushImages + for _, a := range artifacts { + if err := setArtifact(a); err != nil { + return nil, errors.Wrapf(err, "setting artifact %s", a.ImageName) + } + } + return b.buildArtifacts(ctx, out, tags, artifacts) +} + +func (b *Builder) buildArtifacts(ctx context.Context, out io.Writer, tags tag.ImageTags, artifacts []*latest.Artifact) ([]build.Artifact, error) { + if b.LocalCluster { + color.Default.Fprintf(out, "Found [%s] context, using local docker daemon.\n", b.KubeContext) + } + return build.InSequence(ctx, out, tags, artifacts, b.runBuild) +} + +func (b *Builder) runBuild(ctx context.Context, out io.Writer, artifact *latest.Artifact, tag string) (string, error) { + digestOrImageID, err := b.BuildArtifact(ctx, out, artifact, tag) + if err != nil { + return "", errors.Wrap(err, "build artifact") + } + if b.PushImages { + digest := digestOrImageID + return tag + "@" + digest, nil + } + + // k8s doesn't recognize the imageID or any combination of the image name + // suffixed with the imageID, as a valid image name. + // So, the solution we chose is to create a tag, just for Skaffold, from + // the imageID, and use that in the manifests. + imageID := digestOrImageID + uniqueTag := artifact.ImageName + ":" + strings.TrimPrefix(imageID, "sha256:") + if err := b.LocalDocker.Tag(ctx, imageID, uniqueTag); err != nil { + return "", err + } + + return uniqueTag, nil +} + +// BuildArtifact builds the bazel artifact +func (b *Builder) BuildArtifact(ctx context.Context, out io.Writer, artifact *latest.Artifact, tag string) (string, error) { + args := []string{"build"} + a := artifact.ArtifactType.BazelArtifact + workspace := artifact.Workspace + args = append(args, a.BuildArgs...) + args = append(args, a.BuildTarget) + + // FIXME: is it possible to apply b.skipTests? + cmd := exec.CommandContext(ctx, "bazel", args...) + cmd.Dir = workspace + cmd.Stdout = out + cmd.Stderr = out + if err := util.RunCmd(cmd); err != nil { + return "", errors.Wrap(err, "running command") + } + + bazelBin, err := bazelBin(ctx, workspace, a) + if err != nil { + return "", errors.Wrap(err, "getting path of bazel-bin") + } + + tarPath := filepath.Join(bazelBin, buildTarPath(a.BuildTarget)) + + if b.PushImages { + return PushImage(tarPath, tag) + } + + return b.loadImage(ctx, out, tarPath, a, tag) +} + +// PushImage pushes the tarball image created by bazel +func PushImage(tarPath, tag string) (string, error) { + t, err := name.NewTag(tag, name.WeakValidation) + if err != nil { + return "", errors.Wrapf(err, "parsing tag %q", tag) + } + + auth, err := authn.DefaultKeychain.Resolve(t.Registry) + if err != nil { + return "", errors.Wrapf(err, "getting creds for %q", t) + } + + i, err := tarball.ImageFromPath(tarPath, nil) + if err != nil { + return "", errors.Wrapf(err, "reading image %q", tarPath) + } + + if err := remote.Write(t, i, auth, http.DefaultTransport); err != nil { + return "", errors.Wrapf(err, "writing image %q", t) + } + + return docker.RemoteDigest(tag) +} + +func (b *Builder) loadImage(ctx context.Context, out io.Writer, tarPath string, a *latest.BazelArtifact, tag string) (string, error) { + imageTar, err := os.Open(tarPath) + if err != nil { + return "", errors.Wrap(err, "opening image tarball") + } + defer imageTar.Close() + + bazelTag := buildImageTag(a.BuildTarget) + imageID, err := b.LocalDocker.Load(ctx, out, imageTar, bazelTag) + if err != nil { + return "", errors.Wrap(err, "loading image into docker daemon") + } + + if err := b.LocalDocker.Tag(ctx, imageID, tag); err != nil { + return "", errors.Wrap(err, "tagging the image") + } + + return imageID, nil +} + +func bazelBin(ctx context.Context, workspace string, a *latest.BazelArtifact) (string, error) { + args := []string{"info", "bazel-bin"} + args = append(args, a.BuildArgs...) + + cmd := exec.CommandContext(ctx, "bazel", args...) + cmd.Dir = workspace + + buf, err := util.RunCmdOut(cmd) + if err != nil { + return "", err + } + + return strings.TrimSpace(string(buf)), nil +} + +func trimTarget(buildTarget string) string { + //TODO(r2d4): strip off leading //:, bad + trimmedTarget := strings.TrimPrefix(buildTarget, "//") + // Useful if root target "//:target" + trimmedTarget = strings.TrimPrefix(trimmedTarget, ":") + + return trimmedTarget +} + +func buildTarPath(buildTarget string) string { + tarPath := trimTarget(buildTarget) + tarPath = strings.Replace(tarPath, ":", string(os.PathSeparator), 1) + + return tarPath +} + +func buildImageTag(buildTarget string) string { + imageTag := trimTarget(buildTarget) + imageTag = strings.TrimPrefix(imageTag, ":") + + //TODO(r2d4): strip off trailing .tar, even worse + imageTag = strings.TrimSuffix(imageTag, ".tar") + + if strings.Contains(imageTag, ":") { + return fmt.Sprintf("bazel/%s", imageTag) + } + + return fmt.Sprintf("bazel:%s", imageTag) +} diff --git a/pkg/skaffold/build/local/bazel_test.go b/pkg/skaffold/plugin/builders/bazel/local_test.go similarity index 99% rename from pkg/skaffold/build/local/bazel_test.go rename to pkg/skaffold/plugin/builders/bazel/local_test.go index 1e06ba6cc60..85f097154da 100644 --- a/pkg/skaffold/build/local/bazel_test.go +++ b/pkg/skaffold/plugin/builders/bazel/local_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package local +package bazel import ( "context"