forked from reportportal/service-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JenkinsfileRelease
38 lines (28 loc) · 1.08 KB
/
JenkinsfileRelease
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
#!groovy
node {
load "$JENKINS_HOME/jobvars.env"
dir('src/github.com/reportportal/service-ui') {
stage('Checkout'){
checkout scm
sh 'git checkout master'
sh 'git pull'
}
stage('Build') {
withEnv(["NODE_OPTIONS=--max_old_space_size=3072"]) {
docker.image('node:11').inside('-u root') {
sh 'node -v'
sh 'npm config set unsafe-perm=true'
sh 'make build-statics'
}
}
}
stage ('Build Server') {
withEnv(["GOPATH=${JENKINS_HOME}/workspace/${JOB_NAME}", "BINTRAY_TOKEN=${BINTRAY_TOKEN}", "RELEASE_VERSION=${RELEASE_VERSION}", "GO111MODULE=on"]) {
env.PATH="${GOPATH}/bin:$PATH"
sh 'go version'
sh "make release v=${RELEASE_VERSION}"
sh 'file release/service-ui_linux_amd64'
}
}
}
}