Updated CI to run some things in parallel

This commit is contained in:
Jamie Curnow 2024-01-09 10:05:19 +10:00
parent e4ef095254
commit f7c87f63bd
No known key found for this signature in database
GPG Key ID: FFBB624C43388E9E

47
Jenkinsfile vendored
View File

@ -60,7 +60,9 @@ pipeline {
} }
} }
} }
stage('Build and Test') { stage('Builds') {
parallel {
stage('Project') {
steps { steps {
script { script {
// Frontend and Backend // Frontend and Backend
@ -84,6 +86,20 @@ pipeline {
} }
} }
} }
stage('Docs') {
steps {
dir(path: 'docs') {
sh 'yarn install'
sh 'yarn build'
}
dir(path: 'docs/.vuepress/dist') {
sh 'tar -czf ../../docs.tgz *'
}
archiveArtifacts(artifacts: 'docs/docs.tgz', allowEmptyArchive: false)
}
}
}
}
stage('Integration Tests Sqlite') { stage('Integration Tests Sqlite') {
steps { steps {
// Bring up a stack // Bring up a stack
@ -140,25 +156,6 @@ pipeline {
} }
} }
} }
stage('Docs') {
when {
not {
equals expected: 'UNSTABLE', actual: currentBuild.result
}
}
steps {
dir(path: 'docs') {
sh 'yarn install'
sh 'yarn build'
}
dir(path: 'docs/.vuepress/dist') {
sh 'tar -czf ../../docs.tgz *'
}
archiveArtifacts(artifacts: 'docs/docs.tgz', allowEmptyArchive: false)
}
}
stage('MultiArch Build') { stage('MultiArch Build') {
when { when {
not { not {
@ -172,9 +169,9 @@ pipeline {
} }
} }
} }
stage('Docs Deploy') { stage('Docs / Comment') {
parallel { parallel {
stage('Master') { stage('Master Docs') {
when { when {
allOf { allOf {
branch 'master' branch 'master'
@ -187,7 +184,7 @@ pipeline {
npmDocsReleaseMaster() npmDocsReleaseMaster()
} }
} }
stage('Develop') { stage('Develop Docs') {
when { when {
allOf { allOf {
branch 'develop' branch 'develop'
@ -200,8 +197,6 @@ pipeline {
npmDocsReleaseDevelop() npmDocsReleaseDevelop()
} }
} }
}
}
stage('PR Comment') { stage('PR Comment') {
when { when {
allOf { allOf {
@ -218,6 +213,8 @@ pipeline {
} }
} }
} }
}
}
post { post {
always { always {
sh 'docker-compose down --remove-orphans --volumes -t 30' sh 'docker-compose down --remove-orphans --volumes -t 30'