Created deploy task to push or update application #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey,
This is a new task I created to make automating a deployment easier. If the application already exists on CF then it executes the Update task, otherwise it executes the Push task.
With this I wanted to make service binding a breeze. So now on the Update task, services only bind if the name is specified and already created on CF. It checks for services on CF, only binding if they exist. It doesn't unbind services not specified in the gradle script, but this wouldn't be hard to add if needs be. I'm taking the non-destructive approach.
Also updated Push & Update tasks to use a duplicate free list of URIs to map to. This also makes sure all the URIs are strings. GStrings don't get cast to Strings which can cause an issue.
Finally made adding a service e.g. calling cf-add-service, an idempotent operation. Meaning if you already have the service it won't create it again or blow up because it already exists. This allows automation of service creation before the Deploy task using a doFirst configuration as documented in the README.md possible.
Hope you think its a worth while addition.
Tim.