Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alfa
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
alfa
Commits
d4bda769
Commit
d4bda769
authored
2 years ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
e2e ansible refactoring
parent
74c41bf8
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
Jenkinsfile
+36
-16
36 additions, 16 deletions
Jenkinsfile
with
36 additions
and
16 deletions
Jenkinsfile
+
36
−
16
View file @
d4bda769
...
@@ -343,18 +343,23 @@ Void checkoutProvisioningRepo(String stage) {
...
@@ -343,18 +343,23 @@ Void checkoutProvisioningRepo(String stage) {
dir
(
stage
)
{
dir
(
stage
)
{
sh
'git clone https://${USER}:${TOKEN}@git.ozg-sh.de/mgm/provisioning.git'
sh
'git clone https://${USER}:${TOKEN}@git.ozg-sh.de/mgm/provisioning.git'
// todo remove git checkout
dir
(
'provisioning'
)
{
//dir('provisioning') {
sh
'git checkout feature/refactoring'
// sh 'git checkout ozg-2552-jenkins-e2e'
}
//}
}
}
}
}
}
}
Void
copyTestEnvironmentToDev
(
stage
)
{
Void
copyTestEnvironmentToDev
(
stage
)
{
dir
(
"${stage}/provisioning"
)
{
dir
(
"${stage}/provisioning"
)
{
if
(
env
.
BRANCH_NAME
==
'release'
)
{
def
devEnvFile
=
"playbook/inventory/versions/dev.yml"
def
devEnvFile
=
"playbook/inventory/versions/dev.yml"
def
testEnvFile
=
"playbook/inventory/versions/test.yml"
def
testEnvFile
=
"playbook/inventory/versions/test.yml"
}
else
{
def
devEnvFile
=
"inventory/group_vars/dev/versions"
def
testEnvFile
=
"inventory/group_vars/test/versions"
}
def
devVersions
=
readYaml
file:
devEnvFile
def
devVersions
=
readYaml
file:
devEnvFile
def
testVersions
=
readYaml
file:
testEnvFile
def
testVersions
=
readYaml
file:
testEnvFile
...
@@ -368,7 +373,12 @@ Void copyTestEnvironmentToDev(stage) {
...
@@ -368,7 +373,12 @@ Void copyTestEnvironmentToDev(stage) {
Void
editEnvironemntVersion
(
String
stage
,
String
imageTag
,
Boolean
isEa
)
{
Void
editEnvironemntVersion
(
String
stage
,
String
imageTag
,
Boolean
isEa
)
{
dir
(
"${stage}/provisioning"
)
{
dir
(
"${stage}/provisioning"
)
{
if
(
env
.
BRANCH_NAME
==
'release'
)
{
def
editFile
=
"playbook/inventory/versions/dev.yml"
def
editFile
=
"playbook/inventory/versions/dev.yml"
}
else
{
def
editFile
=
"inventory/group_vars/dev/versions"
}
def
devVersions
=
readYaml
file:
editFile
def
devVersions
=
readYaml
file:
editFile
...
@@ -380,8 +390,6 @@ Void editEnvironemntVersion(String stage, String imageTag, Boolean isEa) {
...
@@ -380,8 +390,6 @@ Void editEnvironemntVersion(String stage, String imageTag, Boolean isEa) {
devVersions
.
versions
.
goofy
.
image
.
tag
=
imageTag
devVersions
.
versions
.
goofy
.
image
.
tag
=
imageTag
writeYaml
file:
editFile
,
data:
devVersions
,
overwrite:
true
writeYaml
file:
editFile
,
data:
devVersions
,
overwrite:
true
sh
"cat ${editFile}"
}
}
}
}
...
@@ -395,7 +403,13 @@ String getSpringProfile(Boolean isEa) {
...
@@ -395,7 +403,13 @@ String getSpringProfile(Boolean isEa) {
Void
setupEaEnvironment
(
String
stage
)
{
Void
setupEaEnvironment
(
String
stage
)
{
dir
(
"${stage}/provisioning"
)
{
dir
(
"${stage}/provisioning"
)
{
if
(
env
.
BRANCH_NAME
==
'release'
)
{
def
editFile
=
"playbook/inventory/group_vars/all.yml"
def
editFile
=
"playbook/inventory/group_vars/all.yml"
}
else
{
def
editFile
=
"inventory/group_vars/all/env"
}
def
groupVars
=
readYaml
file:
editFile
def
groupVars
=
readYaml
file:
editFile
groupVars
.
kop_einheitlicher_ansprechpartner
=
true
groupVars
.
kop_einheitlicher_ansprechpartner
=
true
...
@@ -406,7 +420,13 @@ Void setupEaEnvironment(String stage) {
...
@@ -406,7 +420,13 @@ Void setupEaEnvironment(String stage) {
Void
setPlutoDatabasePassword
(
String
stage
)
{
Void
setPlutoDatabasePassword
(
String
stage
)
{
dir
(
"${stage}/provisioning"
)
{
dir
(
"${stage}/provisioning"
)
{
if
(
env
.
BRANCH_NAME
==
'release'
)
{
def
editFile
=
"playbook/inventory/versions/dev.yml"
def
editFile
=
"playbook/inventory/versions/dev.yml"
}
else
{
def
editFile
=
"inventory/group_vars/dev/versions"
}
def
devVars
=
readYaml
file:
editFile
def
devVars
=
readYaml
file:
editFile
devVars
.
values
.
pluto
.
database
.
password
=
"XnHhfznNWg65NNd"
devVars
.
values
.
pluto
.
database
.
password
=
"XnHhfznNWg65NNd"
...
@@ -427,7 +447,7 @@ Void rolloutKopStack(String bezeichner, String stage) {
...
@@ -427,7 +447,7 @@ Void rolloutKopStack(String bezeichner, String stage) {
"install_fs_adapter":false, \
"install_fs_adapter":false, \
"external_db_enabled":false}"""
"external_db_enabled":false}"""
sh
"ansible-playbook playbook/rollout.yml --extra-vars '${ansibleVars}'"
sh
"ansible-playbook playbook
s
/rollout.yml --extra-vars '${ansibleVars}'"
}
}
}
}
}
}
...
@@ -446,7 +466,7 @@ Void addKeycloakGroups(String bezeichner, String stage) {
...
@@ -446,7 +466,7 @@ Void addKeycloakGroups(String bezeichner, String stage) {
}"""
}"""
dir
(
"${stage}/provisioning"
)
{
dir
(
"${stage}/provisioning"
)
{
sh
"ansible-playbook playbook/add-keycloak-group.yml --extra-vars '${ansibleVars}'"
sh
"ansible-playbook playbook
s
/add-keycloak-group.yml --extra-vars '${ansibleVars}'"
}
}
}
}
}
}
...
@@ -466,7 +486,7 @@ Void addKeycloakUser(String bezeichner, String stage) {
...
@@ -466,7 +486,7 @@ Void addKeycloakUser(String bezeichner, String stage) {
}"""
}"""
dir
(
"${stage}/provisioning"
)
{
dir
(
"${stage}/provisioning"
)
{
sh
"ansible-playbook playbook/add-keycloak-user.yml --extra-vars '${ansibleVars}'"
sh
"ansible-playbook playbook
s
/add-keycloak-user.yml --extra-vars '${ansibleVars}'"
}
}
}
}
}
}
...
@@ -479,7 +499,7 @@ Void deleteKopStack(String bezeichner, String stage) {
...
@@ -479,7 +499,7 @@ Void deleteKopStack(String bezeichner, String stage) {
"kop_env":"dev", \
"kop_env":"dev", \
"kop_bezeichner":${bezeichner}}"""
"kop_bezeichner":${bezeichner}}"""
sh
"ansible-playbook playbook/delete-commune.yml --extra-vars '${ansibleVars}'"
sh
"ansible-playbook playbook
s
/delete-commune.yml --extra-vars '${ansibleVars}'"
}
}
}
}
}
}
...
...
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