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
04d3e486
Commit
04d3e486
authored
1 year ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-4561 OZG-4602 adjust E2E Jenkinsfile
parent
5d6e65dc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
alfa-client/apps/alfa-e2e/Jenkinsfile
+68
-68
68 additions, 68 deletions
alfa-client/apps/alfa-e2e/Jenkinsfile
with
68 additions
and
68 deletions
alfa-client/apps/alfa-e2e/Jenkinsfile
+
68
−
68
View file @
04d3e486
...
@@ -83,8 +83,8 @@ pipeline {
...
@@ -83,8 +83,8 @@ pipeline {
script
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
initEnv
Goofy
DefaultVersions
()
initEnv
Alfa
DefaultVersions
()
initEnv
Pluto
DefaultVersions
()
initEnv
VorgangManager
DefaultVersions
()
initEnvUserManagerDefaultVersions
()
initEnvUserManagerDefaultVersions
()
}
}
}
}
...
@@ -104,12 +104,12 @@ pipeline {
...
@@ -104,12 +104,12 @@ pipeline {
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
timeout
(
time:
5
,
unit:
'MINUTES'
)
{
userVersions
=
input
message:
"Edit Default Values"
,
userVersions
=
input
message:
"Edit Default Values"
,
parameters:
[
parameters:
[
string
(
name:
"
Goofy
ImageTag"
,
defaultValue:
env
.
GOOFY
_IMAGE_TAG
,
trim:
true
),
string
(
name:
"
Alfa
ImageTag"
,
defaultValue:
env
.
ALFA
_IMAGE_TAG
,
trim:
true
),
string
(
name:
"
Goofy
HelmChartVersion"
,
defaultValue:
env
.
GOOFY
_HELM_CHART_VERSION
,
trim:
true
),
string
(
name:
"
Alfa
HelmChartVersion"
,
defaultValue:
env
.
ALFA
_HELM_CHART_VERSION
,
trim:
true
),
string
(
name:
"
Goofy
HelmRepoUrl"
,
defaultValue:
env
.
GOOFY
_HELM_REPO_URL
,
trim:
true
),
string
(
name:
"
Alfa
HelmRepoUrl"
,
defaultValue:
env
.
ALFA
_HELM_REPO_URL
,
trim:
true
),
string
(
name:
"
Pluto
ImageTag"
,
defaultValue:
env
.
PLUTO
_IMAGE_TAG
,
trim:
true
),
string
(
name:
"
VorgangManager
ImageTag"
,
defaultValue:
env
.
VORGANG_MANAGER
_IMAGE_TAG
,
trim:
true
),
string
(
name:
"
Pluto
HelmChartVersion"
,
defaultValue:
env
.
PLUTO
_HELM_CHART_VERSION
,
trim:
true
),
string
(
name:
"
VorgangManager
HelmChartVersion"
,
defaultValue:
env
.
VORGANG_MANAGER
_HELM_CHART_VERSION
,
trim:
true
),
string
(
name:
"
Pluto
HelmRepoUrl"
,
defaultValue:
env
.
PLUTO
_HELM_REPO_URL
,
trim:
true
),
string
(
name:
"
VorgangManager
HelmRepoUrl"
,
defaultValue:
env
.
VORGANG_MANAGER
_HELM_REPO_URL
,
trim:
true
),
string
(
name:
"UserManagerImageTag"
,
defaultValue:
env
.
USER_MANAGER_IMAGE_TAG
,
trim:
true
),
string
(
name:
"UserManagerImageTag"
,
defaultValue:
env
.
USER_MANAGER_IMAGE_TAG
,
trim:
true
),
string
(
name:
"UserManagerHelmChartVersion"
,
defaultValue:
env
.
USER_MANAGER_HELM_CHART_VERSION
,
trim:
true
),
string
(
name:
"UserManagerHelmChartVersion"
,
defaultValue:
env
.
USER_MANAGER_HELM_CHART_VERSION
,
trim:
true
),
string
(
name:
"UserManagerHelmRepoUrl"
,
defaultValue:
env
.
USER_MANAGER_HELM_REPO_URL
,
trim:
true
)
string
(
name:
"UserManagerHelmRepoUrl"
,
defaultValue:
env
.
USER_MANAGER_HELM_REPO_URL
,
trim:
true
)
...
@@ -131,7 +131,7 @@ pipeline {
...
@@ -131,7 +131,7 @@ pipeline {
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
sh
'npm --version'
sh
'npm --version'
dir
(
'
goofy
-client'
)
{
dir
(
'
alfa
-client'
)
{
sh
'echo "registry=https://nexus.ozg-sh.de/repository/npm-proxy" >> ~/.npmrc'
sh
'echo "registry=https://nexus.ozg-sh.de/repository/npm-proxy" >> ~/.npmrc'
sh
'echo "//nexus.ozg-sh.de/:_auth=amVua2luczprTSFnNVUhMVQzNDZxWQ==" >> ~/.npmrc'
sh
'echo "//nexus.ozg-sh.de/:_auth=amVua2luczprTSFnNVUhMVQzNDZxWQ==" >> ~/.npmrc'
...
@@ -171,20 +171,20 @@ pipeline {
...
@@ -171,20 +171,20 @@ pipeline {
checkoutGitopsE2eBranch
()
checkoutGitopsE2eBranch
()
delete
Kop
Stack
([
env
.
EA_BEZEICHNER
,
env
.
MAIN_BEZEICHNER
])
delete
OzgCloud
Stack
([
env
.
EA_BEZEICHNER
,
env
.
MAIN_BEZEICHNER
])
generateEaNamespaceYaml
()
generateEaNamespaceYaml
()
generateMainNamespaceYaml
()
generateMainNamespaceYaml
()
pushGitopsRepo
()
pushGitopsRepo
()
waitFor
Kop
StackRollout
([
env
.
EA_BEZEICHNER
,
env
.
MAIN_BEZEICHNER
])
waitFor
OzgCloud
StackRollout
([
env
.
EA_BEZEICHNER
,
env
.
MAIN_BEZEICHNER
])
}
}
}
}
post
{
post
{
failure
{
failure
{
script
{
script
{
delete
Kop
Stack
([
env
.
EA_BEZEICHNER
,
env
.
MAIN_BEZEICHNER
])
delete
OzgCloud
Stack
([
env
.
EA_BEZEICHNER
,
env
.
MAIN_BEZEICHNER
])
}
}
}
}
}
}
...
@@ -218,7 +218,7 @@ pipeline {
...
@@ -218,7 +218,7 @@ pipeline {
}
}
always
{
always
{
script
{
script
{
publishE2ETestResult
(
"einheitlicher-ansprechpartner"
,
"
Goofy
E2E-Tests EA"
)
publishE2ETestResult
(
"einheitlicher-ansprechpartner"
,
"
Alfa
E2E-Tests EA"
)
}
}
}
}
}
}
...
@@ -245,7 +245,7 @@ pipeline {
...
@@ -245,7 +245,7 @@ pipeline {
}
}
always
{
always
{
script
{
script
{
publishE2ETestResult
(
"main-tests"
,
"
Goofy
E2E-Tests main"
)
publishE2ETestResult
(
"main-tests"
,
"
Alfa
E2E-Tests main"
)
}
}
}
}
}
}
...
@@ -261,7 +261,7 @@ pipeline {
...
@@ -261,7 +261,7 @@ pipeline {
script
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
delete
Kop
Stack
([
env
.
EA_BEZEICHNER
,
env
.
MAIN_BEZEICHNER
])
delete
OzgCloud
Stack
([
env
.
EA_BEZEICHNER
,
env
.
MAIN_BEZEICHNER
])
}
}
}
}
}
}
...
@@ -279,7 +279,7 @@ pipeline {
...
@@ -279,7 +279,7 @@ pipeline {
String
getUpstreamProjects
()
{
String
getUpstreamProjects
()
{
if
(
isMasterBranch
()
||
isReleaseBranch
()){
if
(
isMasterBranch
()
||
isReleaseBranch
()){
return
"
goofy
/${env.BRANCH_NAME},
pluto
/${env.BRANCH_NAME},user-manager/${env.BRANCH_NAME}"
return
"
alfa
/${env.BRANCH_NAME},
vorgang-manager
/${env.BRANCH_NAME},user-manager/${env.BRANCH_NAME}"
}
}
return
""
return
""
...
@@ -329,19 +329,19 @@ String getHelmChartVersion(Map applicationValues) {
...
@@ -329,19 +329,19 @@ String getHelmChartVersion(Map applicationValues) {
return
applicationValues
.
helm
.
version
return
applicationValues
.
helm
.
version
}
}
Void
initEnv
Goofy
DefaultVersions
()
{
Void
initEnv
Alfa
DefaultVersions
()
{
if
(
isMasterBranch
()
||
isReleaseBranch
())
{
if
(
isMasterBranch
()
||
isReleaseBranch
())
{
goofyV
alues
=
getApplicationValues
(
"goofy"
)
v
alues
=
getApplicationValues
(
'alfa'
)
env
.
GOOFY
_IMAGE_TAG
=
getImageTag
(
goofyV
alues
)
env
.
ALFA
_IMAGE_TAG
=
getImageTag
(
v
alues
)
env
.
GOOFY
_HELM_CHART_VERSION
=
getHelmChartVersion
(
goofyV
alues
)
env
.
ALFA
_HELM_CHART_VERSION
=
getHelmChartVersion
(
v
alues
)
}
}
else
{
else
{
env
.
GOOFY
_IMAGE_TAG
=
getFeatureBranchImageTag
()
env
.
ALFA
_IMAGE_TAG
=
getFeatureBranchImageTag
()
env
.
GOOFY
_HELM_CHART_VERSION
=
getFeatureBranchHelmChartVersion
()
env
.
ALFA
_HELM_CHART_VERSION
=
getFeatureBranchHelmChartVersion
()
}
}
env
.
GOOFY
_HELM_REPO_URL
=
getHelmRepoUrl
()
env
.
ALFA
_HELM_REPO_URL
=
getHelmRepoUrl
()
}
}
String
getHelmRepoUrl
()
{
String
getHelmRepoUrl
()
{
...
@@ -366,29 +366,29 @@ String getRootPomVersion() {
...
@@ -366,29 +366,29 @@ String getRootPomVersion() {
return
rootPom
.
version
return
rootPom
.
version
}
}
Void
initEnv
Pluto
DefaultVersions
()
{
Void
initEnv
VorgangManager
DefaultVersions
()
{
plutoV
alues
=
getApplicationValues
(
"pluto"
)
v
alues
=
getApplicationValues
(
'vorgang-manager'
)
env
.
PLUTO
_IMAGE_TAG
=
getImageTag
(
plutoV
alues
)
env
.
VORGANG_MANAGER
_IMAGE_TAG
=
getImageTag
(
v
alues
)
env
.
PLUTO
_HELM_CHART_VERSION
=
getHelmChartVersion
(
plutoV
alues
)
env
.
VORGANG_MANAGER
_HELM_CHART_VERSION
=
getHelmChartVersion
(
v
alues
)
env
.
PLUTO
_HELM_REPO_URL
=
getHelmRepoUrl
()
env
.
VORGANG_MANAGER
_HELM_REPO_URL
=
getHelmRepoUrl
()
}
}
Void
initEnvUserManagerDefaultVersions
()
{
Void
initEnvUserManagerDefaultVersions
()
{
userManagerV
alues
=
getApplicationValues
(
"
user-manager
"
)
v
alues
=
getApplicationValues
(
'
user-manager
'
)
env
.
USER_MANAGER_IMAGE_TAG
=
getImageTag
(
userManagerValues
)
env
.
USER_MANAGER_IMAGE_TAG
=
getImageTag
(
userManag
values
erValues
)
env
.
USER_MANAGER_HELM_CHART_VERSION
=
getHelmChartVersion
(
userManagerV
alues
)
env
.
USER_MANAGER_HELM_CHART_VERSION
=
getHelmChartVersion
(
v
alues
)
env
.
USER_MANAGER_HELM_REPO_URL
=
getHelmRepoUrl
()
env
.
USER_MANAGER_HELM_REPO_URL
=
getHelmRepoUrl
()
}
}
Void
initEnvUserVersions
(
userVersions
)
{
Void
initEnvUserVersions
(
userVersions
)
{
env
.
GOOFY
_IMAGE_TAG
=
userVersions
.
Goofy
ImageTag
env
.
ALFA
_IMAGE_TAG
=
userVersions
.
Alfa
ImageTag
env
.
GOOFY
_HELM_CHART_VERSION
=
userVersions
.
Goofy
HelmChartVersion
env
.
ALFA
_HELM_CHART_VERSION
=
userVersions
.
Alfa
HelmChartVersion
env
.
GOOFY
_HELM_REPO_URL
=
userVersions
.
Goofy
HelmRepoUrl
env
.
ALFA
_HELM_REPO_URL
=
userVersions
.
Alfa
HelmRepoUrl
env
.
PLUTO
_IMAGE_TAG
=
userVersions
.
Pluto
ImageTag
env
.
VORGANG_MANAGER
_IMAGE_TAG
=
userVersions
.
VorgangManagr
ImageTag
env
.
PLUTO
_HELM_CHART_VERSION
=
userVersions
.
Pluto
HelmChartVersion
env
.
VORGANG_MANAGER
_HELM_CHART_VERSION
=
userVersions
.
VorgangManagr
HelmChartVersion
env
.
PLUTO
_HELM_REPO_URL
=
userVersions
.
Pluto
HelmRepoUrl
env
.
VORGANG_MANAGER
_HELM_REPO_URL
=
userVersions
.
VorgangManagr
HelmRepoUrl
env
.
USER_MANAGER_IMAGE_TAG
=
userVersions
.
UserManagerImageTag
env
.
USER_MANAGER_IMAGE_TAG
=
userVersions
.
UserManagerImageTag
env
.
USER_MANAGER_HELM_CHART_VERSION
=
userVersions
.
UserManagerHelmChartVersion
env
.
USER_MANAGER_HELM_CHART_VERSION
=
userVersions
.
UserManagerHelmChartVersion
env
.
USER_MANAGER_HELM_REPO_URL
=
userVersions
.
UserManagerHelmRepoUrl
env
.
USER_MANAGER_HELM_REPO_URL
=
userVersions
.
UserManagerHelmRepoUrl
...
@@ -397,7 +397,7 @@ Void initEnvUserVersions(userVersions) {
...
@@ -397,7 +397,7 @@ Void initEnvUserVersions(userVersions) {
Void
pushGitopsRepo
()
{
Void
pushGitopsRepo
()
{
withCredentials
([
usernamePassword
(
credentialsId:
'jenkins-gitea-access-token'
,
passwordVariable:
'TOKEN'
,
usernameVariable:
'USER'
)])
{
withCredentials
([
usernamePassword
(
credentialsId:
'jenkins-gitea-access-token'
,
passwordVariable:
'TOKEN'
,
usernameVariable:
'USER'
)])
{
dir
(
"
gitops
"
)
{
dir
(
'
gitops
'
)
{
if
(
hasUnpushedCommits
())
{
if
(
hasUnpushedCommits
())
{
sh
'git pull'
sh
'git pull'
sh
'git push https://${USER}:${TOKEN}@git.ozg-sh.de/mgm/gitops.git'
sh
'git push https://${USER}:${TOKEN}@git.ozg-sh.de/mgm/gitops.git'
...
@@ -411,7 +411,7 @@ Boolean hasUnpushedCommits() {
...
@@ -411,7 +411,7 @@ Boolean hasUnpushedCommits() {
}
}
Void
checkoutGitopsE2eBranch
()
{
Void
checkoutGitopsE2eBranch
()
{
dir
(
"
gitops
"
)
{
dir
(
'
gitops
'
)
{
sh
'git checkout e2e'
sh
'git checkout e2e'
}
}
}
}
...
@@ -425,20 +425,20 @@ Void generateMainNamespaceYaml() {
...
@@ -425,20 +425,20 @@ Void generateMainNamespaceYaml() {
}
}
Void
generateNamespaceYaml
(
String
bezeichner
,
String
valuesPathSuffix
,
String
userFolder
)
{
Void
generateNamespaceYaml
(
String
bezeichner
,
String
valuesPathSuffix
,
String
userFolder
)
{
def
envValues
=
readYaml
file:
"
goofy
-client/apps/
goofy
-e2e/src/fixtures/argocd/"
+
valuesPathSuffix
;
def
envValues
=
readYaml
file:
"
alfa
-client/apps/
alfa
-e2e/src/fixtures/argocd/"
+
valuesPathSuffix
;
envValues
.
kop
.
bezeichner
=
bezeichner
envValues
.
ozgcloud
.
bezeichner
=
bezeichner
envValues
.
goofy
.
put
(
"image"
,
[
'tag'
:
env
.
GOOFY
_IMAGE_TAG
])
envValues
.
alfa
.
put
(
"image"
,
[
'tag'
:
env
.
ALFA
_IMAGE_TAG
])
envValues
.
goofy
.
put
(
"helm"
,
[
'version'
:
env
.
GOOFY
_HELM_CHART_VERSION
,
'repoUrl'
:
env
.
GOOFY
_HELM_REPO_URL
])
envValues
.
alfa
.
put
(
"helm"
,
[
'version'
:
env
.
ALFA
_HELM_CHART_VERSION
,
'repoUrl'
:
env
.
ALFA
_HELM_REPO_URL
])
envValues
.
pluto
.
put
(
"image"
,
[
'tag'
:
env
.
PLUTO
_IMAGE_TAG
])
envValues
.
vorgang_manager
.
put
(
"image"
,
[
'tag'
:
env
.
VORGANG_MANAGER
_IMAGE_TAG
])
envValues
.
pluto
.
put
(
"helm"
,
[
'version'
:
env
.
PLUTO
_HELM_CHART_VERSION
,
'repoUrl'
:
env
.
PLUTO
_HELM_REPO_URL
])
envValues
.
vorgang_manager
.
put
(
"helm"
,
[
'version'
:
env
.
VORGANG_MANAGER
_HELM_CHART_VERSION
,
'repoUrl'
:
env
.
VORGANG_MANAGER
_HELM_REPO_URL
])
envValues
.
user_manager
.
put
(
"image"
,
[
'tag'
:
env
.
USER_MANAGER_IMAGE_TAG
])
envValues
.
user_manager
.
put
(
"image"
,
[
'tag'
:
env
.
USER_MANAGER_IMAGE_TAG
])
envValues
.
user_manager
.
put
(
"helm"
,
[
'version'
:
env
.
USER_MANAGER_HELM_CHART_VERSION
,
'repoUrl'
:
env
.
USER_MANAGER_HELM_REPO_URL
])
envValues
.
user_manager
.
put
(
"helm"
,
[
'version'
:
env
.
USER_MANAGER_HELM_CHART_VERSION
,
'repoUrl'
:
env
.
USER_MANAGER_HELM_REPO_URL
])
envValues
.
goofy
.
sso
.
put
(
"keycloak_groups"
,
generateKeycloakGroupsForHelmChart
())
envValues
.
alfa
.
sso
.
put
(
"keycloak_groups"
,
generateKeycloakGroupsForHelmChart
())
envValues
.
goofy
.
sso
.
put
(
"keycloak_users"
,
generateKeycloakUserForHelmChart
(
userFolder
))
envValues
.
alfa
.
sso
.
put
(
"keycloak_users"
,
generateKeycloakUserForHelmChart
(
userFolder
))
writeYaml
file:
"gitops/dev/namespace/namespaces/by-${bezeichner}-dev.yaml"
,
data:
envValues
,
overwrite:
true
writeYaml
file:
"gitops/dev/namespace/namespaces/by-${bezeichner}-dev.yaml"
,
data:
envValues
,
overwrite:
true
...
@@ -451,12 +451,12 @@ Void generateNamespaceYaml(String bezeichner, String valuesPathSuffix, String us
...
@@ -451,12 +451,12 @@ Void generateNamespaceYaml(String bezeichner, String valuesPathSuffix, String us
}
}
List
generateKeycloakUserForHelmChart
(
String
userFolder
)
{
List
generateKeycloakUserForHelmChart
(
String
userFolder
)
{
def
userFiles
=
sh
(
script:
'ls
goofy
-client/apps/
goofy
-e2e/src/fixtures/'
+
userFolder
,
returnStdout:
true
);
def
userFiles
=
sh
(
script:
'ls
alfa
-client/apps/
alfa
-e2e/src/fixtures/'
+
userFolder
,
returnStdout:
true
);
def
helmUsers
=
[]
def
helmUsers
=
[]
userFiles
.
split
(
"\\n"
).
each
{
userFile
->
userFiles
.
split
(
"\\n"
).
each
{
userFile
->
def
userJson
=
readJSON
file:
"
goofy
-client/apps/
goofy
-e2e/src/fixtures/${userFolder}/${userFile}"
def
userJson
=
readJSON
file:
"
alfa
-client/apps/
alfa
-e2e/src/fixtures/${userFolder}/${userFile}"
def
user
=
[
def
user
=
[
"name"
:
userJson
.
name
,
"name"
:
userJson
.
name
,
"password"
:
userJson
.
password
,
"password"
:
userJson
.
password
,
...
@@ -483,19 +483,19 @@ List mapUserClientRoles(userClientRoles) {
...
@@ -483,19 +483,19 @@ List mapUserClientRoles(userClientRoles) {
def
clientRoles
=
[]
def
clientRoles
=
[]
for
(
clientRole
in
userClientRoles
)
{
for
(
clientRole
in
userClientRoles
)
{
clientRoles
.
add
([
'name'
:
"
alfa
"
,
'role'
:
clientRole
])
clientRoles
.
add
([
'name'
:
'
alfa
'
,
'role'
:
clientRole
])
}
}
return
clientRoles
return
clientRoles
}
}
List
generateKeycloakGroupsForHelmChart
()
{
List
generateKeycloakGroupsForHelmChart
()
{
def
groupFiles
=
sh
(
script:
'ls
goofy
-client/apps/
goofy
-e2e/src/fixtures/group'
,
returnStdout:
true
)
def
groupFiles
=
sh
(
script:
'ls
alfa
-client/apps/
alfa
-e2e/src/fixtures/group'
,
returnStdout:
true
)
def
helmGroups
=
[]
def
helmGroups
=
[]
groupFiles
.
split
(
"\\n"
).
each
{
groupFile
->
groupFiles
.
split
(
"\\n"
).
each
{
groupFile
->
def
groupJson
=
readJSON
file:
"
goofy
-client/apps/
goofy
-e2e/src/fixtures/group/${groupFile}"
def
groupJson
=
readJSON
file:
"
alfa
-client/apps/
alfa
-e2e/src/fixtures/group/${groupFile}"
def
group
=
[
"name"
:
groupJson
.
name
]
def
group
=
[
"name"
:
groupJson
.
name
]
groupJson
.
attributes
.
each
{
key
,
values
->
groupJson
.
attributes
.
each
{
key
,
values
->
...
@@ -513,8 +513,8 @@ List generateKeycloakGroupsForHelmChart() {
...
@@ -513,8 +513,8 @@ List generateKeycloakGroupsForHelmChart() {
return
helmGroups
return
helmGroups
}
}
Void
delete
KopStack
(
kop
Bezeichner
)
{
Void
delete
OzgCloudStack
(
ozgCloud
Bezeichner
)
{
for
(
bezeichner
in
kop
Bezeichner
)
{
for
(
bezeichner
in
ozgCloud
Bezeichner
)
{
if
(
hasNamespaceFile
(
bezeichner
))
{
if
(
hasNamespaceFile
(
bezeichner
))
{
removeNamespaceFile
(
bezeichner
)
removeNamespaceFile
(
bezeichner
)
}
}
...
@@ -522,7 +522,7 @@ Void deleteKopStack(kopBezeichner) {
...
@@ -522,7 +522,7 @@ Void deleteKopStack(kopBezeichner) {
pushGitopsRepo
()
pushGitopsRepo
()
for
(
bezeichner
in
kop
Bezeichner
)
{
for
(
bezeichner
in
ozgCloud
Bezeichner
)
{
waitForDeletion
(
bezeichner
)
waitForDeletion
(
bezeichner
)
}
}
}
}
...
@@ -547,17 +547,17 @@ Void waitForDeletion(String bezeichner) {
...
@@ -547,17 +547,17 @@ Void waitForDeletion(String bezeichner) {
}
}
}
}
Void
waitFor
Kop
StackRollout
(
kop
Bezeichner
)
{
Void
waitFor
OzgCloud
StackRollout
(
ozgCloud
Bezeichner
)
{
for
(
bezeichner
in
kop
Bezeichner
)
{
for
(
bezeichner
in
ozgCloud
Bezeichner
)
{
waitForRollout
(
bezeichner
)
waitForRollout
(
bezeichner
)
}
}
}
}
Void
waitForRollout
(
String
bezeichner
)
{
Void
waitForRollout
(
String
bezeichner
)
{
waitForHealthyApplication
(
bezeichner
,
'application'
)
waitForHealthyApplication
(
bezeichner
,
'application'
)
waitForHealthyApplication
(
bezeichner
,
'
pluto
'
)
waitForHealthyApplication
(
bezeichner
,
'
vorgang-manager
'
)
waitForHealthyApplication
(
bezeichner
,
'user-manager'
)
waitForHealthyApplication
(
bezeichner
,
'user-manager'
)
waitForHealthyApplication
(
bezeichner
,
'
goofy
'
)
waitForHealthyApplication
(
bezeichner
,
'
alfa
'
)
}
}
Void
waitForHealthyApplication
(
String
bezeichner
,
String
application
)
{
Void
waitForHealthyApplication
(
String
bezeichner
,
String
application
)
{
...
@@ -597,7 +597,7 @@ Void publishE2ETestResult(String reportFolder, String reportName) {
...
@@ -597,7 +597,7 @@ Void publishE2ETestResult(String reportFolder, String reportName) {
allowMissing:
false
,
allowMissing:
false
,
alwaysLinkToLastBuild:
false
,
alwaysLinkToLastBuild:
false
,
keepAll:
true
,
keepAll:
true
,
reportDir:
"
goofy
-client/apps/
goofy
-e2e/reports/${reportFolder}"
,
reportDir:
"
alfa
-client/apps/
alfa
-e2e/reports/${reportFolder}"
,
reportFiles:
'report.html'
,
reportFiles:
'report.html'
,
reportName:
reportName
reportName:
reportName
]
]
...
@@ -608,9 +608,9 @@ String runTests(String bezeichner, String reportFolder, Integer dbPort, String s
...
@@ -608,9 +608,9 @@ String runTests(String bezeichner, String reportFolder, Integer dbPort, String s
def
config
=
generateCypressConfig
(
bezeichner
,
reportFolder
,
dbPort
)
def
config
=
generateCypressConfig
(
bezeichner
,
reportFolder
,
dbPort
)
try
{
try
{
dir
(
'
goofy
-client'
){
dir
(
'
alfa
-client'
){
sh
"npm run cypress:version"
sh
"npm run cypress:version"
sh
"apps/
goofy
-e2e/run-tests.sh ${reportFolder} ${config}"
sh
"apps/
alfa
-e2e/run-tests.sh ${reportFolder} ${config}"
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
printNpmDebugLog
()
printNpmDebugLog
()
...
@@ -651,15 +651,15 @@ String generateCypressConfig(String bezeichner, String testFolder, Integer dbPor
...
@@ -651,15 +651,15 @@ String generateCypressConfig(String bezeichner, String testFolder, Integer dbPor
def
namespace
=
generateNamespace
(
bezeichner
)
def
namespace
=
generateNamespace
(
bezeichner
)
def
configName
=
"cypress-ci-"
+
testFolder
+
".json"
def
configName
=
"cypress-ci-"
+
testFolder
+
".json"
dir
(
'
goofy
-client/apps/
goofy
-e2e/'
){
dir
(
'
alfa
-client/apps/
alfa
-e2e/'
){
def
config
=
readJSON
file:
'cypress-ci.json'
def
config
=
readJSON
file:
'cypress-ci.json'
def
pluto
DatabaseSecret
=
get
Pluto
DatabaseSecret
(
namespace
);
def
vorgangManager
DatabaseSecret
=
get
VorgangManager
DatabaseSecret
(
namespace
);
def
decodedPassword
=
decodeString
(
pluto
DatabaseSecret
.
password
);
def
decodedPassword
=
decodeString
(
vorgangManager
DatabaseSecret
.
password
);
def
parsablePassword
=
makePasswordUrlConform
(
decodedPassword
);
def
parsablePassword
=
makePasswordUrlConform
(
decodedPassword
);
config
.
baseUrl
=
"https://${bezeichner}.${env.CLUSTER_BASE_URL}"
as
String
config
.
baseUrl
=
"https://${bezeichner}.${env.CLUSTER_BASE_URL}"
as
String
config
.
env
.
dbUrl
=
"mongodb://${decodeString(
pluto
DatabaseSecret.username)}:${parsablePassword}@localhost:${dbPort}/admin?ssl=false&directConnection=true"
as
String
config
.
env
.
dbUrl
=
"mongodb://${decodeString(
vorgangManager
DatabaseSecret.username)}:${parsablePassword}@localhost:${dbPort}/admin?ssl=false&directConnection=true"
as
String
config
.
env
.
keycloakUrl
=
"https://${env.SSO_URL}/"
as
String
config
.
env
.
keycloakUrl
=
"https://${env.SSO_URL}/"
as
String
config
.
env
.
keycloakRealm
=
namespace
as
String
config
.
env
.
keycloakRealm
=
namespace
as
String
config
.
env
.
sabineUuid
=
getKeycloakUuid
(
namespace
,
"sabine"
)
as
String
config
.
env
.
sabineUuid
=
getKeycloakUuid
(
namespace
,
"sabine"
)
as
String
...
@@ -684,8 +684,8 @@ String makePasswordUrlConform(String password) {
...
@@ -684,8 +684,8 @@ String makePasswordUrlConform(String password) {
return
sh
(
script:
"printf %s ${password} | jq -sRr @uri"
,
returnStdout:
true
);
return
sh
(
script:
"printf %s ${password} | jq -sRr @uri"
,
returnStdout:
true
);
}
}
Map
get
Pluto
DatabaseSecret
(
String
namespace
)
{
Map
get
VorgangManager
DatabaseSecret
(
String
namespace
)
{
return
readJSON
(
text:
sh
(
script:
"kubectl get secret ozg-mongodb-admin-
pluto
-user -n ${namespace} -o jsonpath={.data}"
,
returnStdout:
true
))
return
readJSON
(
text:
sh
(
script:
"kubectl get secret ozg-mongodb-admin-
vorgang-manager
-user -n ${namespace} -o jsonpath={.data}"
,
returnStdout:
true
))
}
}
Map
getUserManagerEnv
(
String
namespace
,
dbPort
){
Map
getUserManagerEnv
(
String
namespace
,
dbPort
){
...
...
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