forked from galasa-dev/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.gradle
37 lines (35 loc) · 1.29 KB
/
Jenkinsfile.gradle
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
pipeline {
agent {
label 'codesigning'
}
environment {
//Configure Gradnel from the tools definition in Jenkins
def gradleHome = tool 'gradle'
PATH = "${gradleHome}/bin:${env.PATH}"
//Set some defaults
def workspace = pwd()
}
stages {
stage('prep-workspace') {
steps {
configFileProvider([configFile(fileId: 'galasa-init-gradle', targetLocation: '.gradle/init.gradle')]) {
}
}
}
stage('gradle') {
steps {
withCredentials([string(credentialsId: 'galasa-gpg', variable: 'GPG'),
usernamePassword(credentialsId: 'galasa-nexus', usernameVariable: 'MAVENUSERNAME', passwordVariable: 'MAVENPASSWORD'),
usernamePassword(credentialsId: 'gradle-cache', usernameVariable: 'CACHEUSERNAME', passwordVariable: 'CACHEPASSWORD')]) {
withFolderProperties {
// withSonarQubeEnv('GalasaSonarQube') {
dir('galasa-parent') {
sh "gradle -Dgradle.user.home=${workspace}/.gradle -Psigning.gnupg.keyName=8534E695 -Psigning.gnupg.passphrase=$GPG ${GRADLE_CACHE} ${GRADLE_TASKS}"
}
// }
}
}
}
}
}
}