forked from galasa-dev/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
86 lines (77 loc) · 4.21 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
pipeline {
// Initially run on any agent
agent {
label 'codesigning'
}
environment {
//Configure Maven from the maven tooling in Jenkins
def mvnHome = tool 'Default'
PATH = "${mvnHome}/bin:${env.PATH}"
//Set some defaults
def workspace = pwd()
}
stages {
// Set up the workspace, clear the git directories and setup the manve settings.xml files
stage('prep-workspace') {
steps {
configFileProvider([configFile(fileId: '86dde059-684b-4300-b595-64e83c2dd217', targetLocation: 'settings.xml')]) {
}
dir('repository/dev.galasa') {
deleteDir()
}
dir('repository/dev/galasa') {
deleteDir()
}
}
}
stage('Extensions Maven') {
steps {
withCredentials([string(credentialsId: 'galasa-gpg', variable: 'GPG')]) {
withFolderProperties { withSonarQubeEnv('GalasaSonarQube') {
dir('galasa-extensions-parent') {
sh "mvn --settings ${workspace}/settings.xml -Dmaven.repo.local=${workspace}/repository -Dgpg.skip=${GPG_SKIP} -Dgpg.passphrase=$GPG -P ${MAVEN_PROFILE} -B -e -fae --non-recursive ${MAVEN_GOAL}"
dir('dev.galasa.cps.etcd') {
sh "mvn --settings ${workspace}/settings.xml -Dmaven.repo.local=${workspace}/repository -Djarsigner.skip=${env.SIGN_SKIP} -Dgpg.skip=${GPG_SKIP} -Dgpg.passphrase=$GPG -P ${MAVEN_PROFILE} -B -e -fae --non-recursive ${MAVEN_GOAL}"
}
dir('dev.galasa.ras.couchdb') {
sh "mvn --settings ${workspace}/settings.xml -Dmaven.repo.local=${workspace}/repository -Djarsigner.skip=${env.SIGN_SKIP} -Dgpg.skip=${GPG_SKIP} -Dgpg.passphrase=$GPG -P ${MAVEN_PROFILE} -B -e -fae --non-recursive ${MAVEN_GOAL}"
}
dir('dev.galasa.extensions.obr') {
sh "mvn --settings ${workspace}/settings.xml -Dmaven.repo.local=${workspace}/repository -Dgpg.skip=${GPG_SKIP} -Dgpg.passphrase=$GPG -P ${MAVEN_PROFILE} -B -e -fae --non-recursive ${MAVEN_GOAL}"
}
dir('dev.galasa.jenkins') {
sh "mvn --settings ${workspace}/settings.xml -Dmaven.repo.local=${workspace}/repository -DskipTests -Dgpg.skip=${GPG_SKIP} -Dgpg.passphrase=$GPG -P ${MAVEN_PROFILE} -B -e -fae --non-recursive ${MAVEN_GOAL}"
}
dir('dev.galasa.docker.operator') {
sh "mvn --settings ${workspace}/settings.xml -Dmaven.repo.local=${workspace}/repository -Dgpg.skip=${GPG_SKIP} -Dgpg.passphrase=$GPG -P ${MAVEN_PROFILE} -B -e -fae --non-recursive ${MAVEN_GOAL}"
}
}
} }
}
}
}
stage('Eclipse Maven') {
steps {
withCredentials([string(credentialsId: 'galasa-gpg', variable: 'GPG')]) {
withFolderProperties { withSonarQubeEnv('GalasaSonarQube') {
dir('galasa-eclipse-parent') {
sh "mvn --settings ${workspace}/settings.xml -Dmaven.repo.local=${workspace}/repository -Dgpg.skip=${GPG_SKIP} -Dgpg.passphrase=$GPG -P ${MAVEN_PROFILE} -B -e -fae --non-recursive ${MAVEN_GOAL}"
dir('dev.galasa.eclipse') {
sh "mvn --settings ${workspace}/settings.xml -Dmaven.repo.local=${workspace}/repository -Djarsigner.skip=${env.SIGN_SKIP} -Dgpg.skip=${GPG_SKIP} -Dgpg.passphrase=$GPG -P ${MAVEN_PROFILE} -B -e -fae --non-recursive ${MAVEN_GOAL}"
}
dir('dev.galasa.eclipse.feature') {
sh "mvn --settings ${workspace}/settings.xml -Dmaven.repo.local=${workspace}/repository -Djarsigner.skip=${env.SIGN_SKIP} -Dgpg.skip=${GPG_SKIP} -Dgpg.passphrase=$GPG -P ${MAVEN_PROFILE} -B -e -fae --non-recursive ${MAVEN_GOAL}"
}
}
} }
}
}
}
}
post {
// triggered when red sign
failure {
slackSend (channel: '#galasa-devs', color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")
}
}
}