blob: 04ad7d7550d80361143f09781fd7f557015d86dc (
plain)
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
|
pipeline {
agent {
docker {
reuseNode true
registryUrl 'https://coding-public-docker.pkg.coding.net'
image 'public/docker/nodejs:14'
}
}
stages {
stage('检出') {
steps {
checkout([
$class: 'GitSCM',
branches: [[name: env.GIT_BUILD_REF]],
userRemoteConfigs: [[
url: env.GIT_REPO_URL,
credentialsId: env.CREDENTIALS_ID
]]])
}
}
stage('安装依赖') {
steps {
sh 'yarn'
}
}
stage('构建和Lint') {
parallel {
stage('构建') {
steps {
sh 'yarn build'
}
}
stage('Lint') {
steps {
sh 'yarn lint'
}
}
}
}
}
environment {
YARN_NPM_REGISTRY_SERVER = 'https://registry.npm.taobao.org'
}
}
|