From b0acd7ad7f7204f7fb0e7f2f002ee9a0634cf761 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 28 Dec 2020 09:54:05 +0800 Subject: [PATCH 1/3] fix some errors --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 2ea7657590..195cf6526e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,9 @@ def pre_test(){ git checkout develop git pull git fetch + git branch -d ${CHANGE_BRANCH} git checkout ${CHANGE_BRANCH} + git pull git merge develop cd ${WK} git reset --hard From d75b9505eff1fbca9a8e01953ae5f657229899cc Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 28 Dec 2020 10:51:03 +0800 Subject: [PATCH 2/3] fix some error --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 195cf6526e..ad5fca4d3c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,7 @@ def pre_test(){ git checkout develop git pull git fetch - git branch -d ${CHANGE_BRANCH} + git branch -D ${CHANGE_BRANCH} git checkout ${CHANGE_BRANCH} git pull git merge develop From 8c82e18fb8d891b55ad11095b3477bc907dfd3da Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Mon, 28 Dec 2020 10:58:29 +0800 Subject: [PATCH 3/3] fix error --- Jenkinsfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ad5fca4d3c..539a37af4f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,13 @@ def pre_test(){ git checkout develop git pull git fetch - git branch -D ${CHANGE_BRANCH} + ''' + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh ''' + git branch -D ${CHANGE_BRANCH} + ''' + } + git checkout ${CHANGE_BRANCH} git pull git merge develop