1
0
mirror of https://github.com/GeyserMC/Floodgate.git synced 2026-01-04 15:31:48 +00:00

Merge pull request #14 from GeyserMC/jenkins

Add jenkins support
This commit is contained in:
Redned
2020-03-27 19:42:04 -05:00
committed by GitHub
2 changed files with 50 additions and 0 deletions

43
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,43 @@
pipeline {
agent any
tools {
maven 'Maven 3'
jdk 'Java 8'
}
options {
buildDiscarder(logRotator(artifactNumToKeepStr: '5'))
}
stages {
stage ('Build') {
steps {
sh 'mvn clean package'
}
post {
success {
archiveArtifacts artifacts: '**/target/*.jar', excludes: '**/target/floodgate-*-*.jar', fingerprint: true
}
}
}
stage ('Deploy') {
when {
anyOf {
branch "master"
branch "development"
}
}
steps {
sh 'mvn javadoc:jar source:jar deploy -DskipTests'
}
}
}
post {
always {
deleteDir()
withCredentials([string(credentialsId: 'geyser-discord-webhook', variable: 'DISCORD_WEBHOOK')]) {
discordSend description: "**Build:** [${currentBuild.id}](${env.BUILD_URL})\n**Status:** [${currentBuild.currentResult}](${env.BUILD_URL})\n\n[**Artifacts on Jenkins**](https://ci.nukkitx.com/job/GeyserMC/job/Floodgate)", footer: 'NukkitX Jenkins', link: env.BUILD_URL, successful: currentBuild.resultIsBetterOrEqualTo('SUCCESS'), title: "${env.JOB_NAME} #${currentBuild.id}", webhookURL: DISCORD_WEBHOOK
}
}
}
}

View File

@@ -11,6 +11,13 @@
<artifactId>floodgate-common</artifactId>
<repositories>
<repository>
<id>nukkitx-repo</id>
<url>https://repo.nukkitx.com/maven-snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.geysermc</groupId>