forked from awslabs/dynamodb-transactions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
43 lines (40 loc) · 1.34 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
#!groovy
// Automatically build any new commits on master, and deploy them to the development environment.
// Successful builds will be automatically deployed to staging and production.
pipeline {
agent { label 'shared' }
// These have to be set up globally in the Jenkins UI with these exact names.
tools {
// Must be JDK 8.
jdk 'JDK-1.8'
// Latest release version of sbt as of now.
'org.jvnet.hudson.plugins.SbtPluginBuilder$SbtInstallation' 'sbt-1.2.1'
}
stages {
stage('Build') {
steps {
// Actually compile the project.
sh 'sbt -no-colors compile'
}
}
stage('Test') {
steps {
// Run unit and functional tests.
// The 'testOnly -- -n' part runs all tests but suppresses output colors in JUnit.
sh 'sbt -no-colors test \'testOnly -- -n\''
}
post {
always {
// Read in any test results so they'll show up in the Jenkins UI.
junit 'target/test-reports/*.xml'
}
}
}
stage('Publish to Artifactory') {
steps {
// Publish to the repo defined in build.sbt.
sh 'sbt -no-colors publish'
}
}
}
}