diff --git a/README.md b/README.md index a8ee7312..584e3917 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +2 TRY + Example Voting App ========= diff --git a/result/Jenkinsfile.groovy b/result/Jenkinsfile.groovy new file mode 100644 index 00000000..d1a28890 --- /dev/null +++ b/result/Jenkinsfile.groovy @@ -0,0 +1,38 @@ +pipeline { + agent any + tools { + maven 'maven 3.9.8' + } + stages { + stage("build") { + steps { + echo 'Compiling worker app..' + dir('worker') { + sh 'mvn compile' + } + } + } + stage("test") { + steps { + echo 'Running Unit Tests on worker app..' + dir('worker') { + sh 'mvn clean test' + } + } + } + stage("package") { + steps { + echo 'Packaging worker app' + dir('worker') { + sh 'mvn package -DskipTests' + } + } + } + } + post { + always { + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true + echo 'Building multibranch pipeline for worker is completed..' + } + } +} diff --git a/result/test/mock.test.js b/result/test/mock.test.js index aac87156..716f6f5a 100644 --- a/result/test/mock.test.js +++ b/result/test/mock.test.js @@ -32,6 +32,7 @@ describe('mock test 5', () => { }); }); + describe('mock test 6', () => { it('unit test 6', () => { expect(true).to.be.true; diff --git a/worker/Jenkinsfile.groovy b/worker/Jenkinsfile.groovy new file mode 100644 index 00000000..d1a28890 --- /dev/null +++ b/worker/Jenkinsfile.groovy @@ -0,0 +1,38 @@ +pipeline { + agent any + tools { + maven 'maven 3.9.8' + } + stages { + stage("build") { + steps { + echo 'Compiling worker app..' + dir('worker') { + sh 'mvn compile' + } + } + } + stage("test") { + steps { + echo 'Running Unit Tests on worker app..' + dir('worker') { + sh 'mvn clean test' + } + } + } + stage("package") { + steps { + echo 'Packaging worker app' + dir('worker') { + sh 'mvn package -DskipTests' + } + } + } + } + post { + always { + archiveArtifacts artifacts: '**/target/*.jar', fingerprint: true + echo 'Building multibranch pipeline for worker is completed..' + } + } +}