Changed modpack integration technique.

This commit is contained in:
Harrison Deng 2022-05-13 03:06:09 -05:00
parent 279db25563
commit 93609893eb

14
Jenkinsfile vendored
View File

@ -3,13 +3,13 @@ pipeline {
stages { stages {
stage("integrate modpack") { stage("integrate modpack") {
when { when {
branch '**/develop' branch '**/sync-modpack'
} }
steps { steps {
sshagent(['eb018bad-5d56-4306-a006-60fb7cf194aa']) { sshagent(['eb018bad-5d56-4306-a006-60fb7cf194aa']) {
sh "git fetch" sh "git fetch"
sh "git checkout -B latest-modpack" sh "git checkout -B origin/develop"
sh "git merge -X theirs origin/develop" sh "git merge -X theirs origin/sync-modpack"
sh "chmod u+x ./scripts/*.sh" sh "chmod u+x ./scripts/*.sh"
sh "./scripts/update_modpack.sh" sh "./scripts/update_modpack.sh"
} }
@ -18,7 +18,7 @@ pipeline {
stage("server launch test") { stage("server launch test") {
when { when {
not { not {
branch '**/latest-modpack' branch '**/sync-modpack'
} }
} }
steps { steps {
@ -32,7 +32,7 @@ pipeline {
} }
stage("commit changes") { stage("commit changes") {
when { when {
branch '**/develop' branch '**/sync-modpack'
} }
steps { steps {
sh "git clean -dfX" sh "git clean -dfX"
@ -40,8 +40,8 @@ pipeline {
sh "git add config/**" sh "git add config/**"
sh "git commit -a -m 'Automatic integration of latest modpack.' && exit 0" sh "git commit -a -m 'Automatic integration of latest modpack.' && exit 0"
sshagent(['108c5045-64d1-42a6-acd7-a39da5e096d1']) { sshagent(['108c5045-64d1-42a6-acd7-a39da5e096d1']) {
sh "git pull -X theirs origin latest-modpack" sh "git pull -X theirs origin develop"
sh "git push --set-upstream origin latest-modpack" sh "git push --set-upstream origin develop"
} }
} }
} }