diff --git a/result/Jenkinsfile b/result/Jenkinsfile new file mode 100644 index 0000000000..3a38ecc952 --- /dev/null +++ b/result/Jenkinsfile @@ -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.' + } + } +} + + + diff --git a/result/README.md b/result/README.md new file mode 100644 index 0000000000..415f1ce8ea --- /dev/null +++ b/result/README.md @@ -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/) diff --git a/result/test/mock.test.js b/result/test/mock.test.js index f99dfdae97..793ee9f305 100644 --- a/result/test/mock.test.js +++ b/result/test/mock.test.js @@ -26,4 +26,9 @@ describe('mock test 4', () => { }); }); +describe('mock test 5', () => { + it('unit test 5', () => { + expect(true).to.be.true; + }); +}); diff --git a/worker/Jenkinsfile b/worker/Jenkinsfile new file mode 100644 index 0000000000..058a6a0153 --- /dev/null +++ b/worker/Jenkinsfile @@ -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.' + } + } +} + + + diff --git a/worker/README.md b/worker/README.md new file mode 100644 index 0000000000..2ba4941630 --- /dev/null +++ b/worker/README.md @@ -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