forked from project-sunbird/sunbird-lms-mw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
39 lines (32 loc) · 865 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
#!groovy
node('build-slave') {
currentBuild.result = "SUCCESS"
try {
cleanWs()
stage('Checkout'){
checkout scm
}
stage('Build'){
env.NODE_ENV = "build"
print "Environment will be : ${env.NODE_ENV}"
sh('git branch')
sh('git submodule update --init --recursive --remote')
sh('sudo mvn clean install -DskipTests=true')
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
}
}