[monorepo] refactor retries in Jenkins to step level (#29008)

* [monorepo] refactor retries in Jenkins to step level

Change the junit reports to use step specific file names. The [hash]
template option was neat in getting unique file names, but results in
duplicate test reports on retry.

* [patches] add support for .cjs config files for mocha-multi-reporters

GitOrigin-RevId: 3a749441470b5ba633e71319589606cfbe860952
This commit is contained in:
Jakob Ackermann
2025-10-13 08:06:37 +00:00
committed by Copybot
parent f0b2466f93
commit d7623b576f
14 changed files with 163 additions and 69 deletions
+39 -14
View File
@@ -23,7 +23,6 @@ pipeline {
timestamps()
// Abort build after hitting first failure.
parallelsAlwaysFailFast()
retry(3)
timeout(time: 15, unit: 'MINUTES')
}
environment {
@@ -64,7 +63,9 @@ pipeline {
parallel {
stage('Install deps') {
steps {
sh 'make monorepo_setup'
retry(count: 3) {
sh 'make monorepo_setup'
}
script {
job_npm_install_done = true
}
@@ -103,8 +104,12 @@ pipeline {
}
}
dir('copybara/public/repo/server-ce') {
sh 'make build-base'
sh 'make build-community'
retry(count: 3) {
sh 'make build-base'
}
retry(count: 3) {
sh 'make build-community'
}
}
script {
job_server_ce_build_done = true
@@ -135,7 +140,9 @@ pipeline {
}
}
dir('server-pro') {
sh 'make build-ci'
retry(count: 3) {
sh 'make build-ci'
}
}
script {
job_server_pro_build_done = true
@@ -186,7 +193,9 @@ pipeline {
}
}
dir('server-ce/test') {
sh 'make test-e2e'
retry(count: 3) {
sh 'make test-e2e'
}
}
}
}
@@ -202,7 +211,9 @@ pipeline {
}
}
dir('server-ce/test') {
sh 'make test-e2e'
retry(count: 3) {
sh 'make test-e2e'
}
}
}
}
@@ -218,7 +229,9 @@ pipeline {
}
}
dir('server-ce/test') {
sh 'make test-e2e'
retry(count: 3) {
sh 'make test-e2e'
}
}
}
}
@@ -234,7 +247,9 @@ pipeline {
}
}
dir('server-ce/test') {
sh 'make test-e2e'
retry(count: 3) {
sh 'make test-e2e'
}
}
}
}
@@ -250,7 +265,9 @@ pipeline {
}
}
dir('server-ce/test') {
sh 'make test-e2e'
retry(count: 3) {
sh 'make test-e2e'
}
}
}
}
@@ -266,7 +283,9 @@ pipeline {
}
}
dir('server-ce/test') {
sh 'make test-e2e'
retry(count: 3) {
sh 'make test-e2e'
}
}
}
}
@@ -282,7 +301,9 @@ pipeline {
}
}
dir('server-ce/test') {
sh 'make test-e2e'
retry(count: 3) {
sh 'make test-e2e'
}
}
}
}
@@ -298,7 +319,9 @@ pipeline {
}
}
dir('server-ce/test') {
sh 'make test-e2e'
retry(count: 3) {
sh 'make test-e2e'
}
}
}
}
@@ -314,7 +337,9 @@ pipeline {
}
}
dir('server-ce/test') {
sh 'make test-e2e'
retry(count: 3) {
sh 'make test-e2e'
}
}
}
}
+1 -1
View File
@@ -38,7 +38,7 @@ if (process.env.CI) {
reporterOptions = {
reporter: `${process.env.MONOREPO}/node_modules/cypress-multi-reporters`,
reporterOptions: {
configFile: 'cypress/cypress-multi-reporters.json',
configFile: 'cypress/cypress-multi-reporters.cjs',
},
}
}
@@ -0,0 +1,10 @@
module.exports = {
reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: {
mochaFile: `cypress-reports/junit-${process.env.CYPRESS_SHARD}-[suiteFilename].xml`,
includePending: true,
jenkinsMode: true,
jenkinsClassnamePrefix: 'Server Pro E2E tests',
rootSuiteTitle: 'Server Pro E2E tests',
},
}
@@ -1,10 +0,0 @@
{
"reporterEnabled": "spec, mocha-junit-reporter",
"mochaJunitReporterReporterOptions": {
"mochaFile": "cypress-reports/junit-[hash]-[suiteFilename].xml",
"includePending": true,
"useFullSuiteTitle": true,
"jenkinsMode": true,
"rootSuiteTitle": "Server Pro E2E tests"
}
}