summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-12-12 21:04:21 +0100
committerChristian Poessinger <christian@poessinger.com>2019-12-12 21:19:37 +0100
commitde2716ae67a8d88886686fbd7e8db33b6e1a5ebd (patch)
tree90fd9c7f33bc17d86f3d0fc8659eed06972e9072
parent325b3fd14ce7a021ad347231a768f992b97b6804 (diff)
downloadvyos-1x-de2716ae67a8d88886686fbd7e8db33b6e1a5ebd.tar.gz
vyos-1x-de2716ae67a8d88886686fbd7e8db33b6e1a5ebd.zip
Jenkins: T1870: add 'PR-' prefix to pull request refspec
-rw-r--r--Jenkinsfile22
1 files changed, 10 insertions, 12 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
index d5be6d5c9..67787f659 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -88,18 +88,16 @@ pipeline {
steps {
script {
dir('build') {
- checkout([
- $class: 'GitSCM',
- branches: [[name: getGitBranchName()]],
- doGenerateSubmoduleConfigurations: false,
- extensions: [[$class: 'CleanCheckout']],
- submoduleCfg: [],
- userRemoteConfigs: [[
- refspec: '+refs/pull/*/head' +
- ':refs/remotes/origin/*',
- url: getGitRepoURL()
- ]]
- ])
+ scm {
+ git {
+ remote {
+ name(getGitRepoName())
+ url(getGitRepoURL())
+ refspec('+refs/pull/*:refs/remotes/origin/pr/*')
+ }
+ branch('${sha1}')
+ }
+ }
}
}
}