mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-22 18:46:27 +01:00
c2fd399caf
* add config for sand duping (#352)
* Lithium: cache chunk gen sea level (#349)
based off: a55cfd1c91
* PaperPR: Inline shift fields in EnumDirection (#350)
* Introducing: Yatoclip (#360)
* New async nbt cache (#347)
* update pom
* whoops
* Try to address path issue and improve Jenkins build speed
* Detailed lag and crash reports (#369)
Added "Suspected Plugins" to Watchdog and crash reports
* Drop sand duping
* Add branch specific versions
* Remove copyright
* Revert mysql-connector-java version bump
* Small fixes
* More detailed lag and crash reports
* Don't use branch information when generating metadata
* Fix Jenkins Builds version command
* Fixup patches
* Fix patch notes
* Pull Request compatibility for branch detection
* Fix Pull Request compatibility for branch detection
* Set context classloader before launch
* Inject server jar to SystemClassLoader before launch
* Try fix compile in java8
* Run tests on CodeMC and Github Actions
Co-authored-by: Simon Gardling <Titaniumtown@gmail.com>
Co-authored-by: Zoe <duplexsys@protonmail.com>
Co-authored-by: Hugo Planque <12386279+HookWoods@users.noreply.github.com>
75 lines
2.5 KiB
Groovy
75 lines
2.5 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 {
|
|
withMaven(
|
|
maven: '3',
|
|
mavenLocalRepo: '.repository',
|
|
publisherStrategy: 'EXPLICIT',
|
|
) {
|
|
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'
|
|
) {
|
|
withCredentials([usernamePassword(credentialsId: 'jenkins-deploy', usernameVariable: 'ORG_GRADLE_PROJECT_mavenUsername', passwordVariable: 'ORG_GRADLE_PROJECT_mavenPassword')]) {
|
|
sh '''
|
|
./gradlew clean build yatoclip publish
|
|
mkdir -p "./target"
|
|
basedir=$(pwd)
|
|
paperworkdir="$basedir/Paper/work"
|
|
mcver=$(cat "$paperworkdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
|
cp "yatopia-$mcver-yatoclip.jar" "./target/yatopia-$mcver-yatoclip-b$BUILD_NUMBER.jar"
|
|
'''
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
archiveArtifacts "target/*.jar"
|
|
}
|
|
failure {
|
|
cleanWs()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|