1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

Add an option to clone from specific repository (#2322)

This commit is contained in:
Srinikitha Kondreddy 2020-11-12 20:35:59 +01:00 committed by GitHub
parent 7a04bb9749
commit 6c26a791a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,12 @@ import static com.sap.piper.Prerequisites.checkScript
* Enables the use of technical stage names.
*/
'useTechnicalStageNames',
/**
* Provides a clone from the specified repository.
* This map contains attributes, such as, `branches`, `extensions`, `userRemoteConfigs` etc.
* Example: `[$class: 'GitSCM', branches: [[name: <branch_to_be_cloned>]], userRemoteConfigs: [[credentialsId: <credential_to_access_repository>, url: <repository_url>]]]`.
*/
'checkoutMap',
/**
* Optional path to the pipeline configuration file defining project specific settings.
*/
@ -105,7 +111,7 @@ void call(Map parameters = [:]) {
def stageName = StageNameProvider.instance.getStageName(script, parameters, this)
piperStageWrapper (script: script, stageName: stageName, stashContent: [], ordinal: 1, telemetryDisabled: true) {
def scmInfo = checkout scm
def scmInfo = checkout(parameters.checkoutMap ?: scm)
setupCommonPipelineEnvironment(script: script, customDefaults: parameters.customDefaults, scmInfo: scmInfo,
configFile: parameters.configFile, customDefaultsFromFiles: parameters.customDefaultsFromFiles)