Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frontend-clients
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
frontend-clients
Commits
b0a1fe48
Commit
b0a1fe48
authored
1 year ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-3934 OZG-4395 adjust JenkinsFile - run Tests parrallel
parent
59e708b3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
goofy-client/apps/goofy-e2e/Jenkinsfile
+82
-87
82 additions, 87 deletions
goofy-client/apps/goofy-e2e/Jenkinsfile
with
82 additions
and
87 deletions
goofy-client/apps/goofy-e2e/Jenkinsfile
+
82
−
87
View file @
b0a1fe48
...
@@ -190,19 +190,14 @@ pipeline {
...
@@ -190,19 +190,14 @@ pipeline {
}
}
}
}
// stage('Pausing to wait for ozg-operator') {
stage
(
'Run E2E-Tests'
)
{
// when {
// expression { !SKIP_RUN }
// }
// steps {
// sleep(time: 3, unit: 'MINUTES')
// }
// }
stage
(
'Run E2E-EA Tests'
)
{
when
{
when
{
expression
{
!
SKIP_RUN
}
expression
{
!
SKIP_RUN
}
}
}
failFast
false
parallel
{
stage
(
'E2E-EA'
)
{
steps
{
steps
{
catchError
(
buildResult:
'FAILURE'
,
stageResult:
'FAILURE'
)
{
catchError
(
buildResult:
'FAILURE'
,
stageResult:
'FAILURE'
)
{
script
{
script
{
...
@@ -229,10 +224,7 @@ pipeline {
...
@@ -229,10 +224,7 @@ pipeline {
}
}
}
}
stage
(
'Run E2E-Main Tests'
)
{
stage
(
'E2E-Main'
)
{
when
{
expression
{
!
SKIP_RUN
}
}
steps
{
steps
{
catchError
(
buildResult:
'FAILURE'
,
stageResult:
'FAILURE'
)
{
catchError
(
buildResult:
'FAILURE'
,
stageResult:
'FAILURE'
)
{
script
{
script
{
...
@@ -258,6 +250,8 @@ pipeline {
...
@@ -258,6 +250,8 @@ pipeline {
}
}
}
}
}
}
}
}
stage
(
'Delete E2E Namespaces'
)
{
stage
(
'Delete E2E Namespaces'
)
{
when
{
when
{
...
@@ -611,18 +605,14 @@ Void publishE2ETestResult(String reportFolder, String reportName) {
...
@@ -611,18 +605,14 @@ Void publishE2ETestResult(String reportFolder, String reportName) {
}
}
String
runTests
(
String
bezeichner
,
String
reportFolder
,
Integer
dbPort
,
String
stageName
)
{
String
runTests
(
String
bezeichner
,
String
reportFolder
,
Integer
dbPort
,
String
stageName
)
{
generateCypressConfig
(
bezeichner
,
reportFolder
,
dbPort
)
def
config
=
generateCypressConfig
(
bezeichner
,
reportFolder
,
dbPort
)
def
specFolder
=
"apps/goofy-e2e/src/e2e/${reportFolder}"
def
specFolder
=
"apps/goofy-e2e/src/e2e/${reportFolder}"
try
{
try
{
dir
(
"goofy-client"
)
{
dir
(
'goofy-client'
){
sh
"npx cypress version"
sh
"npm run cypress:version"
// sh "REPORT_FOLDER=${reportFolder} node apps/goofy-e2e/src/support/delete-old-reports.ts"
sh
"ls -al"
sh
"NO_COLOR=1 npx cypress run --project apps/goofy-e2e --spec ${specFolder}"
sh
"npm run cypress:ci-run --CONFIG_FILE=${configFile} --REPORT_FOLDER=${reportFolder}"
// sh "test=$(echo $?)"
// sh "REPORT_FOLDER=${reportFolder} node apps/goofy-e2e/src/support/pre-merge.ts"
// sh "mochawesome-merge apps/goofy-e2e/reports/${npm_config_report_folder}/mochawesome-report/**/*.json > apps/goofy-e2e/reports/${npm_config_report_folder}/report.json"
// sh "marge apps/goofy-e2e/reports/${npm_config_report_folder}/report.json -f report -o apps/goofy-e2e/reports/${npm_config_report_folder}"
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
printNpmDebugLog
()
printNpmDebugLog
()
...
@@ -661,10 +651,10 @@ String cutBranchNameForKeycloakRealm(String branchName, String stageName) {
...
@@ -661,10 +651,10 @@ String cutBranchNameForKeycloakRealm(String branchName, String stageName) {
String
generateCypressConfig
(
String
bezeichner
,
String
testFolder
,
Integer
dbPort
)
{
String
generateCypressConfig
(
String
bezeichner
,
String
testFolder
,
Integer
dbPort
)
{
def
namespace
=
generateNamespace
(
bezeichner
)
def
namespace
=
generateNamespace
(
bezeichner
)
def
configName
=
"cypress
.config
.json"
def
configName
=
"cypress
-ci-"
+
testFolder
+
"
.json"
dir
(
'goofy-client/apps/goofy-e2e/'
){
dir
(
'goofy-client/apps/goofy-e2e/'
){
def
config
=
readJSON
file:
'cypress
.config
.json'
def
config
=
readJSON
file:
'cypress
-ci
.json'
def
plutoDatabaseSecret
=
getPlutoDatabaseSecret
(
namespace
);
def
plutoDatabaseSecret
=
getPlutoDatabaseSecret
(
namespace
);
def
decodedPassword
=
decodeString
(
plutoDatabaseSecret
.
password
);
def
decodedPassword
=
decodeString
(
plutoDatabaseSecret
.
password
);
...
@@ -677,18 +667,23 @@ String generateCypressConfig(String bezeichner, String testFolder, Integer dbPor
...
@@ -677,18 +667,23 @@ String generateCypressConfig(String bezeichner, String testFolder, Integer dbPor
config
.
env
.
keycloakRealm
=
namespace
as
String
config
.
env
.
keycloakRealm
=
namespace
as
String
config
.
env
.
keycloakClient
=
"alfa"
as
String
config
.
env
.
keycloakClient
=
"alfa"
as
String
config
.
env
.
sabineUuid
=
getKeycloakUuid
(
namespace
,
"sabine"
)
as
String
config
.
env
.
sabineUuid
=
getKeycloakUuid
(
namespace
,
"sabine"
)
as
String
config
.
video
=
tru
e
config
.
video
=
fals
e
config
.
videosFolder
=
"./reports/${testFolder}/videos"
as
String
config
.
videosFolder
=
"./reports/${testFolder}/videos"
as
String
config
.
screenshotsFolder
=
"./reports/${testFolder}/screenshots"
as
String
config
.
screenshotsFolder
=
"./reports/${testFolder}/screenshots"
as
String
config
.
reporterOptions
.
reportDir
=
"./reports/${testFolder}/mochawesome-report"
as
String
config
.
reporterOptions
.
reportDir
=
"./reports/${testFolder}/mochawesome-report"
as
String
config
.
reporterOptions
.
quite
=
true
config
.
reporterOptions
.
quite
=
true
config
.
reporterOptions
.
overwrite
=
false
config
.
reporterOptions
.
overwrite
=
false
config
.
specPattern
=
'src/e2e/**/*.cy.{js,jsx,ts,tsx}'
config
.
env
.
put
(
"search"
,
getElasticsearchEnv
(
namespace
))
config
.
env
.
put
(
"search"
,
getElasticsearchEnv
(
namespace
))
config
.
env
.
put
(
"userManager"
,
getUserManagerEnv
(
namespace
,
dbPort
))
config
.
env
.
put
(
"userManager"
,
getUserManagerEnv
(
namespace
,
dbPort
))
writeJSON
file:
configName
,
json:
config
writeJSON
file:
configName
,
json:
config
sh
"cat ${configName}"
}
}
return
"cypress-ci-"
+
testFolder
+
".config.ts"
}
}
String
makePasswordUrlConform
(
String
password
)
{
String
makePasswordUrlConform
(
String
password
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment