Files
overleaf-cep/services/clsi/Jenkinsfile
Jakob Ackermann ddb99b72bf [monorepo] fixes for Jenkins (#29027)
* [packer] jenkins-worker: pull TL2017 for clsi

* [tpdsworker] add stub file for test/setup.js

* [linked-url-proxy] update package-lock.json

* [packer] jenkins: discover common Jenkinsfiles from jobs and libraries

* [linked-url-proxy] fix mocharc path for mocha-multi-reporters

* [linked-url-proxy] install prettier and eslint inside docker

* [linked-url-proxy] make prettier happy

* [linked-url-proxy] add patch for mocha-multi-reporters

* [clsi] pull TL2017

* [monorepo] add bind mount for reports folder for unit tests

GitOrigin-RevId: d0d3d92f963c15549125a298ca4fd50d8a0e83da
2025-10-14 08:05:48 +00:00

131 lines
3.2 KiB
Groovy

// Autogenerated by build scripts. Do not edit.
pipeline {
agent {
node {
label 'jenkins-agent-web'
customWorkspace '/workspace'
}
}
options {
timestamps()
timeout(time: 15, unit: 'MINUTES')
}
environment {
BRANCH_NAME = "${env.CHANGE_BRANCH ? env.CHANGE_BRANCH : env.BRANCH_NAME}"
JENKINS_BUILD_NUMBER = "${BUILD_NUMBER}"
BUILD_NUMBER = "${SHORT_SHA}_${BUILD_NUMBER}"
DOCKER_COMPOSE_FLAGS = '-f docker-compose.ci.yml'
COMMIT_SHA = "${GIT_COMMIT}"
SHORT_SHA = "${GIT_COMMIT.take(7)}"
}
stages {
stage('Stage 1') {
parallel {
stage('Build') {
steps {
dir('services/clsi') {
retry(count: 3) {
sh 'make build'
}
}
}
}
stage('Pull TL2017') {
steps {
// Remove after new worker VM image is live.
sh 'docker pull us-east1-docker.pkg.dev/overleaf-ops/ol-docker/texlive-full:2017.1'
}
}
stage('Create reports folder') {
steps {
sh 'mkdir services/clsi/reports'
}
}
}
}
stage('Stage 2') {
parallel {
stage('Push Branch Image') {
steps {
dir('services/clsi') {
sh 'make push_branch'
}
}
}
stage('Shellcheck') {
steps {
dir('services/clsi') {
sh 'make shellcheck'
}
}
}
stage('Lint') {
steps {
dir('services/clsi') {
sh 'make lint_ci'
}
}
post {
always {
recordIssues checksAnnotationScope: 'ALL', enabledForFailure: true, failOnError: true, id: 'clsi-eslint', name: 'clsi eslint', qualityGates: [[integerThreshold: 1, threshold: 1.0, type: 'TOTAL']], sourceCodeRetention: 'LAST_BUILD', tools: [esLint(pattern: 'services/clsi/reports/eslint.json')]
}
}
}
stage('Format') {
steps {
dir('services/clsi') {
sh 'make format_ci'
}
}
}
stage('Typecheck') {
steps {
dir('services/clsi') {
sh 'make typecheck_ci'
}
}
}
stage('Test Unit') {
steps {
dir('services/clsi') {
retry(count: 3) {
sh 'make test_unit'
}
}
}
}
stage('Test Acceptance') {
environment {
COMPOSE_PROJECT_NAME_TEST_ACCEPTANCE = "test_acceptance"
}
steps {
dir('services/clsi') {
retry(count: 3) {
sh 'make test_acceptance'
}
}
}
}
}
}
stage('Push Production') {
steps {
dir('services/clsi') {
sh 'make push'
}
}
}
}
post {
always {
junit checksName: 'clsi test results', testResults: 'services/clsi/reports/junit-*.xml'
}
cleanup {
dir('services/clsi') {
sh 'make clean'
}
sh 'make clean_jenkins -j10'
}
}
}