From 8b6e65bad1eff847f4d77ec2d02bea20cbf70813 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Sun, 4 Aug 2024 23:07:12 +0200 Subject: [PATCH] Add Jenkinsfile for CI/CD pipeline This Jenkinsfile sets up a simple CI/CD pipeline with three stages: 'Gradle' for building the project, 'Archive' for saving build artifacts, and 'discord' for sending build notifications. The pipeline uses npm for package management and build steps, and integrates with Discord for build result notifications. --- Jenkinsfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..3df1aee --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,21 @@ +pipeline { + agent any + stages { + stage('Gradle') { + steps { + sh 'npm install' + sh 'npm run build' + } + } + stage('Archive') { + steps { + archiveArtifacts artifacts: 'build/**', 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