From 4c70082f676ee45241ff8445904d804f327ce9e3 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sun, 4 Aug 2024 22:44:13 +0200 Subject: [PATCH] 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. --- Jenkinsfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..9dbf205 --- /dev/null +++ b/Jenkinsfile @@ -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 + } + } + } +} \ No newline at end of file