-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
35 lines (35 loc) · 932 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
pipeline {
agent {
docker {
image 'node:lts-iron'
args '--userns=host \
--security-opt seccomp:unconfined \
-v /home/ci/.cache/yarn:/.cache/yarn \
-v /home/ci/.npm:/.npm'
}
}
parameters {
booleanParam(name: 'PUBLISH', defaultValue: false)
}
stages {
stage('Build') {
steps {
sh 'yarn install --non-interactive --frozen-lockfile'
sh 'yarn typecheck'
sh 'yarn test'
sh 'yarn build'
}
}
stage ('Publish') {
when {
expression { params.PUBLISH == true }
}
environment {
NPM_TOKEN = credentials('NPM_TOKEN_MANUSCRIPTS_OSS')
}
steps {
sh 'npx @manuscripts/publish'
}
}
}
}