Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
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
1 change: 1 addition & 0 deletions cmd/rig/cmd/capsule/build/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func Setup(parent *cobra.Command) *cobra.Command {
buildCreate.RegisterFlagCompletionFunc("image", common.NoCompletions)
buildCreate.RegisterFlagCompletionFunc("deploy", common.BoolCompletions)
buildCreate.RegisterFlagCompletionFunc("skip-image-check", common.BoolCompletions)
buildCreate.RegisterFlagCompletionFunc("remote", common.BoolCompletions)
build.AddCommand(buildCreate)

buildGet := &cobra.Command{
Expand Down
123 changes: 0 additions & 123 deletions cmd/rig/cmd/capsule/push.go

This file was deleted.

26 changes: 6 additions & 20 deletions cmd/rig/cmd/capsule/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ var (
)

var (
deployBool bool
follow bool
interactive bool
outputJSON bool
skipImageCheck bool
remote bool
interactive bool
outputJSON bool
remote bool
)

var (
Expand Down Expand Up @@ -70,23 +67,10 @@ func Setup(parent *cobra.Command) *cobra.Command {

capsuleCmd.AddCommand(capsuleCreate)

capsulePush := &cobra.Command{
Use: "push",
Short: "Push a local image to a Capsule",
Args: cobra.MaximumNArgs(1),
RunE: base.Register(push),
ValidArgsFunction: common.NoCompletions,
}
capsulePush.Flags().StringVarP(&image, "image", "i", "", "image to push")
capsulePush.Flags().BoolVarP(&deployBool, "deploy", "d", false, "deploy build after successful push")
capsulePush.RegisterFlagCompletionFunc("deploy", common.BoolCompletions)
capsulePush.RegisterFlagCompletionFunc("image", common.NoCompletions)
capsuleCmd.AddCommand(capsulePush)

capsuleDeploy := &cobra.Command{
Use: "deploy",
Short: "Deploy the given build to a capsule",
Args: cobra.MaximumNArgs(1),
Args: cobra.NoArgs,
RunE: base.Register(deploy),
Long: `Deploy either the given rig-build or docker image to a capsule.
If --build-id is given rig tries to find a matching existing rig-build to deploy.
Expand All @@ -97,6 +81,8 @@ Not both --build-id and --image can be given`,
capsuleDeploy.Flags().StringVarP(&image, "image", "i", "", "docker image to deploy. Will create a new rig-build from the image if it doesn't exist")
capsuleDeploy.Flags().BoolVarP(&remote, "remote", "r", false, "if --image is also given, Rig will assume the image is from a remote registry. If not set, Rig will search locally and then remotely")
capsuleDeploy.RegisterFlagCompletionFunc("build-id", BuildCompletions)
capsuleDeploy.RegisterFlagCompletionFunc("image", common.NoCompletions)
capsuleDeploy.RegisterFlagCompletionFunc("remote", common.BoolCompletions)
capsuleCmd.AddCommand(capsuleDeploy)

capsuleAbort := &cobra.Command{
Expand Down