cloudfoundry-community / cf-resource

Concourse resource for interacting with Cloud Foundry
Apache License 2.0
35 stars 63 forks source link

Add ability to delete app #41

Open CAFxX opened 7 years ago

CAFxX commented 7 years ago

A common pattern we have is the following:

  1. deploy one or more apps in an integration-testing space
  2. run integration tests
  3. delete the apps deployed in step 1

Currently there's no way to do step 3 with the cf resource, so we have to resort to scripts. Would be nice if the cf resource was extended to allow this kind of operations

archgrove commented 6 years ago

+1 on this as a useful thing. I know that Concourse doesn't really have a concept of resource destruction right now, but perhaps something along the lines of https://github.com/ljfranklin/terraform-resource action: destroy might be a stopgap?

cappyzawa commented 6 years ago

I think it's a useful feature.

Image is like below?

put: cf
params: 
  action: delete # (or deploy)
  manifest: ...

....

If we implement it, we may be able to do it with cloudfoundry-community/go-cfclient.

https://github.com/cloudfoundry-community/go-cfclient/blob/bdb31282431a30516bb8d28628e95dd47e577df6/apps.go#L375-L384

sunshineperi commented 6 years ago

Yup, this is definitely better to have. And I just found this, https://github.com/nulldriver/cf-cli-resource, which allow you to do cf delete.