Added downstream build. Only publish and build on master branch.
This commit is contained in:
parent
57838882b1
commit
f1969da177
29
Jenkinsfile
vendored
29
Jenkinsfile
vendored
@ -1,14 +1,9 @@
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage("cleanup") {
|
||||
stage("run server") {
|
||||
steps {
|
||||
cleanWs(patterns: [[pattern: 'publish/**', type: 'INCLUDE']])
|
||||
}
|
||||
}
|
||||
stage("server trial") {
|
||||
steps {
|
||||
dir('server') {
|
||||
dir('run server') {
|
||||
sh 'echo "eula=true" > eula.txt'
|
||||
sh "chmod u+x ./run.sh"
|
||||
lock('Port 25565') {
|
||||
@ -16,17 +11,31 @@ pipeline {
|
||||
}
|
||||
}
|
||||
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
|
||||
sh 'git reset --hard'
|
||||
}
|
||||
}
|
||||
stage("publish") {
|
||||
stage("cleanup") {
|
||||
steps {
|
||||
sh "git clean -dfX"
|
||||
sh "rm -rf server/world"
|
||||
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: '', reportFiles: 'modlist.html', reportName: 'Mod list', reportTitles: ''])
|
||||
}
|
||||
}
|
||||
stage("publish") {
|
||||
when {
|
||||
branch "**/master"
|
||||
}
|
||||
steps {
|
||||
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'curseforge', reportFiles: 'modlist.html', reportName: 'Mod List', reportTitles: ''])
|
||||
zip archive: true, dir: 'curseforge', exclude: '', glob: '', overwrite: true, zipFile: 'publish/RSEMCM.zip'
|
||||
zip archive: true, dir: 'server', exclude: '', glob: '', overwrite: true, zipFile: 'publish/RSEMCM_server.zip'
|
||||
}
|
||||
}
|
||||
stage("build downstream") {
|
||||
when {
|
||||
branch "**/master"
|
||||
}
|
||||
steps {
|
||||
build '../rsemcs/develop'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user