generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Jenkinsfile
64 lines (49 loc) · 2.5 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
57
58
59
60
61
62
63
64
@Library(['piper-lib', 'piper-lib-os']) _
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', numToKeepStr: '3']]]);
node {
stage('build') {
sh "rm -rf *"
dockerExecute(
dockerImage:'ldellaquila/maven-gradle-node-zulu-openjdk8:1.1.0',
dockerWorkspace: '/orientdb-enterprise-${env.BRANCH_NAME}'
) {
try{
sh "rm -rf orientdb-studio"
sh "rm -rf orientdb"
sh "rm -rf teleporter"
sh "rm -rf orientdb-neo4j-importer-plugin"
sh "rm -rf orientdb-security"
sh "rm -rf orientdb-gremlin"
sh "rm -rf orientdb-enterprise-agent"
fetch("orientdb-studio")
fetch("orientdb")
fetch("orientdb-neo4j-importer-plugin")
fetch("teleporter")
fetch("orientdb-security")
fetch("orientdb-gremlin")
fetchInternal("orientdb-enterprise-agent")
sh "cd orientdb-studio && mvn clean install -DskipTests"
sh "cd orientdb && mvn clean install -DskipTests"
sh "cd orientdb-neo4j-importer-plugin && mvn clean install -DskipTests"
sh "cd teleporter && mvn clean install -DskipTests"
sh "cd orientdb-gremlin && mvn clean install -DskipTests"
sh "cd orientdb-security && mvn clean install -DskipTests"
sh "cd orientdb-enterprise-agent && mvn clean jacoco:prepare-agent install jacoco:report -Dstorage.wal.allowDirectIO=false"
}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})")
}
}
}
def fetch(module) {
echo "checkout for $module"
checkout([$class: 'GitSCM', branches: [[name: env.BRANCH_NAME]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: "${module}"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '38719b3f-e300-4fe5-9d50-cfe2c10ce1f0', url: "https://github.com/orientechnologies/${module}.git"]]])
sh "git -C $module checkout ${env.BRANCH_NAME}"
}
def fetchInternal(module) {
echo "checkout for $module"
checkout([$class: 'GitSCM', branches: [[name: env.BRANCH_NAME]], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: "${module}"]], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '38719b3f-e300-4fe5-9d50-cfe2c10ce1f0', url: "https://github.com/SAP/${module}.git"]]])
sh "git -C $module checkout ${env.BRANCH_NAME}"
}