Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created deploy task to push or update application #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

springyboing
Copy link
Contributor

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.

Push & Update get a duplicate free list of URIs to bind to.
Update will bind to pre definded services if available.
Updated readme to include a section use of cf-deploy task, with example
of creating services before execution of the cf-deploy task.
Adding a service e.g. calling cf-add-service, is now an idempotent
operation. Meaning if you already have the service it won't create it
again or blow up because it already exists.

Conflicts:
	README.md
	src/main/groovy/org/gradle/cf/AbstractCreateApplicationCloudFoundryTask.groovy
	src/main/groovy/org/gradle/cf/CloudFoundryPlugin.groovy
	src/main/groovy/org/gradle/cf/UpdateApplicationCloudFoundryTask.groovy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant