diff --git a/server-ce/test/.gitignore b/server-ce/test/.gitignore index 069c5d03f4..56be476514 100644 --- a/server-ce/test/.gitignore +++ b/server-ce/test/.gitignore @@ -1,3 +1,2 @@ -cypress-reports/ data/ docker-mailtrap/ diff --git a/server-ce/test/Jenkinsfile b/server-ce/test/Jenkinsfile index ed19b218fa..2db81c315b 100644 --- a/server-ce/test/Jenkinsfile +++ b/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 { diff --git a/server-ce/test/Makefile b/server-ce/test/Makefile index 272a9eda9e..3fc7d4956a 100644 --- a/server-ce/test/Makefile +++ b/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/%: diff --git a/server-ce/test/cypress/cypress-multi-reporters.cjs b/server-ce/test/cypress/cypress-multi-reporters.cjs index f3c75eace0..869ddd1547 100644 --- a/server-ce/test/cypress/cypress-multi-reporters.cjs +++ b/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',