1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
| pipeline {
agent any
options { skipDefaultCheckout() }
stages {
stage('Checkout PatchSet') {
steps {
checkout scmGit(
branches: [[name: 'FETCH_HEAD']],
extensions: [
cloneOption(
depth: 1,
shallow: true,
noTags: true,
),
[$class: 'UserIdentity', email: '[email protected]', name: 'Jenkins']
],
userRemoteConfigs: [[
credentialsId: '<CRED_ID>',
refspec: '${GERRIT_REFSPEC}',
url: "ssh://jenkins@${GERRIT_HOST}:${GERRIT_PORT}/${GERRIT_PROJECT}"
]]
)
}
}
}
}
|