From 778310188783d1776cbbdcbd6e3f7d8d7484c97b Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sun, 4 Aug 2024 22:26:57 +0200 Subject: [PATCH] Add Jenkinsfile for CI pipeline Introduce a Jenkinsfile to automate the build process using Gradle. The pipeline consists of three stages: building with Gradle, archiving artifacts, and sending build notifications to Discord. This integration enhances the CI/CD workflow by ensuring consistent builds and timely notifications. --- 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