Plex/Jenkinsfile

33 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-04-07 04:14:44 +00:00
pipeline {
agent any
stages {
2022-04-07 05:25:03 +00:00
stage("build") {
2022-04-07 04:14:44 +00:00
steps {
2022-04-07 05:05:15 +00:00
withGradle {
sh "./gradlew build javadoc --no-daemon"
2022-04-07 05:05:15 +00:00
}
2022-04-07 04:14:44 +00:00
}
}
2022-04-07 06:55:59 +00:00
stage("publish") {
when {
branch "master"
}
steps {
2022-04-07 21:09:22 +00:00
withCredentials([usernamePassword(credentialsId: '85b7099f-2e65-461e-b2ce-124edec41ed6', passwordVariable: 'plexPassword', usernameVariable: 'plexUser')]) {
2022-04-07 06:55:59 +00:00
withGradle {
sh "./gradlew publish --no-daemon"
2022-04-07 21:09:22 +00:00
}
2022-04-07 06:55:59 +00:00
}
}
}
2022-04-07 04:14:44 +00:00
}
post {
always {
archiveArtifacts artifacts: "build/libs/*.jar", fingerprint: true
2022-08-02 17:13:57 +00:00
javadoc javadocDir: "server/build/docs/javadoc", keepAll: false
2022-05-13 03:53:21 +00:00
discordSend description: "**Build:** ${env.BUILD_NUMBER}\n**Status:** ${currentBuild.currentResult}", enableArtifactsList: true, footer: "Built with Jenkins", link: env.BUILD_URL, result: currentBuild.currentResult, scmWebUrl: "https://github.com/plexusorg/Plex", showChangeset: true, title: env.JOB_NAME, webhookURL: env.WEBHOOK_URL
2022-04-07 06:17:53 +00:00
cleanWs()
2022-04-07 04:14:44 +00:00
}
}
2022-08-02 17:13:57 +00:00
}