1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-06-29 00:51:34 +02:00

Switch from gitLabel to gitChangeDocumentLabel

since we will have two labels in future. One for scanning changeDocumentIds and
another one for scanning transportRequestIds
This commit is contained in:
Marcus Holl
2018-07-09 14:54:49 +02:00
parent 71ca78e0a9
commit bb2ed27c10
4 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@ range and the pattern can be configured. For details see 'parameters' table.
| `endpoint` | yes | | | | `endpoint` | yes | | |
| `gitFrom` | no | `origin/master` | | | `gitFrom` | no | `origin/master` | |
| `gitTo` | no | `HEAD` | | | `gitTo` | no | `HEAD` | |
| `gitLabel` | no | `ChangeDocument\s?:` | regex pattern | | `gitChangeDocumentLabel` | no | `ChangeDocument\s?:` | regex pattern |
* `script` - The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the `this` parameter, as in `script: this`. This allows the function to access the [`commonPipelineEnvironment`](commonPipelineEnvironment.md) for retrieving, for example, configuration parameters. * `script` - The common script environment of the Jenkinsfile running. Typically the reference to the script calling the pipeline step is provided with the `this` parameter, as in `script: this`. This allows the function to access the [`commonPipelineEnvironment`](commonPipelineEnvironment.md) for retrieving, for example, configuration parameters.
* `changeDocumentId` - The id of the change document to transport. If not provided, it is retrieved from the git commit history. * `changeDocumentId` - The id of the change document to transport. If not provided, it is retrieved from the git commit history.
@ -27,7 +27,7 @@ range and the pattern can be configured. For details see 'parameters' table.
* `endpoint` - The address of the Solution Manager. * `endpoint` - The address of the Solution Manager.
* `gitFrom` - The starting point for retrieving the change document id * `gitFrom` - The starting point for retrieving the change document id
* `gitTo` - The end point for retrieving the change document id * `gitTo` - The end point for retrieving the change document id
* `gitLabel` - A pattern used for identifying lines holding the change document id. * `gitChangeDocumentLabel` - A pattern used for identifying lines holding the change document id.
## Step configuration ## Step configuration
The following parameters can also be specified as step parameters using the global configuration file: The following parameters can also be specified as step parameters using the global configuration file:

View File

@ -28,7 +28,7 @@ public class ChangeManagement implements Serializable {
def changeDocumentId = getChangeDocumentId( def changeDocumentId = getChangeDocumentId(
config.gitFrom, config.gitFrom,
config.gitTo, config.gitTo,
config.gitLabel, config.gitChangeDocumentLabel,
config.gitFormat config.gitFormat
) )
script.echo "[INFO] ChangeDocumentId '${changeDocumentId}' retrieved from git commit(s)." script.echo "[INFO] ChangeDocumentId '${changeDocumentId}' retrieved from git commit(s)."

View File

@ -102,7 +102,7 @@ public class ChangeManagementTest extends BasePiperTest {
def params = [ gitFrom: 'origin/master', def params = [ gitFrom: 'origin/master',
gitTo: 'HEAD', gitTo: 'HEAD',
gitLabel: 'ChangeDocument\\s?:', gitChangeDocumentLabel: 'ChangeDocument\\s?:',
gitFormat: '%b'] gitFormat: '%b']
def changeID = new ChangeManagement(nullScript, gitUtilsMock(true, changeIds)).getChangeDocumentId(params) def changeID = new ChangeManagement(nullScript, gitUtilsMock(true, changeIds)).getChangeDocumentId(params)

View File

@ -16,7 +16,7 @@ import com.sap.piper.cm.ChangeManagementException
'failIfStatusIsNotInDevelopment', 'failIfStatusIsNotInDevelopment',
'gitFrom', 'gitFrom',
'gitTo', 'gitTo',
'gitLabel', 'gitChangeDocumentLabel',
'gitFormat' 'gitFormat'
] ]
@ -28,7 +28,7 @@ import com.sap.piper.cm.ChangeManagementException
'failIfStatusIsNotInDevelopment', 'failIfStatusIsNotInDevelopment',
'gitFrom', 'gitFrom',
'gitTo', 'gitTo',
'gitLabel', 'gitChangeDocumentLabel',
'gitFormat' 'gitFormat'
] ]