Files
overleaf-cep/services/web/.storybook/Jenkinsfile
T
Gernot Schulz 74efa0e345 Merge pull request #29898 from overleaf/gs-jenkins-issues-all-pipelines
Enable Jenkins hooks for creating GitHub issues for all pipelines with owners

GitOrigin-RevId: ba46db1d3137db12ee5c78f09b126fb9927d9c49
2025-11-27 09:06:04 +00:00

65 lines
1.4 KiB
Groovy

pipeline {
agent {
node {
// Select a VM with the given tabel.
label 'jenkins-agent-web'
// Use the monorepo checkout in /workspace.
customWorkspace '/workspace'
}
}
options {
// Print timestamp next to each log line.
timestamps()
timeout(time: 15, unit: 'MINUTES')
}
environment {
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
BUCKET = "gs://overleaf-dev-storybook"
}
stages {
stage('Install') {
steps {
retry(count: 3) {
sh 'make monorepo_setup'
}
}
}
stage('Build') {
steps {
sh 'bin/run -e BRANCH_NAME -w /overleaf/services/web monorepo make build_storybook'
}
}
stage('Copy stories') {
steps {
sh 'gsutil -m copy -r services/web/data/storybook/* "${BUCKET}/"'
}
}
stage('Generate index') {
steps {
dir('services/web') {
sh 'make storybook_index'
}
}
}
stage('Copy index') {
steps {
sh 'gsutil copy services/web/data/storybook/index.html "${BUCKET}/index.html"'
}
}
}
post {
failure {
script {
if (env.BRANCH_NAME == 'main') {
node('built-in') {
sh '/usr/local/bin/open-gh-failure-issue --project="🚉 Platform"'
}
}
}
}
cleanup {
sh 'rm -rf services/web/data/storybook/'
sh 'make clean_jenkins -j10'
}
}
}