Skip to content
Snippets Groups Projects
Commit c2dbe847 authored by Albert Bruns's avatar Albert Bruns
Browse files

Revert "OZG-3563 run only one test on e2e and not delete namespace"

This reverts commit 97b687d4.
parent 97b687d4
No related branches found
No related tags found
1 merge request!123OZG-7773-Nachrichten-auf-ungelesen-setzen-e2e
...@@ -205,11 +205,20 @@ pipeline { ...@@ -205,11 +205,20 @@ pipeline {
checkoutGitopsE2eBranch() checkoutGitopsE2eBranch()
deleteNamespaces([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER, env.ADMIN_BEZEICHNER])
generateNamespaces() generateNamespaces()
pushGitopsRepo() pushGitopsRepo()
} }
} }
post {
failure {
script {
deleteNamespaces([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER, env.ADMIN_BEZEICHNER])
}
}
}
} }
stage("Install Cypress") { stage("Install Cypress") {
...@@ -239,7 +248,15 @@ pipeline { ...@@ -239,7 +248,15 @@ pipeline {
script { script {
FAILED_STAGE = env.STAGE_NAME FAILED_STAGE = env.STAGE_NAME
waitForAlfaRollout([env.MAIN_BEZEICHNER]) waitForAdminRollout(env.ADMIN_BEZEICHNER)
waitForAlfaRollout([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER])
}
}
post {
failure {
script {
deleteNamespaces([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER, env.ADMIN_BEZEICHNER])
}
} }
} }
} }
...@@ -264,7 +281,36 @@ pipeline { ...@@ -264,7 +281,36 @@ pipeline {
// failFast false // failFast false
// parallel { // parallel {
stage('E2E-Alfa-EA') {
when {
expression { !SKIP_RUN }
}
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
script {
def bezeichner = env.EA_BEZEICHNER
Integer mongoDbPort = forwardMongoDbPort(generateNamespace(bezeichner))
runTests(bezeichner, 'alfa-e2e', 'einheitlicher-ansprechpartner', env.KEYCLOAK_CLIENT_ALFA_APP, mongoDbPort, env.STAGE_NAME)
stopForwardMongoDbPort(generateNamespace(bezeichner))
}
}
}
post {
failure {
script {
FAILED_PARALLEL_STAGE += "${env.STAGE_NAME} "
}
}
always {
script {
publishAlfaE2ETestResult("einheitlicher-ansprechpartner", "Alfa E2E-Tests EA")
}
}
}
}
stage('E2E-Alfa-Main') { stage('E2E-Alfa-Main') {
when { when {
...@@ -296,9 +342,52 @@ pipeline { ...@@ -296,9 +342,52 @@ pipeline {
} }
} }
} }
stage('E2E-Admin-Main') {
when {
expression { !SKIP_RUN }
}
steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
script {
String bezeichner = env.ADMIN_BEZEICHNER
Integer mongoDbPort = forwardMongoDbPort(generateNamespace(bezeichner))
runTests(bezeichner, 'admin-e2e', 'main-tests', env.KEYCLOAK_CLIENT_ADMIN_APP, mongoDbPort, env.STAGE_NAME)
stopForwardMongoDbPort(generateNamespace(bezeichner))
}
}
}
post {
failure {
script {
FAILED_PARALLEL_STAGE += "${env.STAGE_NAME} "
}
}
always {
script {
publishAdminE2ETestResult()
}
}
}
}
// } // }
//} //}
stage('Delete E2E Namespaces') {
when {
expression { !SKIP_RUN }
}
steps {
script {
FAILED_STAGE = env.STAGE_NAME
deleteNamespaces([env.EA_BEZEICHNER, env.MAIN_BEZEICHNER, env.ADMIN_BEZEICHNER])
}
}
}
} }
post { post {
failure { failure {
...@@ -454,10 +543,12 @@ Void checkoutGitopsE2eBranch() { ...@@ -454,10 +543,12 @@ Void checkoutGitopsE2eBranch() {
} }
Void generateNamespaces() { Void generateNamespaces() {
def y1 = generateAdminNamespaceYaml()
def y2 = generateEaNamespaceYaml()
def y3 = generateMainNamespaceYaml() def y3 = generateMainNamespaceYaml()
dir("gitops") { dir("gitops") {
sh "git add ${y3}" sh "git add ${y1} ${y2} ${y3}"
sh "git commit -m 'add e2e namespaces for testrun'" sh "git commit -m 'add e2e namespaces for testrun'"
} }
......
...@@ -40,7 +40,7 @@ if [ -z $CONFIG_FILE ]; then echo "Config File not set" && exit 1; fi ...@@ -40,7 +40,7 @@ if [ -z $CONFIG_FILE ]; then echo "Config File not set" && exit 1; fi
SCRIPT_DIR="$(dirname "$0")" SCRIPT_DIR="$(dirname "$0")"
BASE_PATH=${SCRIPT_DIR}/${APP_NAME} BASE_PATH=${SCRIPT_DIR}/${APP_NAME}
SPEC_GROUP=${BASE_PATH}/src/e2e/main-tests/vorgang-bescheid/vorgang-bescheid-dokumente-hochladen.cy.ts SPEC_GROUP=${BASE_PATH}/src/e2e/${APP_VARIATION}
COMMAND="pnpm exec cypress run --project ${BASE_PATH} --spec ${SPEC_GROUP} --config-file ${CONFIG_FILE}" COMMAND="pnpm exec cypress run --project ${BASE_PATH} --spec ${SPEC_GROUP} --config-file ${CONFIG_FILE}"
REPORT_PATH=${BASE_PATH}/reports/${APP_VARIATION} REPORT_PATH=${BASE_PATH}/reports/${APP_VARIATION}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment