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 {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
stages {
|
stages {
|
||||||
stage("cleanup") {
|
stage("run server") {
|
||||||
steps {
|
steps {
|
||||||
cleanWs(patterns: [[pattern: 'publish/**', type: 'INCLUDE']])
|
dir('run server') {
|
||||||
}
|
|
||||||
}
|
|
||||||
stage("server trial") {
|
|
||||||
steps {
|
|
||||||
dir('server') {
|
|
||||||
sh 'echo "eula=true" > eula.txt'
|
sh 'echo "eula=true" > eula.txt'
|
||||||
sh "chmod u+x ./run.sh"
|
sh "chmod u+x ./run.sh"
|
||||||
lock('Port 25565') {
|
lock('Port 25565') {
|
||||||
@ -16,17 +11,31 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
|
logParser failBuildOnError: true, projectRulePath: 'Jenkinsparse', parsingRulesPath: 'Jenkinsparse', showGraphs: true, unstableOnWarning: true, useProjectRule: true
|
||||||
sh 'git reset --hard'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("publish") {
|
stage("cleanup") {
|
||||||
steps {
|
steps {
|
||||||
sh "git clean -dfX"
|
sh "git clean -dfX"
|
||||||
sh "rm -rf server/world"
|
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: 'curseforge', exclude: '', glob: '', overwrite: true, zipFile: 'publish/RSEMCM.zip'
|
||||||
zip archive: true, dir: 'server', exclude: '', glob: '', overwrite: true, zipFile: 'publish/RSEMCM_server.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