2019-03-28 14:38:25 +01:00
# ${docGenStepName}
2018-08-15 09:30:35 +02:00
2019-03-28 14:38:25 +01:00
## ${docGenDescription}
2018-08-15 09:30:35 +02:00
2021-02-19 08:44:51 +01:00
### Additional Hints
Deployment can be done
* in a standard way
2021-08-05 17:03:51 +02:00
* in a zero-downtime manner (using a [blue-green deployment approach ](https://martinfowler.com/bliki/BlueGreenDeployment.html ))
2021-02-19 08:44:51 +01:00
!!! note "Deployment supports multiple deployment tools"
Currently the following are supported:
* Standard `cf push` and [Bluemix blue-green plugin ](https://github.com/bluemixgaragelondon/cf-blue-green-deploy#how-to-use )
* [MTA CF CLI Plugin ](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin )
!!! note
Due to [an incompatible change ](https://github.com/cloudfoundry/cli/issues/1445 ) in the Cloud Foundry CLI, multiple buildpacks are not supported by this step.
2021-08-05 17:03:51 +02:00
If your `application` contains a list of `buildpacks` instead of a single `buildpack` , this will be automatically re-written by the step when blue-green deployment is used.
2021-02-19 08:44:51 +01:00
!!! note
Cloud Foundry supports the deployment of multiple applications using a single manifest file.
2021-03-19 10:51:24 +01:00
This option is supported with project "Piper".
2021-08-05 17:03:51 +02:00
In this case, define `appName: ''` since the app name for the individual applications has to be defined via the manifest.
2021-02-19 08:44:51 +01:00
You can find details in the [Cloud Foundry Documentation ](https://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#multi-apps )
2018-12-14 18:10:11 +01:00
## Prerequisites
2018-08-15 09:30:35 +02:00
2021-08-05 17:03:51 +02:00
* Cloud Foundry organization, space and deployment users are available
2018-08-15 09:30:35 +02:00
* Credentials for deployment have been configured in Jenkins with a dedicated Id

2019-03-28 14:38:25 +01:00
## ${docGenParameters}
2018-08-15 09:30:35 +02:00
2019-03-28 14:38:25 +01:00
## ${docGenConfiguration}
2018-08-15 09:30:35 +02:00
2019-05-24 15:44:31 +02:00
## ${docJenkinsPluginDependencies}
2019-05-24 15:41:49 +02:00
2018-08-15 09:30:35 +02:00
## Example
```groovy
2018-10-17 11:01:09 +02:00
cloudFoundryDeploy(
script: script,
deployType: 'blue-green',
cloudFoundry: [apiEndpoint: 'https://test.server.com', appName:'cfAppName', credentialsId: 'cfCredentialsId', manifest: 'cfManifest', org: 'cfOrg', space: 'cfSpace'],
deployTool: 'cf_native'
)
2018-08-15 09:30:35 +02:00
```