From 70b9a07ea350d386527787b41581b13705f95e74 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Fri, 5 Feb 2021 11:52:29 +0800 Subject: [PATCH] fix error --- Jenkinsfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2947c398c2..52784020f2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,13 +37,13 @@ def pre_test(){ sudo rmtaos ''' } - sh ''' + sh """ cd ${WKC} git checkout develop git reset --hard HEAD~10 >/dev/null git pull - git fetch origin +refs/pull/${CHANGE_ID}/merge + git fetch origin +refs/pull/${env.CHANGE_ID}/merge git checkout -qf FETCH_HEAD git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD develop)|grep -v -E '.*md|//src//connector|Jenkinsfile' || exit 0 cd ${WK} @@ -60,7 +60,7 @@ def pre_test(){ make > /dev/null make install > /dev/null cd ${WKC}/tests - ''' + """ return 1 } def kipstage=0 @@ -76,13 +76,13 @@ pipeline { stage('pre_build'){ agent{label 'master'} steps { - sh''' + sh""" cd ${WORKSPACE} git checkout develop git pull - git fetch origin +refs/pull/${CHANGE_ID}/merge + git fetch origin +refs/pull/${env.CHANGE_ID}/merge git checkout -qf FETCH_HEAD - ''' + """ script{ skipstage=sh(script:"git --no-pager diff --name-only FETCH_HEAD develop|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' || echo 1 ",returnStdout:true) } -- GitLab