-
Notifications
You must be signed in to change notification settings - Fork 50
/
Jenkinsfile
39 lines (30 loc) · 1.52 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
@Library(['piper-lib', 'piper-lib-os']) _
node {
stage('build') {
sh "rm -rf *"
sh "cp /var/jenkins_home/uploadedContent/settings.xml ."
dockerExecute(
dockerImage:'ldellaquila/maven-gradle-node-zulu-openjdk8:1.1.0',
dockerWorkspace: '/orientdb-studio-${env.BRANCH_NAME}'
) {
try{
sh "rm -rf orientdb-studio"
// needed after the release and tag change, otherwise Studio is not found on Sonatype
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']]])
withMaven(globalMavenSettingsFilePath: 'settings.xml') {
sh "cd orientdb-studio && mvn clean deploy -DskipTests"
}
}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})")
}
}
}