From 2470ba5a3ecb02e9c0218fc76e25569ee2853fd5 Mon Sep 17 00:00:00 2001 From: zubri Date: Fri, 11 Aug 2023 11:39:07 -0300 Subject: [PATCH] jenkins file added --- Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..f05639856 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,34 @@ +pipeline { + agent any + tools { + jdk "${params.JDK_TOOL}" + } + stages { + stage ('Clone') { + steps { + catchError(buildResult: 'FAILURE') { + checkout([ + $class: 'GitSCM', + userRemoteConfigs: [[credentialsId: CREDENTIALS_ID, url: 'git@github.com:prowide/prowide-core.git']], + branches: [[name: CHECKOUT_BRANCH]] + ]) + } + } + } + stage('Build') { + steps { + catchError(buildResult: 'FAILURE') { + sh 'java -version' + sh './gradlew clean build --no-daemon --max-workers 2' + } + } + } + } + post { + failure { + script { + slackSend(channel: "#jenkins-integrator", token: "${params.SLACK_TOKEN}", color: 'danger', message: "Pipeline: ${currentBuild.fullDisplayName} failed!") + } + } + } +} \ No newline at end of file