audioshowkit/Jenkinsfile

75 lines
2.4 KiB
Plaintext
Raw Normal View History

2022-04-17 01:37:34 -05:00
pipeline {
2022-04-16 03:22:01 -05:00
agent any
2022-04-17 01:37:34 -05:00
stages {
2022-04-16 03:22:01 -05:00
stage("install") {
steps {
2022-04-17 21:54:43 -05:00
dir('audioshowkit') {
nodejs('NodeJS (17.4.0)') {
sh "npm install"
}
2022-04-16 03:22:01 -05:00
}
}
}
stage("build") {
steps {
2022-04-17 21:54:43 -05:00
dir('audioshowkit') {
nodejs('NodeJS (17.4.0)') {
sh "npm run build:dev"
}
2022-04-16 03:22:01 -05:00
}
}
}
stage("test") {
steps {
2022-04-17 21:54:43 -05:00
dir('audioshowkit') {
nodejs('NodeJS (17.4.0)') {
sh "npm run test"
}
junit 'junit/*.xml'
2022-04-16 03:22:01 -05:00
}
}
}
2022-04-17 22:25:54 -05:00
stage("generate docs") {
2022-04-16 03:36:22 -05:00
steps {
2022-04-17 22:25:54 -05:00
dir('audioshowkit') {
nodejs('NodeJS (17.4.0)') {
sh "npm run docs"
}
}
2022-04-16 03:36:22 -05:00
}
}
2022-04-17 20:47:16 -05:00
stage("publish") {
2022-04-17 22:25:54 -05:00
steps {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'audioshowkit/docs', reportFiles: 'index.html', reportName: 'AudioShowKit JSDocs', reportTitles: ''])
archiveArtifacts artifacts: 'audioshowkit/dist/audioshowkit.js', followSymlinks: false
}
}
stage("setup showcase") {
stages {
stage("install showcase") {
steps {
dir('showcase') {
nodejs('NodeJS (17.4.0)') {
sh "npm i"
2022-04-17 20:47:16 -05:00
}
}
}
}
2022-04-17 22:25:54 -05:00
stage("build showcase") {
2022-04-17 20:47:16 -05:00
steps {
2022-04-17 22:25:54 -05:00
dir('showcase') {
2022-04-17 21:54:43 -05:00
nodejs('NodeJS (17.4.0)') {
2022-04-17 22:25:54 -05:00
sh "npm run build"
2022-04-17 21:54:43 -05:00
}
2022-04-17 20:47:16 -05:00
}
2022-04-17 22:25:54 -05:00
}
}
stage("deploy showcase") {
steps {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'showcase/dist', reportFiles: 'index.html', reportName: 'AudioShowKit Demo', reportTitles: ''])
2022-04-17 20:47:16 -05:00
}
2022-04-16 03:22:01 -05:00
}
}
}
}
}