generated from HarveyD/react-component-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
44 lines (43 loc) · 1.31 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
40
41
42
43
44
pipeline {
agent { label 'nodejs12' }
options {
timeout(time: 1, unit: 'HOURS')
timestamps()
copyArtifactPermission('*')
}
stages {
stage('Build') {
steps {
withNPM(npmrcConfig: 'e9d7a98e-f30a-440d-8a52-743c4ce7d9e5') {
sh 'yarn install --frozen-lockfile'
sh 'yarn run test'
sh 'yarn pack --dry-run'
}
}
}
stage('Publish') {
when { tag "*" }
steps {
withNPM(npmrcConfig: 'e9d7a98e-f30a-440d-8a52-743c4ce7d9e5') {
sh 'yarn publish --access public'
}
}
}
stage('Storybook') {
steps {
script {
sh 'yarn run build-storybook'
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'storybook-static', reportFiles: 'index.html', reportName: 'Storybook', reportTitles: ''])
}
}
}
}
post {
fixed {
mattermostSend color: "good", message: "${env.JOB_NAME} fixed!"
}
unsuccessful {
mattermostSend color: "danger", message: "${env.JOB_NAME} failed!"
}
}
}