Updated Jenkinsfile.

.bashrc is now functional for non-interactive shells.
This commit is contained in:
Harrison Deng 2022-11-28 06:48:00 +00:00
parent 59dbeec8be
commit bc5e4b09eb

26
Jenkinsfile vendored
View File

@ -6,40 +6,28 @@ pipeline {
stages { stages {
stage("install") { stage("install") {
steps { steps {
sh ''' sh 'curl -fsSL https://fnm.vercel.app/install | bash'
curl -fsSL https://fnm.vercel.app/install | bash sh 'fnm install'
eval "`fnm env`" sh 'fnm use'
fnm install sh 'npm install'
fnm use
npm install
'''
} }
} }
stage("test") { stage("test") {
steps { steps {
sh ''' sh 'npm run test:junit'
eval "`fnm env`"
npm run test:junit
'''
junit 'junit/*.xml' junit 'junit/*.xml'
} }
} }
stage("build") { stage("build") {
steps { steps {
sh ''' sh 'npm run build:prod'
eval "`fnm env`"
npm run build:prod
'''
fingerprint "dist/**" fingerprint "dist/**"
archiveArtifacts artifacts: 'dist/audioshowkit.js', followSymlinks: false archiveArtifacts artifacts: 'dist/audioshowkit.js', followSymlinks: false
} }
} }
stage("generate docs") { stage("generate docs") {
steps { steps {
sh ''' sh 'npm run docs'
eval "`fnm env`"
npm run docs
'''
publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: './docs', reportFiles: 'index.html', reportName: 'AudioShowKit Docs', reportTitles: '']) publishHTML([allowMissing: false, alwaysLinkToLastBuild: true, keepAll: true, reportDir: './docs', reportFiles: 'index.html', reportName: 'AudioShowKit Docs', reportTitles: ''])
} }
} }