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/resultpipe #128

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Example Voting App
=========
Hello
This is a sample voting app.
filename: README.MD

Getting started
---------------
Expand Down
Empty file added bla.txt
Empty file.
31 changes: 31 additions & 0 deletions result/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
pipeline {
agent any
tools{
nodejs 'NodeJS 19.0.1'
}
stages{
stage(build){
when{
changeset "**/result/**"
}
steps{
echo 'Compiling result app..'
dir('worker'){
sh 'npm install'
}
}
}
stage(test){
when{
changeset "**/result/**"
}
steps{
echo 'Running Unit Tests on result app..'
dir('result'){
sh 'npm install'
sh 'npm test'
}
}
}
}
}
6 changes: 6 additions & 0 deletions result/test/mock.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ describe('mock test 4', () => {
});
});

describe('mock test 5', () => {
it('unit test 5', () => {
expect(true).to.be.true;
});
});


48 changes: 48 additions & 0 deletions worker/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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 Tets 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..'
}
}
}