cli: fix detach handling (#13405)
Fix detach handling for: - `deployment fail` - `deployment promote` - `deployment resume` - `deployment unblock` - `job promote`
This commit is contained in:
parent
a97699221c
commit
9de4d7367c
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
cli: Fixed remaining bugs where the evaluation ID was not printed when the `-detach` flag was passed
|
||||
``
|
|
@ -132,7 +132,12 @@ func (c *DeploymentFailCommand) Run(args []string) int {
|
|||
evalCreated := u.EvalID != ""
|
||||
|
||||
// Nothing to do
|
||||
if detach || !evalCreated {
|
||||
if !evalCreated {
|
||||
return 0
|
||||
}
|
||||
|
||||
if detach {
|
||||
c.Ui.Output("Evaluation ID: " + u.EvalID)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
|
@ -140,9 +140,15 @@ func (c *DeploymentPromoteCommand) Run(args []string) int {
|
|||
return 1
|
||||
}
|
||||
|
||||
// Nothing to do
|
||||
evalCreated := u.EvalID != ""
|
||||
if detach || !evalCreated {
|
||||
|
||||
// Nothing to do
|
||||
if !evalCreated {
|
||||
return 0
|
||||
}
|
||||
|
||||
if detach {
|
||||
c.Ui.Output("Evaluation ID: " + u.EvalID)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,12 @@ func (c *DeploymentResumeCommand) Run(args []string) int {
|
|||
evalCreated := u.EvalID != ""
|
||||
|
||||
// Nothing to do
|
||||
if detach || !evalCreated {
|
||||
if !evalCreated {
|
||||
return 0
|
||||
}
|
||||
|
||||
if detach {
|
||||
c.Ui.Output("Evaluation ID: " + u.EvalID)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,12 @@ func (c *DeploymentUnblockCommand) Run(args []string) int {
|
|||
evalCreated := u.EvalID != ""
|
||||
|
||||
// Nothing to do
|
||||
if detach || !evalCreated {
|
||||
if !evalCreated {
|
||||
return 0
|
||||
}
|
||||
|
||||
if detach {
|
||||
c.Ui.Output("Evaluation ID: " + u.EvalID)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
|
@ -161,9 +161,15 @@ func (c *JobPromoteCommand) Run(args []string) int {
|
|||
return 1
|
||||
}
|
||||
|
||||
// Nothing to do
|
||||
evalCreated := u.EvalID != ""
|
||||
if detach || !evalCreated {
|
||||
|
||||
// Nothing to do
|
||||
if !evalCreated {
|
||||
return 0
|
||||
}
|
||||
|
||||
if detach {
|
||||
c.Ui.Output("Evaluation ID: " + u.EvalID)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue