You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-09-16 09:26:22 +02:00
TransportRequestUploadFile migration to Go - Documentation (#3102)
* UploadFile Documentation - migrate documentation to GO steps - adjust UploadFile references
This commit is contained in:
@@ -55,6 +55,7 @@ node() {
|
||||
stage('prepare') {
|
||||
checkout scm
|
||||
setupCommonPipelineEnvironment script:this
|
||||
transportRequestDocIDFromGit( script: this )
|
||||
checkChangeInDevelopment script: this
|
||||
}
|
||||
|
||||
@@ -64,7 +65,7 @@ node() {
|
||||
|
||||
stage('uploadToTransportRequest') {
|
||||
transportRequestCreate script: this
|
||||
transportRequestUploadFile script:this
|
||||
transportRequestUploadSOLMAN script:this
|
||||
transportRequestRelease script: this
|
||||
}
|
||||
|
||||
@@ -85,7 +86,7 @@ steps:
|
||||
buildTarget: 'NEO'
|
||||
transportRequestCreate:
|
||||
developmentSystemId: '<value for developmentSystemId>'
|
||||
transportRequestUploadFile:
|
||||
transportRequestUploadSOLMAN:
|
||||
applicationId: 'HCP'
|
||||
```
|
||||
|
||||
@@ -96,5 +97,6 @@ For the detailed description of the relevant parameters, see:
|
||||
* [checkChangeInDevelopment](../../steps/checkChangeInDevelopment/)
|
||||
* [mtaBuild](../../steps/mtaBuild/)
|
||||
* [transportRequestCreate](../../steps/transportRequestCreate/)
|
||||
* [transportRequestUploadFile](../../steps/transportRequestUploadFile/)
|
||||
* [transportRequestDocIDFromGit](../../steps/transportRequestDocIDFromGit/)
|
||||
* [transportRequestUploadSOLMAN](../../steps/transportRequestUploadSOLMAN/)
|
||||
* [transportRequestRelease](../../steps/transportRequestRelease/)
|
||||
|
@@ -27,11 +27,11 @@ Depending on the modules in your MTA, additional configuration files are require
|
||||
|
||||
This scenario combines various different steps to create a complete pipeline.
|
||||
|
||||
In this scenario, we want to show how to build an application based on SAPUI5 or SAP Fiori by using the MTA concept and how to attach the build result to a transport request inside an ABAP system. This document comprises the [mtaBuild](../../../steps/mtaBuild/) and the [transportRequestUploadFile](../../../steps/transportRequestUploadFile/) steps.
|
||||
In this scenario, we want to show how to build an application based on SAPUI5 or SAP Fiori by using the MTA concept and how to attach the build result to a transport request inside an ABAP system. This document comprises the [mtaBuild](../../../steps/mtaBuild/) step and the [transportRequestUploadRFC](../../../steps/transportRequestUploadRFC/) respectively the [transportRequestUploadCTS](../../../steps/transportRequestUploadCTS/) step.
|
||||
|
||||
In case of an RFC based upload the binary is not streamed to the ABAP endpoint. Instead an URL pointing to the binary needs to be provided. Hence the binary must be published first so that it can be accessed via HTTP. This can happen by uploading the binary to a blob store or by archiving the artifact on Jenkins. The corresponding URL needs to be provided when the artifact is attached to the transport request.
|
||||
|
||||
The transport request can be created on the fly (see [transportRequestCreate](../../../steps/transportRequestCreate/)) or we can use an already existing transport request. In case we use an already existing transport request Id the transport request Id needs to be provided in the git commit history (see example below) or the transport request Id needs to be provided inside the job (e.g. as a job parameter).
|
||||
The transport request can be created on the fly (see [transportRequestCreate](../../../steps/transportRequestCreate/)) or we can use an already existing transport request. In case we use an already existing transport request Id the transport request Id needs to be provided in the git commit history (see [transportRequestReqIDFromGit](../../../steps/transportRequestReqIDFromGit/)) or the transport request Id needs to be provided inside the job (e.g. as a job parameter).
|
||||
|
||||
The transport request can be closed by the pipeline job (see [transportRequestRelease](../../../steps/transportRequestRelease/)).
|
||||
|
||||
@@ -99,7 +99,7 @@ pipeline {
|
||||
// This attaches the deployable to a transport request
|
||||
stage('attach') {
|
||||
steps {
|
||||
transportRequestUploadFile script: this,
|
||||
transportRequestUploadRFC script: this,
|
||||
transportRequestId: '<TRANSPORT_REQUEST_ID>', // This can be omitted if present inside a Git commit message
|
||||
applicationUrl: '<THE_URL_TO_THE_DEPLOYABLE_ACCORDING_TO_PUBLISH_STAGE>'
|
||||
}
|
||||
@@ -113,27 +113,17 @@ pipeline {
|
||||
This is a basic configuration example, which is also located in the sources of the project.
|
||||
|
||||
```yaml
|
||||
general:
|
||||
changeManagement:
|
||||
type: 'RFC'
|
||||
endpoint: 'the RFC endpoint' # e.g. example.com'
|
||||
credentialsId: 'RFC' # The ID under which the credentials are provided on Jenkins defaults to 'CM'
|
||||
rfc:
|
||||
developmentInstance: '01' # needs to be adjusted
|
||||
developmentClient: '001' # needs to be adjusted
|
||||
docker:
|
||||
image: '<imageId>' # the image needs to be built on user side. The corresponding ID needs to be provided here.
|
||||
options: []
|
||||
envVars: {}
|
||||
pullImage: true|false # true if the image is provided by a company-specific Docker registry
|
||||
|
||||
steps:
|
||||
transportRequestUploadFile:
|
||||
codePage: <the code page>, # e.g. 'Cp1252'
|
||||
acceptUnixStyleLineEndings: true|false
|
||||
applicationName: '/your/application/name'
|
||||
applicationDescription: 'Application description'
|
||||
abapPackage: '/abap/package'
|
||||
transportRequestUploadRFC:
|
||||
changeManagement:
|
||||
endpoint: 'https://your.rfc.endpoint.com/' # e.g. example.com'
|
||||
credentialsId: 'RFC' # The ID under which the credentials are provided on Jenkins defaults to 'CM'
|
||||
instance: '01' # needs to be adjusted
|
||||
client: '001' # needs to be adjusted
|
||||
abapPackage: 'YOURPACK'
|
||||
applicationName: 'YOURAPP'
|
||||
applicationDescription: 'Your application description'
|
||||
dockerImage: 'my/rfc-client'
|
||||
```
|
||||
|
||||
### Upload via ODATA
|
||||
@@ -161,17 +151,23 @@ pipeline {
|
||||
|
||||
stage('build') {
|
||||
steps {
|
||||
// It depends on your project, what needs to be done here. Maybe it's sufficient to zip the sources
|
||||
mtaBuild script: this
|
||||
// It depends on your project, what needs to be done here.
|
||||
// Use the SAPUI5 toolset to build your SAPUI5 application
|
||||
// and run the build command of the npmExecuteScripts step.
|
||||
npmExecuteScripts(script: this, runScripts: ['build'])
|
||||
}
|
||||
}
|
||||
|
||||
// This attaches the deployable to a transport request,
|
||||
// if you have a prior call to mtaBuild, this step sets the deployable
|
||||
// Get the transport request id from your git commit message.
|
||||
stage('request') {
|
||||
steps {
|
||||
transportRequestReqIDFromGit( script: this )
|
||||
}
|
||||
}
|
||||
// This attaches the deployable to a transport request.
|
||||
// Note: ODATA/CTS does not support the mtaBuild tool.
|
||||
stage('attach') {
|
||||
steps {
|
||||
transportRequestUploadFile script: this,
|
||||
transportRequestId: '<TRANSPORT_REQUEST_ID>' // This can be omitted if present inside a Git commit message
|
||||
transportRequestUploadCTS script: this)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -183,17 +179,22 @@ pipeline {
|
||||
This is a basic configuration example, which is also located in the sources of the project.
|
||||
|
||||
```yaml
|
||||
general:
|
||||
changeManagement:
|
||||
type: 'CTS'
|
||||
endpoint: 'the ODATA endpoint' # e.g. 'http://example.org/sap/opu/odata/SAP/SCTS_CLOUD_API_ODATA_SRV/'
|
||||
credentialsId: 'CTS' # The ID under which the credentials are provided on Jenkins defaults to 'CM'
|
||||
clientOpts: '' # additional java options, e.g. '-Djavax.net.ssl.trustStore=/path/to/truststore.jks'
|
||||
steps:
|
||||
transportRequestUploadCTS:
|
||||
changeManagement:
|
||||
endpoint: 'http://your.odata.endpoint/'
|
||||
credentialsId: 'CTS' # The ID under which the credentials are provided on Jenkins defaults to 'CM'
|
||||
clientOpts: '' # additional java options, e.g. '-Djavax.net.ssl.trustStore=/path/to/truststore.jks'
|
||||
client: '001'
|
||||
abapPackage: 'YOURPACK'
|
||||
applicationName: 'YOURAPP'
|
||||
applicationDescription: 'Your description'
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
For the detailed description of the relevant parameters, see:
|
||||
|
||||
* [mtaBuild](https://sap.github.io/jenkins-library/steps/mtaBuild/)
|
||||
* [transportRequestUploadFile](https://sap.github.io/jenkins-library/steps/transportRequestUploadFile/)
|
||||
* [transportRequestUploadCTS](../../../steps/transportRequestUploadCTS/)
|
||||
* [transportRequestReqIDFromGit](../../../steps/transportRequestReqIDFromGit/)
|
||||
* [npmExecuteScripts](../../../steps/npmExecuteScripts/)
|
||||
|
@@ -156,7 +156,6 @@ steps:
|
||||
client: '001'
|
||||
abapPackage: 'PACK'
|
||||
applicationName: 'APP'
|
||||
applicationDescription: 'Lorem ipsum'
|
||||
```
|
||||
|
||||
```groovy
|
||||
|
@@ -2,9 +2,42 @@
|
||||
|
||||
## ${docGenDescription}
|
||||
|
||||
## Prerequisites
|
||||
**Note:** This step is deprecated. Use the transport type specific steps instead.
|
||||
|
||||
* No prerequisites
|
||||
| Type | Step |
|
||||
| ------------- | ------------- |
|
||||
| SOLMAN | [transportRequestUploadSOLMAN](transportRequestUploadSOLMAN.md) |
|
||||
| RFC | [transportRequestUploadRFC](transportRequestUploadRFC.md) |
|
||||
| CTS | [transportRequestUploadCTS](transportRequestUploadCTS.md) |
|
||||
|
||||
You can keep most of the step specific configuration parameters in your configuration file `config.yml` untouched. The new steps support the old naming convention. However, it is recommended to adjust your parameters to the new steps.
|
||||
|
||||
Following parameters are not supported anymore. Adjust as indicated.
|
||||
|
||||
| Unsupported Parameter | Change Notice |
|
||||
| ------------- | ------------- |
|
||||
| changeManagement/`<type>`/docker/envVars | Use `dockerEnvVars` instead. |
|
||||
| changeManagement/`<type>`/docker/image | Use `dockerImage` instead. |
|
||||
| changeManagement/`<type>`/docker/options | Use `dockerOptions` instead. |
|
||||
| changeManagement/`<type>`/docker/pullImage | Use `dockerPullImage` instead. |
|
||||
| changeManagement/git/format | This parameter has been dropped. Make sure that your change document IDs and transport request IDs are part of the Git commit message body. |
|
||||
|
||||
```yaml
|
||||
general:
|
||||
changeManagement:
|
||||
type: 'RFC'
|
||||
# old
|
||||
rfc:
|
||||
docker:
|
||||
image: 'my/rfc-client'
|
||||
|
||||
#new
|
||||
steps:
|
||||
transportRequestUploadRFC:
|
||||
dockerImage: 'my/rfc-client'
|
||||
```
|
||||
|
||||
**Note:** The new steps do not comprise the retrieval of the change document ID and the transport request ID from the Git repository. Use the steps [transportRequestDocIDFromGit](transportRequestDocIDFromGit.md) and [transportRequestReqIDFromGit](transportRequestReqIDFromGit.md) instead.
|
||||
|
||||
## ${docGenParameters}
|
||||
|
||||
@@ -64,8 +97,10 @@ The parameters can also be provided when the step is invoked. For examples see b
|
||||
|
||||
## CTS Uploads
|
||||
|
||||
In order to be able to upload the application, it is required to build the application, e.g. via `npmExecute`
|
||||
or `mtaBuild`. The content of the app needs to be provided in a folder named `dist` in the root level of the project.
|
||||
In order to be able to upload the application, it is required to build the application, e.g. via [npmExecuteScripts](npmExecuteScripts.md). The content of the app needs to be provided in a folder named `dist` in the root level of the project.
|
||||
|
||||
**Note:** Do not use the `mtaBuild` step. The MTA Build Tool `mta` is dedicated to the SAP Business Technology Platform. It does neither create the expected `dist` folder nor the compliant content.
|
||||
|
||||
Although the name of the step `transportRequestUploadFile` might suggest something else, in this case a folder needs
|
||||
to be provided. The application, which is provided in the `dist` folder is zipped and uploaded by the fiori toolset
|
||||
used for performing the upload.
|
||||
|
@@ -151,8 +151,7 @@ nav:
|
||||
- transportRequestDocIDFromGit: steps/transportRequestDocIDFromGit.md
|
||||
- transportRequestRelease: steps/transportRequestRelease.md
|
||||
- transportRequestReqIDFromGit: steps/transportRequestReqIDFromGit.md
|
||||
- transportRequestUploadCTS: steps/transportRequestUploadRFC.md
|
||||
- transportRequestUploadFile: steps/transportRequestUploadFile.md
|
||||
- transportRequestUploadCTS: steps/transportRequestUploadCTS.md
|
||||
- transportRequestUploadRFC: steps/transportRequestUploadRFC.md
|
||||
- transportRequestUploadSOLMAN: steps/transportRequestUploadSOLMAN.md
|
||||
- uiVeri5ExecuteTests: steps/uiVeri5ExecuteTests.md
|
||||
@@ -163,6 +162,7 @@ nav:
|
||||
- 'Library Steps (deprecated)':
|
||||
- artifactSetVersion: steps/artifactSetVersion.md
|
||||
- npmExecute: steps/npmExecute.md
|
||||
- transportRequestUploadFile: steps/transportRequestUploadFile.md
|
||||
- 'Command line tool': cli/index.md
|
||||
|
||||
theme:
|
||||
|
@@ -135,6 +135,7 @@ import static com.sap.piper.cm.StepHelpers.getBackendTypeAndLogInfoIfCMIntegrati
|
||||
'abapPackage',
|
||||
/** The code page of your ABAP system. E.g. UTF-8. */
|
||||
'codePage', //RFC
|
||||
/** If unix style line endings should be accepted. Only for `RFC`.*/
|
||||
'acceptUnixStyleLineEndings', // RFC
|
||||
/** @see transportRequestCreate */
|
||||
'verbose', // RFC
|
||||
|
Reference in New Issue
Block a user