From f8b759d8fd21f5e31046dbe3ddae434223b95150 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 9 Aug 2021 15:42:29 +0800 Subject: [PATCH 1/8] [TD-5909][ci skip] test ci skip --- Jenkinsfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index e6e8a1df32..96195a78e0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -146,8 +146,19 @@ pipeline { script{ env.skipstage=sh(script:"cd ${WORKSPACE}.tes && git --no-pager diff --name-only FETCH_HEAD ${env.CHANGE_TARGET}|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' || echo 0 ",returnStdout:true) + if(env.skipstage == 0 ) + { + println env.skipstage + currentBuild.result = 'SUCCESS' + currentBuild.getRawBuild().getExecutor().interrupt(Result.SUCCESS) + } + if (sh(script: "git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]'", returnStatus: true) == 0) { + currentBuild.result = 'SUCCESS' + currentBuild.getRawBuild().getExecutor().interrupt(Result.SUCCESS) + } } println env.skipstage + sh''' rm -rf ${WORKSPACE}.tes ''' From c3fd8deeacffcee5e282e7e0f2eb72331cd5ac4f Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 9 Aug 2021 15:51:51 +0800 Subject: [PATCH 2/8] test --- Jenkinsfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 96195a78e0..7cb901f663 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -154,6 +154,9 @@ pipeline { } if (sh(script: "git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]'", returnStatus: true) == 0) { currentBuild.result = 'SUCCESS' + sh''' + git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip] + ''' currentBuild.getRawBuild().getExecutor().interrupt(Result.SUCCESS) } } From caa560005cc07785e19a650aadc1fad8ab3869ec Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 9 Aug 2021 15:57:56 +0800 Subject: [PATCH 3/8] [TD-5909]test skip ci [ci skip] --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 7cb901f663..dfa83fc592 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -157,6 +157,7 @@ pipeline { sh''' git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip] ''' + currentBuild.getRawBuild().getExecutor().interrupt(Result.SUCCESS) } } From cfcf1fea42d629fd3ba4d8922dd5a96987900b24 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 9 Aug 2021 16:09:35 +0800 Subject: [PATCH 4/8] test[ci skip] --- .drone.yml | 1 - Jenkinsfile | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index b520f308ba..710baa5bf3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -249,4 +249,3 @@ steps: branch: - develop - master - diff --git a/Jenkinsfile b/Jenkinsfile index dfa83fc592..40e19be486 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -142,6 +142,9 @@ pipeline { sh''' git fetch origin +refs/pull/${CHANGE_ID}/merge git checkout -qf FETCH_HEAD + cd ${WORKSPACE}.tes + git --no-pager diff --name-only FETCH_HEAD ${env.CHANGE_TARGET}|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' + git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip] ''' script{ @@ -157,7 +160,6 @@ pipeline { sh''' git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip] ''' - currentBuild.getRawBuild().getExecutor().interrupt(Result.SUCCESS) } } From a533aafdd724e94a0d9a2e0200ac496911721add Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 9 Aug 2021 16:20:30 +0800 Subject: [PATCH 5/8] test[ci skip] --- .drone.yml | 2 +- Jenkinsfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 710baa5bf3..53b4ef738a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -248,4 +248,4 @@ steps: when: branch: - develop - - master + - master \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 40e19be486..713c9f644e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -144,7 +144,7 @@ pipeline { git checkout -qf FETCH_HEAD cd ${WORKSPACE}.tes git --no-pager diff --name-only FETCH_HEAD ${env.CHANGE_TARGET}|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' - git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip] + git log -1 --pretty=%B | grep -ie \'\\[skip ci\\]\' -e \'\\[ci skip\\]\' ''' script{ From b1b7db9796995304379ce69c8fd1f5c341817a75 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 9 Aug 2021 16:50:18 +0800 Subject: [PATCH 6/8] test[ci skip] --- .drone.yml | 3 ++- Jenkinsfile | 8 +------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 53b4ef738a..318761361e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -248,4 +248,5 @@ steps: when: branch: - develop - - master \ No newline at end of file + - master + \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 713c9f644e..8102c0e7ba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -142,9 +142,6 @@ pipeline { sh''' git fetch origin +refs/pull/${CHANGE_ID}/merge git checkout -qf FETCH_HEAD - cd ${WORKSPACE}.tes - git --no-pager diff --name-only FETCH_HEAD ${env.CHANGE_TARGET}|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' - git log -1 --pretty=%B | grep -ie \'\\[skip ci\\]\' -e \'\\[ci skip\\]\' ''' script{ @@ -155,11 +152,8 @@ pipeline { currentBuild.result = 'SUCCESS' currentBuild.getRawBuild().getExecutor().interrupt(Result.SUCCESS) } - if (sh(script: "git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]'", returnStatus: true) == 0) { + if (sh(script: "git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]'", returnStatus: true) == 1) { currentBuild.result = 'SUCCESS' - sh''' - git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip] - ''' currentBuild.getRawBuild().getExecutor().interrupt(Result.SUCCESS) } } From 8eb2ec07de7adf1c0a91505235a0c390758a1ea4 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 9 Aug 2021 17:23:15 +0800 Subject: [PATCH 7/8] test[ci skip] --- .drone.yml | 3 +-- Jenkinsfile | 17 ++++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.drone.yml b/.drone.yml index 318761361e..53b4ef738a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -248,5 +248,4 @@ steps: when: branch: - develop - - master - \ No newline at end of file + - master \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 8102c0e7ba..e023e690d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -113,6 +113,9 @@ pipeline { agent{label 'master'} when { changeRequest() + not { + changelog '.*\\[ci skip\\].*' + } } steps { script{ @@ -146,19 +149,8 @@ pipeline { script{ env.skipstage=sh(script:"cd ${WORKSPACE}.tes && git --no-pager diff --name-only FETCH_HEAD ${env.CHANGE_TARGET}|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' || echo 0 ",returnStdout:true) - if(env.skipstage == 0 ) - { - println env.skipstage - currentBuild.result = 'SUCCESS' - currentBuild.getRawBuild().getExecutor().interrupt(Result.SUCCESS) - } - if (sh(script: "git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]'", returnStatus: true) == 1) { - currentBuild.result = 'SUCCESS' - currentBuild.getRawBuild().getExecutor().interrupt(Result.SUCCESS) - } } println env.skipstage - sh''' rm -rf ${WORKSPACE}.tes ''' @@ -172,6 +164,9 @@ pipeline { expression { env.skipstage != 0 } + not { + changelog '.*\\[ci skip\\].*' + } } parallel { stage('python_1_s1') { From dc1401e6e9c428371a8675b78f89bde52a8876fb Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 9 Aug 2021 20:46:02 +0800 Subject: [PATCH 8/8] test[ci skip] --- Jenkinsfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e023e690d4..f1de92cded 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,7 @@ node { } def skipstage=0 - +def skipbuild=0 def abortPreviousBuilds() { def currentJobName = env.JOB_NAME def currentBuildNumber = env.BUILD_NUMBER.toInteger() @@ -113,9 +113,6 @@ pipeline { agent{label 'master'} when { changeRequest() - not { - changelog '.*\\[ci skip\\].*' - } } steps { script{ @@ -149,6 +146,7 @@ pipeline { script{ env.skipstage=sh(script:"cd ${WORKSPACE}.tes && git --no-pager diff --name-only FETCH_HEAD ${env.CHANGE_TARGET}|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' || echo 0 ",returnStdout:true) + env.skipbuild=sh(script: "git log -1 --pretty=%B | fgrep -ie '[skip ci]' -e '[ci skip]'", returnStatus: true) } println env.skipstage sh''' @@ -163,10 +161,8 @@ pipeline { changeRequest() expression { env.skipstage != 0 + env.skipbuild ==1 } - not { - changelog '.*\\[ci skip\\].*' - } } parallel { stage('python_1_s1') {