audioshowkit/Jenkinsfile

47 lines
1.3 KiB
Plaintext
Raw Normal View History

2022-04-17 06:37:34 +00:00
pipeline {
2022-04-16 08:22:01 +00:00
agent any
environment {
PATH = "/home/jenkins/.local/share/fnm:${PATH}"
}
2022-04-17 06:37:34 +00:00
stages {
2022-04-16 08:22:01 +00:00
stage("install") {
steps {
sh '''
curl -fsSL https://fnm.vercel.app/install | bash
eval "`fnm env`"
fnm install
fnm use
2022-11-27 00:18:23 +00:00
npm install
'''
2022-04-16 08:22:01 +00:00
}
}
stage("test") {
2022-04-16 08:22:01 +00:00
steps {
sh '''
eval "`fnm env`"
2022-11-27 00:18:23 +00:00
npm run test:junit
'''
junit 'junit/*.xml'
2022-04-16 08:22:01 +00:00
}
}
stage("build") {
2022-04-16 08:36:22 +00:00
steps {
sh '''
eval "`fnm env`"
2022-11-27 00:18:23 +00:00
npm run build:prod
'''
2022-04-20 05:02:17 +00:00
fingerprint "dist/**"
2022-04-18 12:40:23 +00:00
archiveArtifacts artifacts: 'dist/audioshowkit.js', followSymlinks: false
2022-04-18 03:25:54 +00:00
}
}
stage("generate docs") {
steps {
sh '''
eval "`fnm env`"
2022-11-27 00:18:23 +00:00
npm run docs
'''
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: './docs', reportFiles: 'index.html', reportName: 'AudioShowKit Docs', reportTitles: ''])
2022-04-16 08:22:01 +00:00
}
}
}
}