-
Notifications
You must be signed in to change notification settings - Fork 1
/
undeploy.go
53 lines (44 loc) · 1.5 KB
/
undeploy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
func init() {
rootCmd.AddCommand(undeployCmd)
undeployCmd.AddCommand(undeployWebCmd)
undeployCmd.AddCommand(undeployAPICmd)
undeployCmd.AddCommand(undeployDatabaseCmd)
}
var undeployCmd = &cobra.Command{
Use: "undeploy",
Aliases: []string{"undep", "undepl"},
Short: "Undeploy artifacts (web, api or database)",
Long: `This command can be used together with web, api or database sub-commands to undeploy respective artifacts`,
}
var undeployWebCmd = &cobra.Command{
Use: "web",
Short: "Undeploy web artifacts",
Long: `This command can be used to undeploy web artifacts`,
Run: func(cmd *cobra.Command, args []string) {
// *** add code to invoke automation end points below ***
fmt.Println("Executing 'deployer undeploy web' placeholder command")
},
}
var undeployAPICmd = &cobra.Command{
Use: "api",
Short: "Uneploy API artifacts",
Long: `This command can be used to undeploy API artifacts`,
Run: func(cmd *cobra.Command, args []string) {
// *** add code to invoke automation end points below ***
fmt.Println("Executing 'deployer undeploy api' placeholder command")
},
}
var undeployDatabaseCmd = &cobra.Command{
Use: "database",
Short: "Undeploy database artifacts",
Long: `This command can be used to undeploy database artifacts`,
Run: func(cmd *cobra.Command, args []string) {
// *** add code to invoke automation end points below ***
fmt.Println("Executing 'deployer undeploy database' placeholder command")
},
}