Work damnit!
Some checks failed
gitea_dndsources/schedulord-frontend/pipeline/head There was a failure building this commit

This commit is contained in:
Jesse James Isler 2022-06-09 11:09:49 +02:00
parent b988842aa0
commit 81e3310eef

18
Jenkinsfile vendored
View File

@ -1,22 +1,37 @@
pipeline { pipeline {
agent any agent none
stages { stages {
stage('Install') { stage('Install') {
agent {
docker {
image 'node:lts-bullseye-slim'
args '-p 3000:3000'
}
}
steps { steps {
sh 'npm install' sh 'npm install'
stash includes: 'node_modules/', name: 'node_modules'
} }
} }
stage('Test') { stage('Test') {
agent {
docker {
image 'node:lts-bullseye-slim'
args '-p 3000:3000'
}
}
parallel { parallel {
stage('Static code analysis') { stage('Static code analysis') {
steps { steps {
unstash 'node_modules'
sh 'npm run-script lint' sh 'npm run-script lint'
} }
} }
stage('Unit tests') { stage('Unit tests') {
steps { steps {
unstash 'node_modules'
sh 'npm run-script test' sh 'npm run-script test'
} }
} }
@ -25,6 +40,7 @@ pipeline {
stage('Build') { stage('Build') {
steps { steps {
unstash 'node_modules'
sh 'npm run-script build' sh 'npm run-script build'
stash includes: 'dist/', name: 'dist' stash includes: 'dist/', name: 'dist'
} }