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 #248

Open
wants to merge 16 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,6 +1,9 @@
Example Voting App
=========

This is a sample instavote application.


Getting started
---------------

Expand Down
67 changes: 67 additions & 0 deletions result/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@


pipeline {
agent any


tools {
nodejs 'NodeJS 8.9.0'
}

stages {
stage('build') {


when{
changeset "**/result/**"
}


steps {
echo 'Compiling result app'
dir('result') {
sh 'npm install'

}

}
}
stage('test') {

when {

changeset "**/result/**"
}
steps {
echo 'Running Unit Test on result app'
dir('result') {
sh 'npm install'
sh 'npm test'

}

}
}

}


/*
post {
always {
echo 'Build pipeline for worker run is complete..'
}
failure {
slackSend (channel: "instavote-cd", message: "Build Failed - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} | Open>)")
}

success {
slackSend (channel: "instavote-cd", message: "Build Succeeded - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} | Open>)")
}



} */


}
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;
});
});


62 changes: 62 additions & 0 deletions worker/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@


pipeline {
agent any


tools {
maven 'Maven 3.6.1'
}

stages {
stage('build') {

steps {
echo 'Compiling worket app'
dir('worker') {
sh 'mvn compile'

}

}
}
stage('test') {

when {
branch 'master'
changeset "**/worket/**"
}
steps {
echo 'Running Unit Test on worker app'

}
}
stage('package') {
when {
branch 'master'
changeset "**/worket/**"
}
steps {
echo 'Packaging worket app'

}
}
}
post {
always {
echo 'Build pipeline for worker run is complete..'
}
failure {
slackSend (channel: "instavote-cd", message: "Build Failed - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} | Open>)")
}

success {
slackSend (channel: "instavote-cd", message: "Build Succeeded - ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL} | Open>)")
}



}


}
7 changes: 7 additions & 0 deletions worker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Worker Java App

* Build Status

[![Build Status](https://smee.io/dPkO6FVnqdAhRku/buildStatus/icon?job=instavote%2Fworker-test)](https://smee.io/dPkO6FVnqdAhRku/job/instavote/job/worker-test/)

* Cambio Test 4 13/04/2022