I hereby claim:
- I am antrew on github.
- I am andreyv (https://keybase.io/andreyv) on keybase.
- I have a public key ASCbLnEd2jT5sD3W2uI5XT5I8gohHmW1_moMhhbCzijtPQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!groovy | |
def handleCheckout = { | |
sh "echo 'Checking out a merge request...'" | |
def credentialsId = scm.userRemoteConfigs[0].credentialsId | |
checkout ([ | |
$class: 'GitSCM', | |
branches: [[name: "${env.gitlabSourceNamespace}/${env.gitlabSourceBranch}"]], | |
extensions: [ | |
[$class: 'PruneStaleBranch'], |
#!groovy | |
def handleCheckout = { | |
checkout ([ | |
$class: 'GitSCM', | |
branches: scm.branches, | |
extensions: [ | |
[$class: 'PruneStaleBranch'], | |
[$class: 'CleanCheckout'] | |
], |
#!groovy | |
def handleCheckout = { | |
sh "echo 'Checking out given branch...'" | |
checkout scm | |
} | |
node() { | |
stage('setup') { | |
sh "env | sort" |
def credentialsId = scm.userRemoteConfigs[0].credentialsId | |
checkout ([ | |
$class: 'GitSCM', | |
branches: [[name: "${env.gitlabSourceNamespace}/${env.gitlabSourceBranch}"]], | |
extensions: [ | |
[$class: 'PruneStaleBranch'], | |
[$class: 'CleanCheckout'], | |
[ | |
$class: 'PreBuildMerge', | |
options: [ |
checkout ([ | |
$class: 'GitSCM', | |
branches: scm.branches, | |
extensions: [ | |
[$class: 'PruneStaleBranch'], | |
[$class: 'CleanCheckout'] | |
], | |
userRemoteConfigs: scm.userRemoteConfigs | |
]) |
checkout scm |
#!groovy | |
def handleCheckout = { | |
if (env.gitlabMergeRequestId) { | |
sh "echo 'Merge request detected. Merging...'" | |
def credentialsId = scm.userRemoteConfigs[0].credentialsId | |
checkout ([ | |
$class: 'GitSCM', | |
branches: [[name: "${env.gitlabSourceNamespace}/${env.gitlabSourceBranch}"]], | |
extensions: [ |