Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ashlymat committed Feb 18, 2025
1 parent ebefb45 commit 0cfce38
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
4 changes: 2 additions & 2 deletions cmd/cloudFoundryDeploy_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 21 additions & 16 deletions documentation/docs/steps/cloudFoundryDeploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,37 @@

### Additional Hints

#### Standard CF deployments
#### Standard CF deployments

`deployType` parameter defaults to value `standard`
`deployType` parameter defaults to value `standard`.<br>
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](https://docs.cloudfoundry.org/devguide/deploy-apps/rolling-deploy.html) is supported.
* For rolling deployment strategy , set parameter `cfNativeDeployParameters: '--strategy rolling'`
#### Blue green deployments

**With CF CLI**

* Blue green deployments are deprecated, but [rolling deployment strategy](https://docs.cloudfoundry.org/devguide/deploy-apps/rolling-deploy.html) is supported.<br>
* For rolling deployment strategy , set parameter `cfNativeDeployParameters:'--strategy rolling'`

* With [MTA CF CLI Plugin](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin) for MTA applications
**With [MTA CF CLI Plugin](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin) for MTA applications**

The Multiapps Plugin offers 2 different strategies:
The Multiapps Plugin offers 2 different strategies:<br>

* [Blue-Green Deployment Strategy](https://github.com/SAP-samples/cf-mta-examples/tree/main/blue-green-deploy-strategy) - where the production environments are called “live” and “idle” during deployment. This strategy is activated with `mtaDeployParameters: --strategy blue-green --skip-testing-phase` and `deployType=standard`. After deployment, appnames are not appeneded by any suffix like `-live` or `-idle`.
* [Legacy Blue-Green Deployment](https://github.com/SAP-samples/cf-mta-examples/tree/main/blue-green-deploy-legacy) - 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`
* [Blue-Green Deployment Strategy](https://github.com/SAP-samples/cf-mta-examples/tree/main/blue-green-deploy-strategy) - where the production environments are called “live” and “idle” during deployment. This strategy is activated with `mtaDeployParameters: --strategy blue-green --skip-testing-phase` and `deployType=standard`. After deployment, appnames are not appeneded by any suffix like `-live` or `-idle`.<br>
* [Legacy Blue-Green Deployment](https://github.com/SAP-samples/cf-mta-examples/tree/main/blue-green-deploy-legacy) - 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
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.

| deployType | MTA Applications | Non MTA Applications |
|-------------|-----------------|----------------------|
| **standard** | deployTool = mtaDeployPlugin <br> Uses MTA plugin, <br> Piper calls command `cf deploy` | deployTool = cf_native <br> cf CLI used <br> Piper calls command `cf push` <br> Requires Manifest file and app name <br> appname can be provided as step parameter or via manifest file. |
| **blue-green** | deployTool = mtaDeployPlugin, <br> Uses MTA plugin <br> Piper calls command `cf deploy bgdeploy` | Deprecated. <br> **Alternative:** Rolling deployment strategy by setting parameter <br> `cfNativeDeployParameters = '--strategy rolling'` |
| **deployDockerImage** | Not supported | Supported, Docker credentials can only be provided as Jenkins environment variable. |
#### Deployment Strategy Comparison

This table compares deployment strategies for MTA and Non-MTA applications.

| deployType | MTA Applications | Non MTA Applications |
|---------------|-----------------|----------------------|
| **standard** | deployTool = mtaDeployPlugin <br> Uses MTA plugin, <br> Command run `cf deploy` | deployTool = cf_native <br> cf CLI used <br> Command `cf push` <br> Requires Manifest file and app name <br> appname can be provided via config or manifest file. |
| **blue-green** | deployTool = mtaDeployPlugin, <br> Uses MTA plugin <br> Command run `cf deploy bgdeploy` | Deprecated. <br> **Alternative:** Rolling deployment strategy by setting <br> `cfNativeDeployParameters = '--strategy rolling'` |
| | **deployDockerImage not supported** | **deployDockerImage supported**<br>Docker credentials can only be provided as Jenkins environment variable. |

!!! 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.
Expand Down
4 changes: 2 additions & 2 deletions resources/metadata/cloudFoundryDeploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ metadata:
description: "Deploys an application to Cloud Foundry"
longDescription: |
Deploys an application to a test or production space within Cloud Foundry.
This step supports two deployment types
This step supports two deployment types:
* in a standard way with some possible system downtime during app deployment
* in a standard way
* in a zero-downtime manner using a [blue-green deployment approach](https://martinfowler.com/bliki/BlueGreenDeployment.html)
The step achieves this via following deploy tools
Expand Down

0 comments on commit 0cfce38

Please sign in to comment.