From 52959d0ff4d192ad37465c0bb0f70ec6c1bedb65 Mon Sep 17 00:00:00 2001 From: Steffen Nitschke Date: Sun, 17 Jan 2021 16:54:33 +0100 Subject: [PATCH] next try of handmade git publisher --- Jenkinsfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 12e22c4..ffc226c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -60,15 +60,17 @@ pipeline { success { - if ( (env.BRANCH_NAME).startsWith('pr-') ) { + script { + if ((env.BRANCH_NAME).startsWith('pr-')) { // git url: "git@gogs.informatik.hs-fulda.de:SteffenN/Multi-Chess.git", // credentialsId: 'jenkins_ssh_key', // branch: (env.BRANCH_NAME) - sh "git merge '${env.BRANCH_NAME}'" - sh "git commit -am 'Merged ${env.BRANCH_NAME} branch to master'" - sh "git push origin master" + sh "git merge '${env.BRANCH_NAME}'" + sh "git commit -am 'Merged ${env.BRANCH_NAME} branch to master'" + sh "git push origin master" + } } office365ConnectorSend color: 'good',