-
Notifications
You must be signed in to change notification settings - Fork 43
/
Jenkinsfile
36 lines (34 loc) · 913 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
library '[email protected]'
podTemplate(label: pod.label,
containers: pod.templates + [
containerTemplate(name: 'node', image: 'node:12-alpine3.14', ttyEnabled: true, command: '/bin/sh -c', args: 'cat')
]
) {
node(pod.label) {
stage('Checkout') {
checkout scm
}
container('node') {
stage('Build') {
sh """
yarn install
yarn run build
"""
}
stage('Lint') {
sh """
yarn lint
"""
}
stage('Publish') {
if ("${env.TAG_NAME}".contains("-"))
{
publishTagToNpm("./", "--tag beta")
}
else {
publishTagToNpm()
}
}
}
}
}