-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
47 lines (47 loc) · 1.16 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
pipeline {
agent any
stages {
stage('Config System') {
steps {
echo 'Setup the system'
echo 'wget, curl, java, sbt and spark are now installed by Config Management system :)'
}
}
stage('Test the System') {
steps {
sh 'java -version'
sh 'sbt about'
}
}
stage('Unit Tests') {
steps {
sh 'sbt clean test'
archiveArtifacts 'target/test-reports/*.xml'
}
}
stage('Build') {
steps {
sh 'sbt clean compile package assembly'
archiveArtifacts 'target/scala-*/*.jar'
}
}
stage('Deploy') {
steps {
sh 'sudo cp target/*/*.war /opt/deploy/realTimeMovieRec/'
sh 'sudo cp target/*/*.jar /opt/deploy/realTimeMovieRec/'
sh 'sudo cp conf/* /opt/deploy/realTimeMovieRec/'
sh 'sudo cp target/*/*.jar /opt/staging/IntegrationStagingProject/lib'
}
}
stage('Integration Tests') {
steps {
sh 'cd /opt/staging/IntegrationStagingProject/ && sbt clean test'
}
}
stage('Production Deploy') {
steps {
echo 'Safe to Deploy in Production, Great Job :D'
}
}
}
}