-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
35 lines (35 loc) · 1.3 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
node {
stage("Checkout & Prepare") {
checkout scm
}
stage("Build") {
sh "./gradlew clean build -x test -x checkstyleMain -x checkstyleTest"
}
stage("Check code style") {
sh "./gradlew checkstyleMain checkstyleTest -x test"
}
stage("Unit tests") {
sh "./gradlew test jacocoTestReport -i"
}
stage("Functional tests") {
sh "./gradlew :bitcoin-functional-tests:test -Prun-funct-test=true -i"
}
stage("Integration tests") {
sh "./gradlew :bitcoin-integration-tests:test -Prun-integr-test=true -i"
}
stage("Sonar") {
withCredentials([
string(credentialsId: 'SONAR_HOST_URL', variable: 'SONAR_HOST_URL')
]) {
sh "./gradlew sonarqube -i -PsonarUrl=$SONAR_HOST_URL"
}
}
stage("Publish") {
withCredentials([
[ $class: 'UsernamePasswordMultiBinding', credentialsId: 'ARTIFACTORY_CREDENTIALS', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD' ],
string(credentialsId: 'ARTIFACTORY_HOST', variable: 'ARTIFACTORY_HOST')
]) {
sh "./gradlew publish -PartifactoryUsername=$USERNAME -PartifactoryPassword=$PASSWORD -PartifactoryHost=$ARTIFACTORY_HOST -Pbranch=${env.BRANCH_NAME}"
}
}
}