You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-11-06 09:09:19 +02:00
Deprecate transportRequestCreate & transportRequestRelease (#3741)
* deprecate transportRequestCreate and transportRequestRelease * add addBadge and createSummary method to Test classes Co-authored-by: Thorsten Duda <thorsten.duda@sap.com> Co-authored-by: Roland Stengel <r.stengel@sap.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
## ${docGenDescription}
|
||||
|
||||
**Note:** This step is deprecated.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* Solution Manager version `ST720 SP08` or newer.
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
## ${docGenDescription}
|
||||
|
||||
**Note:** This step is deprecated.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* No prerequisites
|
||||
|
||||
@@ -160,9 +160,7 @@ nav:
|
||||
- spinnakerTriggerPipeline: steps/spinnakerTriggerPipeline.md
|
||||
- testsPublishResults: steps/testsPublishResults.md
|
||||
- tmsUpload: steps/tmsUpload.md
|
||||
- transportRequestCreate: steps/transportRequestCreate.md
|
||||
- transportRequestDocIDFromGit: steps/transportRequestDocIDFromGit.md
|
||||
- transportRequestRelease: steps/transportRequestRelease.md
|
||||
- transportRequestReqIDFromGit: steps/transportRequestReqIDFromGit.md
|
||||
- transportRequestUploadCTS: steps/transportRequestUploadCTS.md
|
||||
- transportRequestUploadRFC: steps/transportRequestUploadRFC.md
|
||||
@@ -176,6 +174,8 @@ nav:
|
||||
- artifactSetVersion: steps/artifactSetVersion.md
|
||||
- checkChangeInDevelopment: steps/checkChangeInDevelopment.md
|
||||
- npmExecute: steps/npmExecute.md
|
||||
- transportRequestCreate: steps/transportRequestCreate.md
|
||||
- transportRequestRelease: steps/transportRequestRelease.md
|
||||
- transportRequestUploadFile: steps/transportRequestUploadFile.md
|
||||
- gctsExecuteABAPUnitTests: steps/gctsExecuteABAPUnitTests.md
|
||||
- 'Command line tool': cli/index.md
|
||||
|
||||
@@ -61,6 +61,8 @@ public class TransportRequestCreateTest extends BasePiperTest {
|
||||
]
|
||||
]
|
||||
]
|
||||
helper.registerAllowedMethod('addBadge', [Map], {return})
|
||||
helper.registerAllowedMethod('createSummary', [Map], {return})
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
@@ -53,6 +53,8 @@ public class TransportRequestReleaseTest extends BasePiperTest {
|
||||
]
|
||||
]
|
||||
Utils.metaClass.echo = { def m -> }
|
||||
helper.registerAllowedMethod('addBadge', [Map], {return})
|
||||
helper.registerAllowedMethod('createSummary', [Map], {return})
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
@@ -124,6 +124,8 @@ void call(Map parameters = [:]) {
|
||||
def script = checkScript(this, parameters) ?: this
|
||||
String stageName = parameters.stageName ?: env.STAGE_NAME
|
||||
|
||||
addPipelineWarning(script, "Deprecation Warning", "The step ${STEP_NAME} is deprecated. Follow the documentation for options.")
|
||||
|
||||
ChangeManagement cm = parameters.cmUtils ?: new ChangeManagement(script)
|
||||
|
||||
ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this)
|
||||
@@ -224,3 +226,16 @@ void call(Map parameters = [:]) {
|
||||
script.commonPipelineEnvironment.setValue('transportRequestId', "${transportRequestId}")
|
||||
}
|
||||
}
|
||||
|
||||
static void addPipelineWarning(Script script, String heading, String message) {
|
||||
script.echo '[WARNING] ' + message
|
||||
script.addBadge(icon: "warning.gif", text: message)
|
||||
|
||||
String html =
|
||||
"""
|
||||
<h2>$heading</h2>
|
||||
<p>$message</p>
|
||||
"""
|
||||
|
||||
script.createSummary(icon: "warning.gif", text: html)
|
||||
}
|
||||
|
||||
@@ -81,6 +81,8 @@ void call(Map parameters = [:]) {
|
||||
def script = checkScript(this, parameters) ?: this
|
||||
String stageName = parameters.stageName ?: env.STAGE_NAME
|
||||
|
||||
addPipelineWarning(script, "Deprecation Warning", "The step ${STEP_NAME} is deprecated. Follow the documentation for options.")
|
||||
|
||||
ChangeManagement cm = parameters.cmUtils ?: new ChangeManagement(script)
|
||||
|
||||
ConfigurationHelper configHelper = ConfigurationHelper.newInstance(this)
|
||||
@@ -188,3 +190,16 @@ void call(Map parameters = [:]) {
|
||||
echo "[INFO] Transport Request '${configuration.transportRequestId}' has been successfully closed."
|
||||
}
|
||||
}
|
||||
|
||||
static void addPipelineWarning(Script script, String heading, String message) {
|
||||
script.echo '[WARNING] ' + message
|
||||
script.addBadge(icon: "warning.gif", text: message)
|
||||
|
||||
String html =
|
||||
"""
|
||||
<h2>$heading</h2>
|
||||
<p>$message</p>
|
||||
"""
|
||||
|
||||
script.createSummary(icon: "warning.gif", text: html)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user