Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Commit

Permalink
Merge branch 'prepare-release' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
s4sdkJenkinsBot committed Mar 20, 2020
2 parents b60bdc4 + 661ffbc commit bb3ccb7
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 16 deletions.
70 changes: 55 additions & 15 deletions configuration.md
Expand Up @@ -343,11 +343,30 @@ checkmarxScan:

| Property | Mandatory | Default Value | Description |
| --- | --- | --- | --- |
|`cfCreateServices`| | | The list of services which should be created before deploying the application as defined below. |
| `cfTargets` | | | The list of productive Cloud Foundry deployment targets to be deployed when a build of your productive branch succeeds. |
| `neoTargets`| | | The list of productive Neo deployment targets to be deployed when a build of your productive branch succeeds. |
| `appUrls` | | | The URLs under which the app is available after deployment. Each appUrl can be a string with the URL or a map containing a property url and a property credentialId. An example is shown in the configuration for the stage endToEndTests. |
| `tmsUpload` | | | The paramaters which are needed to enable step 'tmsUpload'. |

#### cfCreateServices

The option `cfCreateServices` is especially useful if you don't use MTA and need a way to declaratively define which services should be created in Cloud Foundry.
The following properties can be defined for each element in the list.
For a detailed documentation of the indivitual properties please consult the [step documentation](https://sap.github.io/jenkins-library/steps/cloudFoundryCreateService/).

| Property | Mandatory | Default Value | Description |
| --- | --- | --- | --- |
| `org` | X** | | The organization where you want to deploy your app. |
| `space` | X** | | The space where you want to deploy your app. |
| `serviceManifest`| X** | | Manifest file that needs to be used defining the services. |
| `manifestVariablesFiles`| X** | | Variables that should be replaced in the service manifest file. |
| `credentialsId` | X**| | ID to the credentials that will be used to connect to the Cloud Foundry account. |
| `apiEndpoint` | X** | | URL to the Cloud Foundry endpoint. |

** The parameters can either be specified here or for the step `cloudFoundryDeploy` or globally in the general section under the key `cloudFoundry`.

#### cfTargets and neoTargets
You can either specify the property `cfTargets` or `neoTargets`.

For `cfTargets` the following properties can be defined:
Expand All @@ -363,22 +382,36 @@ For `cfTargets` the following properties can be defined:
| `mtaExtensionDescriptor` | | | (**Only for MTA-projects**) Path to the mta extension description file. For more information on how to use those extension files please visit the [SAP HANA Developer Guide](https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.02/en-US/51ac525c78244282919029d8f5e2e35d.html). |
| `mtaExtensionCredentials` | | | (**Only for MTA-projects**) Map of credentials that need to be replaced in the `mtaExtensionDescriptor`. This map needs to be created as `value-to-be-replaced`:`id-of-a-credential-in-jenkins` |

** The parameters can either be specified here or globally for the step `cloudFoundryDeploy`.
** The parameters can either be specified here or for the step `cloudFoundryDeploy` or globally in the general section under the key `cloudFoundry`.

Example:
#### Examples

```yaml
productionDeployment:
appUrls:
- url: <application url>
credentialId: e2e-test-user-cf
cfTargets:
- space: 'Prod'
org: 'myorg'
appName: 'exampleapp'
manifest: 'manifest.yml'
credentialsId: 'CF-DEPLOY'
apiEndpoint: '<Cloud Foundry API endpoint>'
general:
cloudFoundry:
org: 'myorg'
space: 'Prod'
apiEndpoint: 'https://api.cf.sap.hana.ondemand.com'
credentialsId: 'CF-DEPLOY-DEFAULT'
manifestVariablesFiles: ['manifest-variables.yml']
stages:
productionDeployment:
appUrls:
- url: <application url>
credentialId: e2e-test-user-cf
cfCreateServices:
- serviceManifest: 'services-manifest.yml'
- serviceManifest: 'services-manifest.yml'
space: 'Prod2'
org: 'myorg2'
cfTargets:
- appName: 'exampleapp'
manifest: 'manifest.yml'
- space: 'Prod2'
org: 'myorg2'
appName: 'exampleapp'
manifest: 'manifest.yml'
credentialsId: 'CF-DEPLOY-PROD1'
```

The MTA projects can make use of the extension files and one can use a Jenkins credential store to inject the credentials during runtime instead of storing them as a plain text in the extension file.
Expand Down Expand Up @@ -576,14 +609,20 @@ The following example shows how to enable thresholds for linting:
```yaml
lint:
ui5BestPractices:
enableES6: true
esLanguageLevel: es2020
failThreshold:
error: 3
warning: 5
info: 7
```

To enable ES6 language features, set the flag `enableES6` to `true` as in the example above.
Modern JavaScript language features are not supported by default in the linter.
To set a specific level, set `esLanguageLevel` to `es6`, `es2017` (equal to ES8) or `es2020` (equal to ES11).
See ["Specifying Environments" in the ESLint docs](https://eslint.org/docs/user-guide/configuring#specifying-environments) for background on the related ESLint settings.

Note: In former versions a flag `enableES6` was provided.
This is is deprecated in favor of `esLanguageLevel` which is more flexible.
To get the same, please configure `esLanguageLevel: es6`.

Since linting is a highly subjective topic, a general purpose pipeline cannot include all linting tools a development team might want to use as part of their pipeline.
For this reason, the [pipeline extensibility](doc/pipeline/extensibility.md) feature can be used to integrate your own linters.
Expand Down Expand Up @@ -818,6 +857,7 @@ All configuration parameters as stated in [jenkins-library documentation](https:
| Property | Mandatory | Default Value | Description |
| --- | --- | --- | --- |
| `dockerImage` | | `ppiper/cf-cli` | Docker image including the Cloud Foundry cli |
| `broker` | | | You can specify the broker which should be used to create the service. This might be required if the service is provided by multiple brokers. |

#### debugReportArchive
The `debugReportArchive` step can be used to create confidential (instead of redacted) debug reports.
Expand Down
2 changes: 1 addition & 1 deletion s4sdk-pipeline.groovy
@@ -1,6 +1,6 @@
#!/usr/bin/env groovy

final def pipelineSdkVersion = 'v29'
final def pipelineSdkVersion = 'v30'

pipeline {
agent any
Expand Down

0 comments on commit bb3ccb7

Please sign in to comment.