diff --git a/Jenkinsfile b/Jenkinsfile index 1f2d94b71feadc76e91f917b1d973dc027cb62f0..1f8af05ef243dd8bc473f8bcf1f3bde472e3579e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,81 +1,34 @@ pipeline { - - agent any - - stages { - - stage('Prepare') { - - agent any - - steps { - - checkout scm - - } - - post { - - success { - - echo 'prepare success' - + agent any + stages { + stage('Prepare'){ + agent any + steps { + checkout scm + } + }post { + success{ + echo 'prepare success' + } + always{ + echo 'done prepare' + } + cleanup{ + echo 'after all other post conditions' + } } - - always { - - echo 'done prepare' - - } - - cleanup { - - echo 'after all other post conditions' - - } - - } - } - - - -pipeline { - - agent any - - stages { - - stage('Prepare') { - - agent any - - steps { - - checkout scm - - } - - post { - - success { - - echo 'prepare success' - + stage('maven build'){ + steps { + sh 'mvn package' } - - always { - - echo 'done prepare' - + post { + success{ + echo 'maven build success' + } } - - cleanup { - - echo 'after all other post conditions' - + failure { + echo 'maven build failed' } - - } - - } \ No newline at end of file + } +}