mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-03-25 21:39:13 +02:00
3.8 KiB
3.8 KiB
${docGenStepName}
${docGenDescription}
Additional Hints
Standard CF deployments
deployType
parameter defaults to value standard
.
This means that CF CLI is called by piper and command cf push
is run by piper
Blue green deployments
With CF CLI
- Blue green deployments are deprecated, but rolling deployment strategy is supported.
- For rolling deployment strategy , set parameter
cfNativeDeployParameters:'--strategy rolling'
With MTA CF CLI Plugin for MTA applications
The Multiapps Plugin offers 2 different strategies:
- Blue-Green Deployment Strategy - where the production environments are called “live” and “idle” during deployment. This strategy is activated with
mtaDeployParameters: --strategy blue-green --skip-testing-phase
anddeployType=standard
. After deployment, appnames are not appeneded by any suffix like-live
or-idle
. - Legacy Blue-Green Deployment - where the productive environments are called “blue” and “green. Activated by
deployType=blue-green
. After deployment, appnames are appeneded by suffix like-blue
or-green
Following table summarizes the different combinations of the step parameters deployType
and deployTool
and their impact.
Parameter buildTool
is used to differentiate between MTA and Non MTA applications. If buildTool
is not available in the environment, user will have to provide deployTool
explicitly.
Deployment Strategy Comparison
This table compares deployment strategies for MTA and Non-MTA applications.
deployType | MTA Applications | Non MTA Applications |
---|---|---|
standard | deployTool = mtaDeployPlugin Uses MTA plugin, Command run cf deploy |
deployTool = cf_native cf CLI used Command cf push Requires Manifest file and app name appname can be provided via config or manifest file. |
blue-green | deployTool = mtaDeployPlugin, Uses MTA plugin Command run cf deploy bgdeploy |
Deprecated. Alternative: Rolling deployment strategy by setting cfNativeDeployParameters = '--strategy rolling' |
deployDockerImage not supported | deployDockerImage supported Docker credentials can only be provided as Jenkins environment variable. |
!!! note
- Due to an incompatible change in the Cloud Foundry CLI, multiple buildpacks are not supported by this step.
If your
application
contains a list ofbuildpacks
instead of a singlebuildpack
, this will be automatically re-written by the step when blue-green deployment is used. - Cloud Foundry supports the deployment of multiple applications using a single manifest file.
This option is supported with project "Piper".
In this case, define
appName: ''
since the app name for the individual applications has to be defined via the manifest. You can find details in the Cloud Foundry Documentation - Recommended way to do docker image deployments is via kubernetesDeploy Piper step.This step is not capable of deploying docker images built in the same pipeline using other piper steps[i.e., kanikoExecute].
Prerequisites
- Cloud Foundry organization, space and deployment users are available
- Credentials for deployment have been configured in Jenkins or Vault.