From f0494f5fcc139c09827dcc9e1067ba654e3412dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Augier?= Date: Sun, 12 Apr 2020 14:25:58 +0200 Subject: [PATCH] reset --- Jenkinsfile | 69 +++++------------------------------------------------ 1 file changed, 6 insertions(+), 63 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 084802d78..e1c4c10f1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,63 +1,6 @@ -#!/usr/bin/env groovy - -pipeline { - agent any - stages { - stage('Build') { - steps { - sh './mvnw clean' - } - } - stage('Test') { - steps { - sh './mvnw test' - } - } - - stage('Package') { - steps { - sh './mvnw package' - } - } - stage('Deploy') { - when { - branch 'development' - } - steps { - echo "Branch name: ${env.BRANCH_NAME}" - sh './mvnw deploy' - } - } - } - post { - always { - echo 'One way or another, I have finished' - } - success { - echo 'I succeeeded!' - // For GitHub -sh 'curl "https://api.GitHub.com/repos/daphneaugier/spring-petclinic/statuses/$GIT_COMMIT?access_token=5cff02b111407f3c0bd4e30c8fb215c1369c46e3" \ - -H "Content-Type: application/json" \ - -X POST \ - -d "{\"state\": \"success\",\"context\": \"continuous-integration/jenkins\", \"description\": \"Jenkins\", \"target_url\": \"http://localhost:9090/job/spring-petclinic/$BUILD_NUMBER/console\"}"' - // Email - mail to: 'daphne.augier@gmail.com', - subject: "Successful Pipeline: ${currentBuild.fullDisplayName}", - body: "Eveythink OK with ${env.BUILD_URL}\n" - } - unstable { - echo 'I am unstable :/' - } - failure { - echo 'I failed :(' - // For GitHub -sh 'curl "https://api.GitHub.com/repos/daphneaugier/spring-petclinic/statuses/$GIT_COMMIT?access_token=5cff02b111407f3c0bd4e30c8fb215c1369c46e3" \ - -H "Content-Type: application/json" \ - -X POST \ - -d "{\"state\": \"failure\",\"context\": \"continuous-integration/jenkins\", \"description\": \"Jenkins\", \"target_url\": \"http://localhost:9090/job/spring-petclinic/$BUILD_NUMBER/console\"}"' - } - changed { - echo 'Things were different before...' - } - } -} \ No newline at end of file +pipeline { agent any +stages { stage('Build') { +steps { +sh './mvnw package' +} } +} } \ No newline at end of file