-
-
Notifications
You must be signed in to change notification settings - Fork 35
Conversation
app.go
Outdated
if rmService { | ||
fmt.Println("Removing service...") | ||
if err := c.ServiceRemove(context.Background(), id); err != nil { | ||
fmt.Println(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this should be on stderr
app.go
Outdated
@@ -46,6 +47,7 @@ func main() { | |||
flag.StringVar(&network, "network", "", "Docker swarm network name") | |||
|
|||
flag.BoolVar(&showlogs, "showlogs", true, "show logs from stdout") | |||
flag.BoolVar(&rmService, "rm", false, "remove service after completion") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you call this variable removeService
? The flag name is OK.
Thanks for the change @johnharris85 - just a couple of minor comments. Is this something you could use in your workflow btw? I've not got a PR template yet but could you say how you tested this - positive/negative case. |
Made those changes. Just heading out now but will try add a test case later. |
Great - thanks for updating. If you could rebase/squash your commits into one and fix the README conflict I'll merge. 👍 |
LGTM |
Description
Implementation of service removal flag for deleting the service after completion.
Motivation and Context
Allows users to automatically have the service removed after it finishes running.
How Has This Been Tested?
Tested with and without
-rm
flag and experienced expected results. No negative test yet (in case the removal doesn't succeed for some reason).Types of changes
Checklist: