mirror of
https://github.com/plexusorg/Plex.git
synced 2024-11-13 23:33:33 +00:00
32 lines
1.2 KiB
Groovy
32 lines
1.2 KiB
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage("build") {
|
|
steps {
|
|
withGradle {
|
|
sh "./gradlew build javadoc --no-daemon"
|
|
}
|
|
}
|
|
}
|
|
stage("publish") {
|
|
when {
|
|
branch "master"
|
|
}
|
|
steps {
|
|
withCredentials([usernamePassword(credentialsId: '85b7099f-2e65-461e-b2ce-124edec41ed6', passwordVariable: 'plexPassword', usernameVariable: 'plexUser')]) {
|
|
withGradle {
|
|
sh "./gradlew publish --no-daemon"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: "build/libs/*.jar", fingerprint: true
|
|
javadoc javadocDir: "api/build/docs/javadoc", keepAll: false
|
|
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
|
|
cleanWs()
|
|
}
|
|
}
|
|
} |