File Jenkinsfile changed (mode: 100644) (index 47c2e89..3167064) |
... |
... |
pipeline{ |
11 |
11 |
|
|
12 |
12 |
stage("Compile") {
|
stage("Compile") {
|
13 |
13 |
steps {
|
steps {
|
14 |
|
//dir('Deployment Audit') {
|
|
15 |
|
sh "sh ./gradlew compileJava"
|
|
16 |
|
//}
|
|
|
14 |
|
sh "sh ./gradlew compileJava"
|
17 |
15 |
}
|
}
|
18 |
16 |
}
|
}
|
|
17 |
|
|
19 |
18 |
stage("Unit test") {
|
stage("Unit test") {
|
20 |
19 |
steps {
|
steps {
|
21 |
|
//dir('Deployment Audit') {
|
|
22 |
|
sh "sh ./gradlew test"
|
|
23 |
|
//}
|
|
|
20 |
|
sh "sh ./gradlew test"
|
|
21 |
|
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'build/reports/tests/test', reportFiles: 'index.html', reportName: 'Unit Test Reprot', reportTitles: 'Unit tests by Junit'])
|
24 |
22 |
}
|
}
|
25 |
23 |
}
|
}
|
26 |
24 |
|
|
27 |
25 |
stage("Package") {
|
stage("Package") {
|
28 |
26 |
steps {
|
steps {
|
29 |
|
//dir('Deployment Audit') {
|
|
30 |
|
sh "sh ./gradlew build"
|
|
31 |
|
//}
|
|
|
27 |
|
sh "sh ./gradlew build"
|
32 |
28 |
}
|
}
|
33 |
29 |
}
|
}
|
34 |
30 |
|
|
35 |
31 |
stage('DB Setup') {
|
stage('DB Setup') {
|
36 |
32 |
steps{
|
steps{
|
37 |
|
//dir('Deployment Audit') {
|
|
38 |
|
sh "sh ./gradlew update"
|
|
39 |
|
//}
|
|
|
33 |
|
sh "sh ./gradlew update"
|
40 |
34 |
}
|
}
|
41 |
35 |
}
|
}
|
42 |
36 |
|
|
43 |
37 |
stage('Test Coverage') {
|
stage('Test Coverage') {
|
44 |
38 |
steps{
|
steps{
|
45 |
|
echo 'Test converage verification'
|
|
46 |
|
//dir('Deployment Audit') {
|
|
47 |
|
sh "sh ./gradlew jacocoTestReport"
|
|
48 |
|
//}
|
|
|
39 |
|
sh "sh ./gradlew jacocoTestReport"
|
|
40 |
|
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'build/reports/jacoco/test/html', reportFiles: 'index.html', reportName: 'Code Coverage Reprot', reportTitles: 'Code coverage by JaCoCo'])
|
49 |
41 |
}
|
}
|
50 |
42 |
}
|
}
|
51 |
43 |
|
|
52 |
44 |
stage("Docker build") {
|
stage("Docker build") {
|
53 |
45 |
steps {
|
steps {
|
54 |
|
//dir('Deployment Audit') {
|
|
55 |
|
sh "docker build -t registry.gitlab.kfplc.com/integration_automation/int-deployment-audit-api:latest ."
|
|
56 |
|
sh "docker build -t registry.gitlab.kfplc.com/integration_automation/int-deployment-audit-api:${BUILD_NUMBER} ."
|
|
57 |
|
//}
|
|
|
46 |
|
sh "docker build -t registry.gitlab.kfplc.com/integration_automation/int-deployment-audit-api:latest ."
|
|
47 |
|
sh "docker build -t registry.gitlab.kfplc.com/integration_automation/int-deployment-audit-api:${BUILD_NUMBER} ."
|
58 |
48 |
}
|
}
|
59 |
49 |
}
|
}
|
60 |
50 |
|
|
61 |
51 |
stage("Docker publish") {
|
stage("Docker publish") {
|
62 |
52 |
steps {
|
steps {
|
63 |
|
//dir('Deployment Audit') {
|
|
64 |
|
withDockerRegistry([ credentialsId: "docker-registry", url: "https://registry.gitlab.kfplc.com" ]) {
|
|
65 |
|
sh "docker push registry.gitlab.kfplc.com/integration_automation/int-deployment-audit-api:latest"
|
|
66 |
|
sh "docker push registry.gitlab.kfplc.com/integration_automation/int-deployment-audit-api:${BUILD_NUMBER}"
|
|
67 |
|
}
|
|
68 |
|
//}
|
|
|
53 |
|
withDockerRegistry([ credentialsId: "docker-registry", url: "https://registry.gitlab.kfplc.com" ]) {
|
|
54 |
|
sh "docker push registry.gitlab.kfplc.com/integration_automation/int-deployment-audit-api:latest"
|
|
55 |
|
sh "docker push registry.gitlab.kfplc.com/integration_automation/int-deployment-audit-api:${BUILD_NUMBER}"
|
|
56 |
|
}
|
69 |
57 |
}
|
}
|
70 |
58 |
}
|
}
|
71 |
59 |
|
|