-
Notifications
You must be signed in to change notification settings - Fork 787
/
step.go
90 lines (85 loc) · 3.68 KB
/
step.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package cmd
import (
"github.com/jenkins-x/jx/v2/pkg/cmd/config"
"github.com/jenkins-x/jx/v2/pkg/cmd/helper"
"github.com/jenkins-x/jx/v2/pkg/cmd/opts"
step2 "github.com/jenkins-x/jx/v2/pkg/cmd/opts/step"
"github.com/jenkins-x/jx/v2/pkg/cmd/step"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/bdd"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/boot"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/buildpack"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/cluster"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/create"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/e2e"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/env"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/expose"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/get"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/git"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/helm"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/post"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/pr"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/report"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/restore"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/scheduler"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/syntax"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/update"
"github.com/jenkins-x/jx/v2/pkg/cmd/step/verify"
"github.com/spf13/cobra"
)
// NewCmdStep Steps a command object for the "step" command
func NewCmdStep(commonOpts *opts.CommonOptions) *cobra.Command {
options := &step2.StepOptions{
CommonOptions: commonOpts,
}
cmd := &cobra.Command{
Use: "step",
Short: "pipeline steps",
Aliases: []string{"steps"},
Run: func(cmd *cobra.Command, args []string) {
options.Cmd = cmd
options.Args = args
err := options.Run()
helper.CheckErr(err)
},
}
cmd.AddCommand(boot.NewCmdStepBoot(commonOpts))
cmd.AddCommand(buildpack.NewCmdStepBuildPack(commonOpts))
cmd.AddCommand(bdd.NewCmdStepBDD(commonOpts))
cmd.AddCommand(e2e.NewCmdStepE2E(commonOpts))
cmd.AddCommand(step.NewCmdStepBlog(commonOpts))
cmd.AddCommand(step.NewCmdStepChangelog(commonOpts))
cmd.AddCommand(cluster.NewCmdStepCluster(commonOpts))
cmd.AddCommand(step.NewCmdStepCredential(commonOpts))
cmd.AddCommand(create.NewCmdStepCreate(commonOpts))
cmd.AddCommand(step.NewCmdStepCustomPipeline(commonOpts))
cmd.AddCommand(env.NewCmdStepEnv(commonOpts))
cmd.AddCommand(expose.NewCmdStepExpose(commonOpts))
cmd.AddCommand(get.NewCmdStepGet(commonOpts))
cmd.AddCommand(git.NewCmdStepGit(commonOpts))
cmd.AddCommand(step.NewCmdStepGpgCredentials(commonOpts))
cmd.AddCommand(helm.NewCmdStepHelm(commonOpts))
cmd.AddCommand(step.NewCmdStepLinkServices(commonOpts))
cmd.AddCommand(step.NewCmdStepNextVersion(commonOpts))
cmd.AddCommand(step.NewCmdStepNextBuildNumber(commonOpts))
cmd.AddCommand(pr.NewCmdStepPR(commonOpts))
cmd.AddCommand(post.NewCmdStepPost(commonOpts))
cmd.AddCommand(step.NewCmdStepRelease(commonOpts))
cmd.AddCommand(step.NewCmdStepReplicate(commonOpts))
cmd.AddCommand(step.NewCmdStepSplitMonorepo(commonOpts))
cmd.AddCommand(syntax.NewCmdStepSyntax(commonOpts))
cmd.AddCommand(step.NewCmdStepTag(commonOpts))
cmd.AddCommand(step.NewCmdStepValidate(commonOpts))
cmd.AddCommand(verify.NewCmdStepVerify(commonOpts))
cmd.AddCommand(step.NewCmdStepWaitForArtifact(commonOpts))
cmd.AddCommand(step.NewCmdStepWaitForChart(commonOpts))
cmd.AddCommand(step.NewCmdStepStash(commonOpts))
cmd.AddCommand(step.NewCmdStepUnstash(commonOpts))
cmd.AddCommand(step.NewCmdStepValuesSchemaTemplate(commonOpts))
cmd.AddCommand(scheduler.NewCmdStepScheduler(commonOpts))
cmd.AddCommand(config.NewCmdStepPatchConfigMap(commonOpts))
cmd.AddCommand(update.NewCmdStepUpdate(commonOpts))
cmd.AddCommand(report.NewCmdStepReport(commonOpts))
cmd.AddCommand(step.NewCmdStepOverrideRequirements(commonOpts))
cmd.AddCommand(restore.NewCmdStepRestore(commonOpts))
return cmd
}