Parcourir la source

[monorepo] switch from cypress-reports to reports (#29183)

* [monorepo] switch from cypress-reports to reports

* [saas-e2e] collect junit reports from new editor tests

* [saas-e2e] simplify setup for semaphore variable in Jenkins pipeline

We do not retry pipelines anymore.

* [saas-e2e] put new editor tests into their own namespace

GitOrigin-RevId: 1869310bf58f0b5b0081dcae2f16ec1a267caec6
Jakob Ackermann il y a 9 mois
Parent
commit
db1966b0aa

+ 0 - 1
server-ce/test/.gitignore

@@ -1,3 +1,2 @@
-cypress-reports/
 data/
 docker-mailtrap/

+ 3 - 16
server-ce/test/Jenkinsfile

@@ -41,22 +41,9 @@ pipeline {
     OVERLEAF_PRO_TAG_LATEST = "us-east1-docker.pkg.dev/overleaf-ops/ol-docker/pro-internal:main"
   }
   stages {
-    // Retries will use the same pipeline instance. Reset the vars.
-    stage('Reset vars') {
+    stage('Create reports folder') {
       steps {
-        script {
-          job_copybara_done = false
-          job_npm_install_done = false
-          job_prefetch_custom_done = false
-          job_prefetch_default_done = false
-          job_server_ce_build_done = false
-          job_server_pro_build_done = false
-        }
-        // Reset the results folder.
-        // Use a folder that is not managed by cypress, as cypress will clear its results folder at the start of each individual run.
-        // I.e. we would loose the test results from finished/running test suites when the last test suite starts.
-        sh 'rm -rf server-ce/test/cypress-reports/'
-        sh 'mkdir -p server-ce/test/cypress-reports/'
+        sh 'mkdir server-ce/test/reports'
       }
     }
     stage('Parallel') {
@@ -350,7 +337,7 @@ pipeline {
   post {
     // Collect junit test results for both success and failure case.
     always {
-      junit checksName: 'Server Pro E2E test results', testResults: 'server-ce/test/cypress-reports/junit-*.xml'
+      junit checksName: 'Server Pro E2E test results', testResults: 'server-ce/test/reports/junit-*.xml'
     }
     // Ensure tear down of test containers, remove CE docker images, then run general Jenkins VM cleanup.
     cleanup {

+ 1 - 1
server-ce/test/Makefile

@@ -45,7 +45,7 @@ SHARD_PROJECT_NAMES = \
 	test-pro-custom-4
 CLEAN_SHARDS=$(addprefix clean/,$(SHARD_PROJECT_NAMES))
 clean: $(CLEAN_SHARDS)
-	-docker compose run --no-deps --rm --entrypoint rm host-admin -rf docker-compose.override.yml docker-compose.*_*.yml cypress-reports/ data/
+	-docker compose run --no-deps --rm --entrypoint rm host-admin -rf docker-compose.override.yml docker-compose.*_*.yml reports/ data/
 	-docker compose down --remove-orphans --rmi local --timeout 0 --volumes
 
 $(CLEAN_SHARDS): clean/%:

+ 1 - 1
server-ce/test/cypress/cypress-multi-reporters.cjs

@@ -1,7 +1,7 @@
 module.exports = {
   reporterEnabled: 'spec, mocha-junit-reporter',
   mochaJunitReporterReporterOptions: {
-    mochaFile: `cypress-reports/junit-${process.env.CYPRESS_SHARD}-[suiteFilename].xml`,
+    mochaFile: `reports/junit-${process.env.CYPRESS_SHARD}-[suiteFilename].xml`,
     includePending: true,
     jenkinsMode: true,
     jenkinsClassnamePrefix: 'Server Pro E2E tests',