forked from allure-framework/allure-scalatest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
42 lines (42 loc) · 2.13 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
pipeline {
agent { label 'java' }
parameters {
booleanParam(name: 'RELEASE', defaultValue: false, description: 'Perform release?')
string(name: 'RELEASE_VERSION', defaultValue: '', description: 'Release version')
string(name: 'NEXT_VERSION', defaultValue: '', description: 'Next version (without SNAPSHOT suffix)')
}
stages {
stage('Build') {
steps {
sh "${tool name: '0.13', type: 'org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation'}/bin/sbt \"compile\""
}
}
stage('Release') {
when { expression { return params.RELEASE } }
steps {
configFileProvider([configFile(fileId: 'global.sbt', targetLocation: '/home/jenkins/.sbt/0.13/global.sbt')]) {
configFileProvider([configFile(fileId: 'plugins.sbt', targetLocation: '/home/jenkins/.sbt/0.13/plugins/plugins.sbt')]) {
configFileProvider([configFile(fileId: 'sonatype.sbt', targetLocation: '/home/jenkins/.sbt/0.13/sonatype.sbt')]) {
configFileProvider([configFile(fileId: 'gpg.sbt', targetLocation: '/home/jenkins/.sbt/0.13/gpg.sbt')]) {
configFileProvider([configFile(fileId: 'qameta-ci.asc', targetLocation: '/home/jenkins/.gnupg/qameta-ci.asc')]) {
sshagent(['qameta-ci_ssh']) {
sh 'git checkout master && git pull origin master'
sh "${tool name: '0.13', type: 'org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation'}/bin/sbt \"release " +
"with-defaults " +
"release-version ${RELEASE_VERSION} " +
"next-version ${NEXT_VERSION}-SNAPSHOT\""
}
}
}
}
}
}
}
}
}
post {
always {
deleteDir()
}
}
}