-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile_coverage
70 lines (53 loc) · 3.52 KB
/
Jenkinsfile_coverage
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@Library(['piper-lib', 'piper-lib-os']) _
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', numToKeepStr: '4']]]);
node {
stage('build') {
sh "rm -rf *"
sh "cp /var/jenkins_home/uploadedContent/settings.xml ."
dockerExecute(
dockerImage:'ldellaquila/maven-gradle-node-zulu-openjdk8:1.0.0',
dockerWorkspace: '/orientdb-${env.BRANCH_NAME}'
) {
try{
sh "rm -rf orientdb-studio"
sh "rm -rf orientdb"
// needed after the release and tag change, otherwise Studio is not found on Sonatype
checkout(
[$class: 'GitSCM', branches: [[name: '3.0.x']],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'orientdb-studio']],
userRemoteConfigs: [[url: 'https://github.com/orientechnologies/orientdb-studio']]])
checkout(
[$class: 'GitSCM', branches: [[name: env.BRANCH_NAME]],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'orientdb']],
userRemoteConfigs: [[url: 'https://github.com/orientechnologies/orientdb']]])
withMaven(mavenLocalRepo: '${HOME}/.m2/repository', globalMavenSettingsFilePath: 'settings.xml') {
sh "cd orientdb-studio && mvn clean install -DskipTests"
sh "cd orientdb && mvn clean deploy"
//TODO publish javadoc
//sh "cd orientdb && mvn javadoc:aggregate"
//sh "cd orientdb && rsync -ra --stats ${WORKSPACE}/target/site/apidocs/ -e ${env.RSYNC_JAVADOC}/${env.BRANCH_NAME}/"
}
try {
//skip integration test for now
sh "cd orientdb && mvn --batch-mode -V -U -fae -pl !distribution,!distribution-tp2,!distributed clean jacoco:prepare-agent package failsafe:integration-test -Dstorage.diskCache.bufferSize=4096 -Dorientdb.test.env=ci -Dsurefire.useFile=false -DskipTests"
sh "cd orientdb && mvn -f ./distributed/pom.xml --batch-mode -V -U -e -fae -Dmaven.test.failure.ignore=true clean jacoco:prepare-agent package -Dsurefire.useFile=false -DskipTests=false"
//sh "${mvnHome}/bin/mvn --batch-mode -V -U -e -pl crashtests -am -P crash-tests clean jacoco:prepare-agent test-compile package failsafe:integration-test -Dsurefire.useFile=false"
} finally {
junit allowEmptyResults: true, testResults: '**/target/surefire-reports/TEST-*.xml'
junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml'
jacoco(execPattern: '**/*.exec')
}
}catch(e){
slackSend(color: '#FF0000', channel: '#jenkins-failures', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})\n${e}")
throw e
}
slackSend(color: '#00FF00', channel: '#jenkins', message: "SUCCESS: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
}
}