2022-04-06 23:14:44 -05:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
2022-04-07 00:25:03 -05:00
|
|
|
stage("build") {
|
2022-04-06 23:14:44 -05:00
|
|
|
steps {
|
2022-04-07 00:05:15 -05:00
|
|
|
withGradle {
|
2022-04-07 01:32:06 -05:00
|
|
|
sh "./gradlew build javadoc --no-daemon"
|
2022-04-07 00:05:15 -05:00
|
|
|
}
|
2022-04-06 23:14:44 -05:00
|
|
|
}
|
|
|
|
}
|
2022-04-07 01:55:59 -05:00
|
|
|
stage("publish") {
|
|
|
|
when {
|
|
|
|
branch "master"
|
|
|
|
}
|
|
|
|
steps {
|
2022-04-07 16:09:22 -05:00
|
|
|
withCredentials([usernamePassword(credentialsId: '85b7099f-2e65-461e-b2ce-124edec41ed6', passwordVariable: 'plexPassword', usernameVariable: 'plexUser')]) {
|
2022-04-07 01:55:59 -05:00
|
|
|
withGradle {
|
|
|
|
sh "./gradlew publish --no-daemon"
|
2022-04-07 16:09:22 -05:00
|
|
|
}
|
2022-04-07 01:55:59 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-04-06 23:14:44 -05:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-04-10 17:27:46 -05:00
|
|
|
archiveArtifacts artifacts: "build/libs/Plex.jar", fingerprint: true
|
2022-04-07 16:25:59 -05:00
|
|
|
javadoc javadocDir: "build/docs/javadoc", keepAll: false
|
2022-04-07 16:28:00 -05: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.PLEX_WEBHOOK_URL
|
2022-04-07 01:17:53 -05:00
|
|
|
cleanWs()
|
2022-04-06 23:14:44 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|