Skip to content
Open
57 changes: 57 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
pipeline {
agent {
docker {
image 'maven:3.6.3-jdk-11-slim'
}

}
stages {
stage('build') {
steps {
echo 'Compiling the code for sysfoo app'
sh 'mvn compile'
}
}

stage('Test') {
steps {
echo 'Clean test with unit test for sysfoo'
sh 'mvn clean test'
}
}

stage('Package') {
parallel {
stage('Package') {
when {
branch 'master'
}
steps {
echo 'Generating artifacts for deployment'
sh 'mvn package -DskipTests'
}
}

stage('TestA') {
steps {
sleep(time: 5, unit: 'SECONDS')
}
}

}
}

stage('TestB') {
steps {
sleep 3
}
}

}
post {
always {
echo 'This pipeline is completed..'
}

}
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
This is a Sample Maven App.
Trying to push with branch rules