@@ -114,19 +114,18 @@ def publishGem()
114114
115115node('words-linux') {
116116 stage('Merge master to release'){
117- if (params.branch.contains("master")) {
118- checkout([$class: 'GitSCM', branches: [[name: '*/release']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-ruby.git']]])
119- sh "git config user.email '
[email protected] '"
120- sh "git config user.name 'jenkins'"
121- sh "git checkout --merge release"
122- sh "git reset --hard origin/release"
123- sh "git merge --no-ff --allow-unrelated-histories origin/master"
124- sh "git diff --name-status"
125- sh 'git commit -am "Merged master branch to release" || exit 0'
126- withCredentials([usernamePassword(credentialsId: '361885ba-9425-4230-950e-0af201d90547', passwordVariable: 'gitPass', usernameVariable: 'gitUsername')]) {
127- sh "git push https://$gitUsername:
[email protected] /words-cloud/words-cloud-ruby.git release"
128- }
129- }
117+ checkout([$class: 'GitSCM', branches: [[name: '*/release']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'LocalBranch', localBranch: "**"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '361885ba-9425-4230-950e-0af201d90547', url: 'https://git.auckland.dynabic.com/words-cloud/words-cloud-ruby.git']]])
118+ sh "git config user.email '
[email protected] '"
119+ sh "git config user.name 'jenkins'"
120+ sh "git checkout --merge release"
121+ sh "git reset --hard origin/release"
122+ sh "git merge --no-ff --allow-unrelated-histories origin/master"
123+ sh "git diff --name-status"
124+ sh 'git commit -am "Merged master branch to release" || exit 0'
125+ withCredentials([usernamePassword(credentialsId: '361885ba-9425-4230-950e-0af201d90547', passwordVariable: 'gitPass', usernameVariable: 'gitUsername')]) {
126+ sh "git push https://$gitUsername:
[email protected] /words-cloud/words-cloud-ruby.git release"
127+ }
128+
130129 }
131130 try {
132131 testGemLocally()
0 commit comments