-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
executable file
·60 lines (48 loc) · 2.77 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
@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-neo4j-importer-plugin-${env.BRANCH_NAME}'
) {
try{
sh "rm -rf orientdb"
sh "rm -rf orientdb-studio"
sh "rm -rf orientdb-neo4j-importer-plugin"
checkout(
[$class: 'GitSCM', branches: [[name: env.BRANCH_NAME]],
doGenerateSubmoduleConfigurations: false,
extensions: [],
submoduleCfg: [],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'orientdb']],
userRemoteConfigs: [[url: 'https://github.com/orientechnologies/orientdb']]])
checkout(
[$class: 'GitSCM', branches: [[name: env.BRANCH_NAME]],
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-neo4j-importer-plugin']],
userRemoteConfigs: [[url: 'https://github.com/orientechnologies/orientdb-neo4j-importer-plugin']]])
withMaven(mavenLocalRepo: '${HOME}/.m2/repository', globalMavenSettingsFilePath: 'settings.xml') {
sh "cd orientdb-studio && mvn clean install -DskipTests"
sh "cd orientdb && mvn clean install -DskipTests"
sh "cd orientdb-neo4j-importer-plugin && mvn clean deploy"
}
}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})")
}
}
}