Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions result/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
pipeline {
agent any

tools{
nodejs "node 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 Tests on result app'
dir('result'){
sh 'npm install'
sh 'npm test'
}
}
}
}

post {
always{
echo 'Build pipeline run is completed.'
}
}
}



6 changes: 6 additions & 0 deletions result/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## this is a readme file with the Jenkins badges

for Build
[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=result-build)](http://157.230.222.153:8080/job/result-build/)
and for Test
[![Build Status](http://157.230.222.153:8080/buildStatus/icon?job=result-test)](http://157.230.222.153:8080/job/result-test/)
5 changes: 5 additions & 0 deletions result/test/mock.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ describe('mock test 4', () => {
});
});

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

53 changes: 53 additions & 0 deletions worker/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
pipeline {
agent any

tools{
maven "maven 3.8.6"
}
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 'Package worker app'
dir('worker'){
sh 'mvn package -DskipTests'
archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true
}
}
}
}

post {
always{
echo 'Build pipeline run is completed.'
}
}
}



12 changes: 12 additions & 0 deletions worker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## worker java app




http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-build


http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fwroker-test


http://157.230.222.153:8080/buildStatus/icon?job=instavote%2Fworker-package