mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
Merge pull request #192 from marcusholl/pr/CamelCaseInsteadUnderscore
camel case instead underscore
This commit is contained in:
commit
0ccabb7c40
@ -17,17 +17,17 @@ range and the pattern can be configured. For details see 'parameters' table.
|
||||
| `changeDocumentId` | yes | | |
|
||||
| `credentialsId` | yes | | |
|
||||
| `endpoint` | yes | | |
|
||||
| `git_from` | no | `origin/master` | |
|
||||
| `git_to` | no | `HEAD` | |
|
||||
| `git_label` | no | `ChangeDocument\s?:` | regex pattern |
|
||||
| `gitFrom` | no | `origin/master` | |
|
||||
| `gitTo` | no | `HEAD` | |
|
||||
| `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.
|
||||
* `changeDocumentId` - The id of the change document to transport. If not provided, it is retrieved from the git commit history.
|
||||
* `credentialsId` - The credentials to connect to the Solution Manager.
|
||||
* `endpoint` - The address of the Solution Manager.
|
||||
* `git_from` - The starting point for retrieving the change document id
|
||||
* `git_to` - The end point for retrieving the change document id
|
||||
* `git_label` - A pattern used for identifying lines holding the change document id.
|
||||
* `gitFrom` - The starting point for retrieving the change document id
|
||||
* `gitTo` - The end point for retrieving the change document id
|
||||
* `gitChangeDocumentLabel` - A pattern used for identifying lines holding the change document id.
|
||||
|
||||
## Step configuration
|
||||
The following parameters can also be specified as step parameters using the global configuration file:
|
||||
|
@ -24,12 +24,12 @@ public class ChangeManagement implements Serializable {
|
||||
return config.changeDocumentId
|
||||
}
|
||||
|
||||
script.echo "[INFO] Retrieving changeDocumentId from git commit(s) [FROM: ${config.git_from}, TO: ${config.git_to}]"
|
||||
script.echo "[INFO] Retrieving changeDocumentId from git commit(s) [FROM: ${config.gitFrom}, TO: ${config.gitTo}]"
|
||||
def changeDocumentId = getChangeDocumentId(
|
||||
config.git_from,
|
||||
config.git_to,
|
||||
config.git_label,
|
||||
config.git_format
|
||||
config.gitFrom,
|
||||
config.gitTo,
|
||||
config.gitChangeDocumentLabel,
|
||||
config.gitFormat
|
||||
)
|
||||
script.echo "[INFO] ChangeDocumentId '${changeDocumentId}' retrieved from git commit(s)."
|
||||
|
||||
|
@ -100,10 +100,10 @@ public class ChangeManagementTest extends BasePiperTest {
|
||||
|
||||
String[] changeIds = [ 'a' ];
|
||||
|
||||
def params = [ git_from: 'origin/master',
|
||||
git_to: 'HEAD',
|
||||
git_label: 'ChangeDocument\\s?:',
|
||||
git_format: '%b']
|
||||
def params = [ gitFrom: 'origin/master',
|
||||
gitTo: 'HEAD',
|
||||
gitChangeDocumentLabel: 'ChangeDocument\\s?:',
|
||||
gitFormat: '%b']
|
||||
|
||||
def changeID = new ChangeManagement(nullScript, gitUtilsMock(true, changeIds)).getChangeDocumentId(params)
|
||||
|
||||
|
@ -14,10 +14,10 @@ import com.sap.piper.cm.ChangeManagementException
|
||||
'credentialsId',
|
||||
'endpoint',
|
||||
'failIfStatusIsNotInDevelopment',
|
||||
'git_from',
|
||||
'git_to',
|
||||
'git_label',
|
||||
'git_format'
|
||||
'gitFrom',
|
||||
'gitTo',
|
||||
'gitChangeDocumentLabel',
|
||||
'gitFormat'
|
||||
]
|
||||
|
||||
@Field Set stepConfigurationKeys = [
|
||||
@ -26,10 +26,10 @@ import com.sap.piper.cm.ChangeManagementException
|
||||
'credentialsId',
|
||||
'endpoint',
|
||||
'failIfStatusIsNotInDevelopment',
|
||||
'git_from',
|
||||
'git_to',
|
||||
'git_label',
|
||||
'git_format'
|
||||
'gitFrom',
|
||||
'gitTo',
|
||||
'gitChangeDocumentLabel',
|
||||
'gitFormat'
|
||||
]
|
||||
|
||||
def call(parameters = [:]) {
|
||||
|
Loading…
Reference in New Issue
Block a user