diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile index 127aa83fb5..6c28e7d766 100644 --- a/worker/Jenkinsfile +++ b/worker/Jenkinsfile @@ -8,27 +8,42 @@ pipeline { stages { stage('build') { + when { + changeset '**/worker/**' + } steps { - echo 'Compile' - dir['worker'] { + dir('worker') { sh 'mvn compile' } } } stage('test') { + when { + changeset '**/worker/**' + } steps { - echo 'Test' + dir('worker') { + sh 'mvn clean test' + } } } stage('package') { + when { + branch 'master' + changeset '**/worker/**' + } steps { - echo 'Package' + dir('worker') { + sh 'mvn package -DskipTests' + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true } + } } } + post { always { - echo 'This pipeline is completed' + echo 'This pipeline is completed now :-)' } } }