-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
46 lines (33 loc) · 980 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
46
#!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 pull origin master')
sh('pwd')
sh ('sh configure-dependencies.sh')
sh('cd java && mvn clean install')
sh('pwd')
sh('cd java/registry && mvn clean install')
sh 'chmod 755 ./target/metadata.sh'
sh('./build.sh')
}
stage('Publish') {
echo 'Push to Repo'
sh 'ls -al ~/'
sh 'ARTIFACT_LABEL=bronze ./dockerPushToRepo.sh'
sh './target/metadata.sh > metadata.json'
sh 'cat metadata.json'
archive includes: "metadata.json"
}
} catch (err) {
currentBuild.result = "FAILURE"
throw err
}
}