1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-04-21 12:17:08 +02:00

100 lines
3.8 KiB
Markdown
Raw Normal View History

2019-04-01 13:54:01 +02:00
# ${docGenStepName}
2017-07-11 15:12:03 +02:00
2019-04-01 13:54:01 +02:00
## ${docGenDescription}
2018-03-23 14:18:48 +01:00
2017-07-11 15:12:03 +02:00
## Prerequisites
SAP CP to SAP BTP Rebranding (#2703) * Update configuration.md * Update build.md * Update cloneRepositories.md * Update integrationTest.md * Update post.md * Update prepareSystem.md * Update publish.md * Update configuration.md * Update configuration.md * Update introduction.md * Update build.md * Update CAP_Scenario.md * Update CAP_Scenario.md * Update abapEnvironmentAddons.md * Update abapEnvironmentAddons.md * Update abapEnvironmentTest.md * Update changeManagement.md * Update Readme.md * Update Readme.md * Update introduction.md * Update abapEnvironmentAssembleConfirm.md * Update abapEnvironmentAssemblePackages.md * Update abapEnvironmentCheckoutBranch.md * Update abapEnvironmentCloneGitRepo.md * Update abapEnvironmentCreateSystem.md * Update abapEnvironmentPullGitRepo.md * Update abapEnvironmentRunATCCheck.md * Update cloudFoundryCreateService.md * Update cloudFoundryCreateSpace.md * Update cloudFoundryDeleteSpace.md * Update mtaBuild.md * Update neoDeploy.md * Update protecodeExecuteScan.md * Update uiVeri5ExecuteTests.md * Update guidedtour.md * Update index.md * Update configuration.md * Update guidedtour.md * Update configuration.md * Update build.md * Update CAP_Scenario.md * Update TMS_Extension.md * Update TMS_Extension.md * Update abapEnvironmentAddons.md * Update abapEnvironmentTest.md * Update Readme.md * Update Readme.md * Update cloudFoundryDeploy.md * Update influxWriteData.md * Update neoDeploy.md * Update CAP_Scenario.md * Update TMS_Extension.md * Update Readme.md * Update Readme.md * Update guidedtour.md * Update guidedtour.md * Update guidedtour.md * Update configuration.md Co-authored-by: Thorsten Duda <thorsten.duda@sap.com>
2021-03-19 10:51:24 +01:00
* **SAP BTP account** - the account to where the application is deployed. To deploy MTA (`deployMode: mta`) an over existing _Java_ application, free _Java Quota_ of at least 1 is required, which means that this will not work on trial accounts.
* **SAP BTP user for deployment** - a user with deployment permissions in the given account.
2017-07-11 15:12:03 +02:00
* **Jenkins credentials for deployment** - must be configured in Jenkins credentials with a dedicated Id.
![Jenkins credentials configuration](../images/neo_credentials.png)
2017-12-28 16:16:02 +01:00
* **Neo Java Web SDK 3.39.10 or compatible version** - can be downloaded from [Maven Central](http://central.maven.org/maven2/com/sap/cloud/neo-java-web-sdk/). This step is capable of triggering the neo deploy tool provided inside a docker image. We provide docker image `ppiper/neo-cli`. `neo.sh` needs to be contained in path, e.g by adding a symbolic link to `/usr/local/bin`.
2017-07-11 15:12:03 +02:00
* **Java 8 or compatible version** - needed by the *Neo-Java-Web-SDK*. Java environment needs to be properly configured (JAVA_HOME, java exectutable contained in path).
2017-07-11 15:12:03 +02:00
2019-04-01 13:54:01 +02:00
## ${docGenParameters}
## ${docGenConfiguration}
2018-03-06 13:43:53 +01:00
## ${docJenkinsPluginDependencies}
2019-05-24 15:41:49 +02:00
2017-07-11 15:12:03 +02:00
## Side effects
2017-07-11 15:12:03 +02:00
none
## Exceptions
* `Exception`:
* If `source` is not provided.
* If `propertiesFile` is not provided (when using `'WAR_PROPERTIESFILE'` deployment mode).
* If `application` is not provided (when using `'WAR_PARAMS'` deployment mode).
* If `runtime` is not provided (when using `'WAR_PARAMS'` deployment mode).
* If `runtimeVersion` is not provided (when using `'WAR_PARAMS'` deployment mode).
* `AbortException`:
* If neo-java-web-sdk is not properly installed.
* `CredentialNotFoundException`:
* If the credentials cannot be resolved.
2017-07-11 15:12:03 +02:00
## Example
2017-07-11 15:12:03 +02:00
```groovy
neoDeploy script: this, source: 'path/to/archiveFile.mtar', neo: [credentialsId: 'my-credentials-id', host: hana.example.org]
2017-07-11 15:12:03 +02:00
```
Example configuration:
```yaml
steps:
<...>
neoDeploy:
deployMode: mta
neo:
account: <myDeployAccount>
host: hana.example.org
```
## Example for invalidating the cache
Set the parameter `invalidateCache` to `true` to clean up the cache of an SAP Fiori launchpad site by refreshing the content of HTML5 applications deployed in it.
**Note:** This section is only applicable for HTML5 applications accessed through an SAP Fiori launchpad site.
Setting this parameter to `true` requires additional configuration:
### Create an OAuth credential
1. In your subaccount, choose **OAuth**.
![OAuth client creation](../images/oauthClientCreation.png)
2. In the **Subscription** field, select the portal landscape to which you would like to subscribe, for example, `portal/nwc` or `portal/sandbox`.
![Portal subscription](../images/portalSubscription.png)
3. From the drop-down menu in the **Authorization Grant** field, choose **Client Credentials**.
4. In the **Secret** field, enter a user-defined password and save your changes.
5. In Jenkins, create new username/password credentials. As username, use the client ID and as password, use the client secret.
### Configure the site ID
When you're logged in to the portal service, you can retrieve the site ID. Either configure it in your configuration file or set the site as default through the **Site Directory** tile.
If you don't set it as default, configure the parameter `siteId` as follows in your configuration file:
```yaml
steps:
<...>
neoDeploy:
neo:
account: <myDeployAccount>
host: hana.example.org
credentialsId: 'my-credentials-id'
invalidateCache: true
portalLandscape: "cloudnwcportal"
oauthCredentialId: <OAUTH_CREDENTIAL_ID>
siteId: <PORTAL_SITE_ID> # not required, if the default site is already set in the portal service (SAP Cloud Platform)
```