mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-25 12:05:14 +01:00
985b5655f5
This has been in work for a bunch of time. Zoe ( duplexsystem or budgidiere, whatever ) has put a ton of work into this. We now have a bugfree build system that works flawlessly. Co-authored-by: Ivan Pekov <ivan@mrivanplays.com> Co-authored-by: Simon Gardling <titaniumtown@gmail.com> Co-authored-by: toinouH <toinouh2003@gmail.com> P.s the one who merged this is ivan and not bud.
81 lines
2.4 KiB
Groovy
81 lines
2.4 KiB
Groovy
pipeline {
|
|
agent { label 'slave' }
|
|
options { timestamps() }
|
|
stages {
|
|
stage('Cleanup') {
|
|
steps {
|
|
scmSkip(deleteBuild: true, skipPattern:'.*\\[CI-SKIP\\].*')
|
|
sh 'rm -rf ./target'
|
|
sh 'rm -rf ./Paper/Paper-API ./Paper/Paper-Server ./Paper/work/Spigot/Spigot-API ./Paper/work/Spigot/Spigot-Server'
|
|
sh 'rm -rf ./Yatopia-API ./Yatopia-Server'
|
|
sh 'chmod +x ./gradlew'
|
|
}
|
|
}
|
|
stage('Init project & submodules') {
|
|
steps {
|
|
sh './gradlew initGitSubmodules'
|
|
}
|
|
}
|
|
stage('Decompile & apply patches') {
|
|
tools {
|
|
jdk "OpenJDK 8"
|
|
}
|
|
steps {
|
|
withMaven(
|
|
maven: '3',
|
|
mavenLocalRepo: '.repository',
|
|
publisherStrategy: 'EXPLICIT',
|
|
) {
|
|
sh '''
|
|
./gradlew setupUpstream
|
|
./gradlew applyPatches
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
stage('Build') {
|
|
tools {
|
|
jdk "OpenJDK 8"
|
|
}
|
|
steps {
|
|
withMaven(
|
|
maven: '3',
|
|
mavenLocalRepo: '.repository',
|
|
publisherStrategy: 'EXPLICIT'
|
|
) {
|
|
sh '''
|
|
./gradlew build
|
|
./gradlew publish
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
stage('Build Launcher') {
|
|
tools {
|
|
jdk "OpenJDK 8"
|
|
}
|
|
steps {
|
|
withMaven(
|
|
maven: '3',
|
|
mavenLocalRepo: '.repository',
|
|
publisherStrategy: 'EXPLICIT'
|
|
) {
|
|
sh '''
|
|
mkdir -p "./target"
|
|
./gradlew paperclip
|
|
cp "yatopia-$mcver-paperclip.jar" "./target/yatopia-$mcver-paperclip-b$BUILD_NUMBER.jar"
|
|
'''
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
archiveArtifacts "target/*.jar"
|
|
}
|
|
failure {
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|