ci: checkout the PR when running jjb-validate

Using the 'git' function in groovy does not allow checking out a
non-branch, so use the 'checkout' function instead.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-05-27 16:44:12 +02:00
parent 8f4a556dcc
commit d2905081b3

View File

@ -20,7 +20,9 @@
node {
stage('checkout ci repository') {
git url: "${GIT_REPO}", branch: "${GIT_BRANCH}", changelog: false
checkout([$class: 'GitSCM', branches: [[name: 'FETCH_HEAD']],
userRemoteConfigs: [[url: "${GIT_REPO}",
refspec: "${GIT_BRANCH}"]]])
}
stage('validation') {
sh './deploy/jjb.sh validate'