Add Jenkins pipeline for Gradle build and notifications

This commit introduces a new Jenkinsfile configured to build the project using Gradle and archive the resulting artifacts. Additionally, it includes a stage to send build notifications to Discord with details about the build status.
This commit is contained in:
Teriuihi 2024-08-04 22:44:13 +02:00
parent ab9ec4127c
commit 4c70082f67

20
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,20 @@
pipeline {
agent any
stages {
stage('Gradle') {
steps {
sh 'bash gradlew build'
}
}
stage('Archive') {
steps {
archiveArtifacts artifacts: 'build/libs/', followSymlinks: false
}
}
stage('discord') {
steps {
discordSend description: "Build: ${BUILD_NUMBER}", showChangeset: true, result: currentBuild.currentResult, title: currentBuild.fullProjectName, webhookURL: env.discordwebhook
}
}
}
}