Skip to content

Created deploy task to push or update application#2

Open
springyboing wants to merge 1 commit intomelix:masterfrom
springyboing:deploy-task-without-env
Open

Created deploy task to push or update application#2
springyboing wants to merge 1 commit intomelix:masterfrom
springyboing:deploy-task-without-env

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