From 133b8d94df5d85bb0ed3d9b97dc6d371b443938a Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Mon, 8 Oct 2018 14:56:42 -0700 Subject: [PATCH] Fix Jenkins syntax (#3777) --- Jenkinsfile-restricted | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile-restricted b/Jenkinsfile-restricted index a9f1db9ae..be4c4e317 100644 --- a/Jenkinsfile-restricted +++ b/Jenkinsfile-restricted @@ -13,6 +13,10 @@ def dockerRun = 'tests/ci_build/ci_build.sh' // Utility functions @Field def utils +@Field +def commit_id +@Field +def branch_name def buildMatrix = [ [ "enabled": true, "os" : "linux", "withGpu": true, "withNccl": true, "withOmp": true, "pythonVersion": "2.7", "cudaVersion": "9.2" ], @@ -42,6 +46,8 @@ pipeline { script { utils = load('tests/ci_build/jenkins_tools.Groovy') utils.checkoutSrcs() + commit_id = "${GIT_COMMIT}" + branch_name = "${GIT_LOCAL_BRANCH}" } stash name: 'srcs', excludes: '.git/' milestone label: 'Sources ready', ordinal: 1 @@ -53,8 +59,6 @@ pipeline { retry(3) { node('linux && cpu && restricted') { unstash name: 'srcs' - def commit_id = "${GIT_COMMIT}" - def branch_name = "${GIT_LOCAL_BRANCH}" echo 'Building doc...' dir ('jvm-packages') { sh "bash ./build_doc.sh ${commit_id}"