From 1a6350de58c9ac2782029e944b010178310a3031 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Tue, 14 Dec 2021 18:12:10 +0800 Subject: [PATCH] (query,insert)test scope --- Jenkinsfile | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8b6d742fd7..e4920ffff5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,8 +4,9 @@ import jenkins.model.CauseOfInterruption node { } -def skipbuild=0 -def win_stop=0 +def skipbuild = 0 +def win_stop = 0 +def scope = [] def abortPreviousBuilds() { def currentJobName = env.JOB_NAME @@ -354,7 +355,22 @@ pipeline { script{ abort_previous() abortPreviousBuilds() - println env.CHANGE_FORK + println env.BRANCH_NAME,env.CHANGE_BRANCH + if(env.CHANGE_FORK){ + scope = ['full'] + } + else{ + sh''' + cd ${WKC} + git fetch + git checkout ${BRANCH_NAME} + git pull + ''' + gitlog = sh(script: "git log -1 --pretty=%B ", returnStdout:true) + fun_git = (gitlog =~ \(.?\)) + scope = fun_git.split(",") + println scope + } } // sh''' // rm -rf ${WORKSPACE}.tes -- GitLab