Skip to content

Commit 275d213

Browse files
committed
extended automation command to include Space
1 parent f2871d1 commit 275d213

53 files changed

Lines changed: 85 additions & 51 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pkg/cmd/account/aws/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func CreateRun(opts *CreateOptions) error {
130130
link := output.Bluef("%s/app#/%s/infrastructure/accounts/%s", opts.Host, opts.Space.GetID(), createdAccount.GetID())
131131
fmt.Fprintf(opts.Out, "\nView this account on Octopus Deploy: %s\n", link)
132132
if !opts.NoPrompt {
133-
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.Name, opts.AccessKey, opts.SecretKey, opts.Region, opts.Description, opts.Environments)
133+
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.GetSpaceNameOrEmpty(), opts.Name, opts.AccessKey, opts.SecretKey, opts.Region, opts.Description, opts.Environments)
134134
fmt.Fprintf(opts.Out, "\nAutomation Command: %s\n", autoCmd)
135135
}
136136

pkg/cmd/account/azure-oidc/create/create.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ func CreateRun(opts *CreateOptions) error {
215215
if !opts.NoPrompt {
216216
autoCmd := flag.GenerateAutomationCmd(
217217
opts.CmdPath,
218+
opts.GetSpaceNameOrEmpty(),
218219
opts.Name,
219220
opts.Description,
220221
opts.Environments,

pkg/cmd/account/azure/create/create.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ func CreateRun(opts *CreateOptions) error {
203203
if !opts.NoPrompt {
204204
autoCmd := flag.GenerateAutomationCmd(
205205
opts.CmdPath,
206+
opts.GetSpaceNameOrEmpty(),
206207
opts.Name,
207208
opts.Description,
208209
opts.Environments,

pkg/cmd/account/gcp/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func CreateRun(opts *CreateOptions) error {
139139
link := output.Bluef("%s/app#/%s/infrastructure/accounts/%s", opts.Host, opts.Space.GetID(), createdAccount.GetID())
140140
_, _ = fmt.Fprintf(opts.Out, "\nView this account on Octopus Deploy: %s\n", link)
141141
if !opts.NoPrompt {
142-
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.Name, opts.KeyFilePath, opts.Description, opts.Environments)
142+
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.GetSpaceNameOrEmpty(), opts.Name, opts.KeyFilePath, opts.Description, opts.Environments)
143143
_, _ = fmt.Fprintf(opts.Out, "\nAutomation Command: %s\n", autoCmd)
144144
}
145145
return nil

pkg/cmd/account/generic-oidc/create/create.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ func CreateRun(opts *CreateOptions) error {
132132
if !opts.NoPrompt {
133133
autoCmd := flag.GenerateAutomationCmd(
134134
opts.CmdPath,
135+
opts.GetSpaceNameOrEmpty(),
135136
opts.Name,
136137
opts.Description,
137138
opts.Environments,

pkg/cmd/account/ssh/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func CreateRun(opts *CreateOptions) error {
148148
link := output.Bluef("%s/app#/%s/infrastructure/accounts/%s", opts.Host, opts.Space.GetID(), createdAccount.GetID())
149149
_, _ = fmt.Fprintf(opts.Out, "\nView this account on Octopus Deploy: %s\n", link)
150150
if !opts.NoPrompt {
151-
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.Name, opts.KeyFilePath, opts.Passphrase, opts.Description, opts.Environments)
151+
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.GetSpaceNameOrEmpty(), opts.Name, opts.KeyFilePath, opts.Passphrase, opts.Description, opts.Environments)
152152
_, _ = fmt.Fprintf(opts.Out, "\nAutomation Command: %s\n", autoCmd)
153153
}
154154
return nil

pkg/cmd/account/token/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func CreateRun(opts *CreateOptions) error {
126126
link := output.Bluef("%s/app#/%s/infrastructure/accounts/%s", opts.Host, opts.Space.GetID(), createdAccount.GetID())
127127
_, _ = fmt.Fprintf(opts.Out, "\nView this account on Octopus Deploy: %s\n", link)
128128
if !opts.NoPrompt {
129-
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.Name, opts.Token, opts.Description, opts.Environments)
129+
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.GetSpaceNameOrEmpty(), opts.Name, opts.Token, opts.Description, opts.Environments)
130130
_, _ = fmt.Fprintf(opts.Out, "\nAutomation Command: %s\n", autoCmd)
131131
}
132132
return nil

pkg/cmd/account/username/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func CreateRun(opts *CreateOptions) error {
131131
link := output.Bluef("%s/app#/%s/infrastructure/accounts/%s", opts.Host, opts.Space.GetID(), createdAccount.GetID())
132132
_, _ = fmt.Fprintf(opts.Out, "\nView this account on Octopus Deploy: %s\n", link)
133133
if !opts.NoPrompt {
134-
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.Name, opts.Username, opts.Password, opts.Description, opts.Environments)
134+
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.GetSpaceNameOrEmpty(), opts.Name, opts.Username, opts.Password, opts.Description, opts.Environments)
135135
_, _ = fmt.Fprintf(opts.Out, "\nAutomation Command: %s\n", autoCmd)
136136
}
137137
return nil

pkg/cmd/buildinformation/upload/upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func uploadRun(opts *UploadOptions) error {
158158
}
159159

160160
if !opts.NoPrompt {
161-
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.PackageId, opts.Version, opts.File, opts.OverwriteMode)
161+
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.GetSpaceNameOrEmpty(), opts.PackageId, opts.Version, opts.File, opts.OverwriteMode)
162162
fmt.Fprintf(opts.Out, "%s\n", autoCmd)
163163
}
164164

pkg/cmd/channel/create/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func createRun(opts *CreateOptions) error {
123123
fmt.Fprintf(opts.Out, "View this channel on Octopus Deploy: %s\n", link)
124124

125125
if !opts.NoPrompt {
126-
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.Name, opts.Project, opts.Description, opts.Default, opts.Lifecycle)
126+
autoCmd := flag.GenerateAutomationCmd(opts.CmdPath, opts.GetSpaceNameOrEmpty(), opts.Name, opts.Project, opts.Description, opts.Default, opts.Lifecycle)
127127
fmt.Fprintf(opts.Out, "%s\n", autoCmd)
128128
}
129129

0 commit comments

Comments
 (0)