Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Implement service removal flag #1

Merged
merged 1 commit into from
Mar 14, 2017
Merged

Implement service removal flag #1

merged 1 commit into from
Mar 14, 2017

Conversation

johnharris85
Copy link
Contributor

@johnharris85 johnharris85 commented Mar 12, 2017

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

app.go Outdated
if rmService {
fmt.Println("Removing service...")
if err := c.ServiceRemove(context.Background(), id); err != nil {
fmt.Println(err)
Copy link
Owner

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")
Copy link
Owner

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.

@alexellis
Copy link
Owner

alexellis commented Mar 12, 2017

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.

@johnharris85
Copy link
Contributor Author

Made those changes. Just heading out now but will try add a test case later.

@alexellis
Copy link
Owner

Great - thanks for updating. If you could rebase/squash your commits into one and fix the README conflict I'll merge. 👍

@alexellis
Copy link
Owner

LGTM

@alexellis alexellis merged commit 7625d89 into alexellis:master Mar 14, 2017
@johnharris85 johnharris85 deleted the rm-container-feature branch March 14, 2017 22:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants