forked from B3Partners/tailormap-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
56 lines (45 loc) · 2.28 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
timestamps {
node {
properties([
[$class: 'jenkins.model.BuildDiscarderProperty', strategy: [$class: 'LogRotator',
artifactDaysToKeepStr: '8',
artifactNumToKeepStr: '3',
daysToKeepStr: '15',
numToKeepStr: '5']
]]);
withEnv(["JAVA_HOME=${ tool 'JDK8' }", "PATH+MAVEN=${tool 'Maven 3.3.9'}/bin:${env.JAVA_HOME}/bin"]) {
stage('Prepare') {
checkout scm
}
stage('Build') {
echo "Building branch: ${env.BRANCH_NAME}"
sh "mvn install -U -DskipTests -Dtest.skip.integrationtests=true -B -V -fae -q"
}
stage('Test') {
echo "Running unit tests"
sh "mvn -e clean test -B"
}
try {
lock('flamingo-oracle') {
stage('Prepare Oracle') {
sh "sqlplus -l -S jenkins_flamingo/[email protected]:1521/DB01 < ./.jenkins/clear-oracle-schema.sql"
}
stage('IntegrationTest') {
echo "Running integration tests on all modules except viewer-admin"
sh "mvn -e verify -B -Pjenkins -pl '!viewer-admin'"
echo "Running integration tests on viewer-admin module only"
sh "mvn -e verify -B -Pjenkins -pl 'viewer-admin'"
}
}
} finally {
stage('Publish Results'){
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml, **/target/failsafe-reports/TEST-*.xml'
}
}
stage('OWASP Dependency Check') {
dependencyCheckAnalyzer datadir: '', hintsFile: '', includeCsvReports: false, includeHtmlReports: true, includeJsonReports: false, isAutoupdateDisabled: false, outdir: '', scanpath: '**/viewer-**.war,', skipOnScmChange: false, skipOnUpstreamChange: false, suppressionFile: '', zipExtensions: ''
dependencyCheckPublisher canComputeNew: false, defaultEncoding: '', healthy: '85', pattern: '**/dependency-check-report.xml', shouldDetectModules: true, unHealthy: ''
}
}
}
}