Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/workerpipe #137

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
30 changes: 30 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pipeline {
agent any

stages{
stage("one"){
steps{
echo 'step 1'
sleep 3
}
}
stage("two"){
steps{
echo 'step 2'
sleep 9
}
}
stage("three"){
steps{
echo 'step 3'
sleep 5
}
}
}

post{
always{
echo 'This pipeline is completed.'
}
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Example Voting App
=========
==========

Getting started
---------------
Expand Down
49 changes: 49 additions & 0 deletions worker/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
pipeline {
agent any
tools{
maven 'maven 3.6.1'
}
stages{
stage("build"){
when{
changeset "**/worker/**"
}
steps{
echo 'Compiling worker app..'
dir('worker'){
sh 'mvn compile'
}
}
}
stage("test"){
when{
changeset "**/worker/**"
}
steps{
echo 'Running Unit Tests on worker app..'
dir('worker'){
sh 'mvn clean test'
}
}
}
stage("package"){
when{
branch 'master'
changeset "**/worker/**"
}
steps{
echo 'Packaging worker app'
dir('worker'){
sh 'mvn package -DskipTests'
archiveArtifacts artifacts: '**/target/*.jar',
fingerprint:true
}
}
}
}
post{
always{
echo 'Building multibranch pipeline for worker is completed..'
}
}
}