forked from Sunbird-Lern/userorg-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (34 loc) · 906 Bytes
/
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
#!groovy
node('build-slave') {
currentBuild.result = "SUCCESS"
cleanWs()
try {
stage('Checkout'){
checkout scm
}
stage('Build'){
env.NODE_ENV = "build"
print "Environment will be : ${env.NODE_ENV}"
sh('git submodule foreach git pull origin release-1.5.1')
sh 'mvn clean install -DskipTests=true '
dir ('service') {
sh 'mvn play2:dist'
}
sh('chmod 777 ./build.sh')
sh('./build.sh')
}
stage('Publish'){
echo 'Push to Repo'
sh 'ls -al ~/'
sh('chmod 777 ./dockerPushToRepo.sh')
sh 'ARTIFACT_LABEL=bronze ./dockerPushToRepo.sh'
sh './metadata.sh > metadata.json'
sh 'cat metadata.json'
archive includes: "metadata.json"
}
}
catch (err) {
currentBuild.result = "FAILURE"
throw err
}
}