-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
30 lines (28 loc) · 810 Bytes
/
Jenkinsfile
File metadata and controls
30 lines (28 loc) · 810 Bytes
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
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr:'10'))
}
stages {
stage('Build') {
steps {
sh './gradlew clean assemble'
}
}
stage('SonarQube analysis') {
steps {
withSonarQubeEnv('SonarMonext') {
sh 'mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar'
}
}
}
stage('Deploy') {
steps {
withCredentials([string(credentialsId: 'KEY_GPG_PASSPHRASE', variable: 'KEY_GPG_PASSPHRASE'),
usernamePassword(credentialsId: 'OSSRH', usernameVariable: 'OSSRH_USER', passwordVariable: 'OSSRH_PWD')]) {
sh './gradlew publish'
}
}
}
}
}