From becd49fea9f449a7e4cdf325562acec597c79d74 Mon Sep 17 00:00:00 2001 From: Hongchao Deng Date: Fri, 23 Feb 2018 10:16:28 -0800 Subject: [PATCH] cmd: add build subcommand --- commands/operator-sdk/cmd/build.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 commands/operator-sdk/cmd/build.go diff --git a/commands/operator-sdk/cmd/build.go b/commands/operator-sdk/cmd/build.go new file mode 100644 index 0000000000..fc03afc91b --- /dev/null +++ b/commands/operator-sdk/cmd/build.go @@ -0,0 +1,22 @@ +package cmd + +import "github.com/spf13/cobra" + +// buildCmd represents the build command +var buildCmd = &cobra.Command{ + Use: "build ", + Short: "Compiles code and builds artifacts", + Long: `The operator-sdk build command compiles the code, builds the executables, + and generates Kubernetes manifests. + + is the container image to be built, e.g. "quay.io/example/operator:v0.0.1". + This image will be automatically set in the deployment manifests. + + After build completes, the image would be built locally in docker. Then it needs to + be pushed to remote registry. + For example: + $ operator-sdk build quay.io/example/operator:v0.0.1 + $ docker push quay.io/example/operator:v0.0.1 +`, + Run: newFunc, +}