-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathJenkinsfile
47 lines (46 loc) · 1.19 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
#!groovy
pipeline {
agent {
dockerfile true
}
environment {
NEXUS = credentials('exchange-nexus')
NEXUSIQ = credentials('nexus-iq')
}
stages {
stage('Test') {
steps {
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'sonarqube-official', passwordVariable: 'SONAR_SERVER_TOKEN', usernameVariable: 'SONAR_SERVER_URL']]) {
sh 'sbt -mem 4096 -Dsbt.global.base=.sbt -Dsbt.boot.directory=.sbt -Dsbt.ivy.home=.ivy2 clean coverage test coverageReport runSonar'
}
}
}
}
stage('nexusIq'){
when {
anyOf {
branch 'master'
branch 'release/*'
}
}
steps {
wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
sh './gradlew nexusIq'
}
}
}
stage('Publish') {
when {
anyOf {
branch 'master'
branch 'devel'
branch 'fat-jar-publish'
}
}
steps {
sh 'sbt -Dsbt.global.base=.sbt -Dsbt.boot.directory=.sbt -Dsbt.ivy.home=.ivy2 publish coreJVM/publish'
}
}
}
}