-
Notifications
You must be signed in to change notification settings - Fork 3
/
Jenkinsfile
39 lines (36 loc) · 1.11 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
30
31
32
33
34
35
36
37
38
39
// Instead of annotating an unnecessary import statement, the symbol _ is annotated, according to the annotation pattern.
def repoName = "FED-docs"
def version = env.BRANCH_NAME
pipeline {
agent any
environment {
CI = 'true'
}
stages {
stage("Bootstrap && Build") {
agent {
docker {
image 'node:10.23.0-alpine3.10'
args '-e HOME=/tmp -e NPM_CONFIG_PREFIX=/tmp/.npm'
reuseNode true
}
}
steps {
sh 'npm config set registry https://registry.npm.taobao.org'
sh 'npm install'
sh 'npm run build'
}
}
stage("Deploy") {
steps {
sh 'rsync --delete -avz -e ssh ${WORKSPACE}/docs/.vuepress/dist/* [email protected]:/data/workplus/websites/open.workplus.io/dev/'
}
}
}
post {
always {
emailext(subject: '$DEFAULT_SUBJECT', body: '$DEFAULT_CONTENT', to: '[email protected]')
cleanWs deleteDirs: true
}
}
}