forked from redhat-developer/yaml-language-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
29 lines (28 loc) · 1.18 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
node('rhel7'){
stage ('Checkout yaml server code'){
deleteDir()
git url: 'https://github.com/redhat-developer/yaml-language-server.git'
}
stage ('install build requirements'){
def nodeHome = tool 'nodejs-7.7.4'
env.PATH="${env.PATH}:${nodeHome}/bin"
sh "npm install -g [email protected]"
}
stage ('build & test server'){
def archive = "yaml-language-server-${env.BUILD_NUMBER}.tar.gz"
sh "npm install"
sh "npm run compile"
sh "npm test"
sh "tar -zcvf ${archive} ./out"
sh "rsync -Pzrlt --rsh=ssh --protocol=28 ${archive} ${UPLOAD_LOCATION}"
sh "mkdir -p tmp"
dir("tmp"){
sh "mkdir -p static/oxygen/stable/builds/yaml-language-server/ oxygen/stable/builds/yaml-language-server/"
}
dir("tmp/oxygen/stable/builds/yaml-language-server/"){
sh "ln -s ../../../../static/oxygen/stable/builds/yaml-language-server/${archive} yaml-language-server-latest.tar.gz"
sh "rsync -Pzrlt --rsh=ssh --protocol=28 yaml-language-server-latest.tar.gz ${LATEST_LOCATION}"
}
sh "rm -f ${archive} yaml-language-server-latest.tar.gz"
}
}