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
5505e29e
Commit
5505e29e
authored
2 years ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-3140 check before git commit
parent
3998b852
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Jenkinsfile
+8
-28
8 additions, 28 deletions
Jenkinsfile
with
8 additions
and
28 deletions
Jenkinsfile
+
8
−
28
View file @
5505e29e
...
...
@@ -442,11 +442,6 @@ Void copyTestEnvironmentToDev(stage) {
def
devEnvFile
=
"inventories/group_vars/dev/versions"
def
testEnvFile
=
"inventories/group_vars/test/versions"
if
(
env
.
BRANCH_NAME
==
'release'
)
{
devEnvFile
=
"playbook/inventory/versions/dev.yml"
testEnvFile
=
"playbook/inventory/versions/test.yml"
}
def
devVersions
=
readYaml
file:
devEnvFile
def
testVersions
=
readYaml
file:
testEnvFile
...
...
@@ -461,10 +456,6 @@ Void editEnvironemntVersion(String stage, String imageTag, Boolean isEa, String
dir
(
"${stage}/provisioning"
)
{
def
editFile
=
"inventories/group_vars/dev/versions"
if
(
env
.
BRANCH_NAME
==
'release'
)
{
editFile
=
"playbook/inventory/versions/dev.yml"
}
def
devVersions
=
readYaml
file:
editFile
overrideSpringProfiles
=
getSpringProfile
(
isEa
)
...
...
@@ -491,10 +482,6 @@ Void setupEaEnvironment(String stage) {
dir
(
"${stage}/provisioning"
)
{
def
editFile
=
"inventories/group_vars/all/env"
if
(
env
.
BRANCH_NAME
==
'release'
)
{
editFile
=
"playbook/inventory/group_vars/all.yml"
}
def
groupVars
=
readYaml
file:
editFile
groupVars
.
kop_einheitlicher_ansprechpartner
=
true
...
...
@@ -507,10 +494,6 @@ Void setPlutoDatabasePassword(String stage) {
dir
(
"${stage}/provisioning"
)
{
def
editFile
=
"inventories/group_vars/dev/versions"
if
(
env
.
BRANCH_NAME
==
'release'
)
{
editFile
=
"playbook/inventory/versions/dev.yml"
}
def
devVars
=
readYaml
file:
editFile
devVars
.
values
.
pluto
.
database
.
password
=
"XnHhfznNWg65NNd"
...
...
@@ -783,9 +766,6 @@ Void setNewGoofyProvisioningVersion(String environment) {
dir
(
"provisioning"
)
{
def
envFile
=
"inventories/group_vars/${environment}/versions"
if
(
env
.
BRANCH_NAME
==
'release'
)
{
envFile
=
"playbook/inventory/versions/${environment}.yml"
}
def
envVersions
=
readYaml
file:
envFile
envVersions
.
versions
.
goofy
.
image
.
tag
=
IMAGE_TAG
...
...
@@ -796,14 +776,14 @@ Void setNewGoofyProvisioningVersion(String environment) {
}
Void
pushNewProvisioningVersion
(
String
environment
)
{
withCredentials
([
usernamePassword
(
credentialsId:
'jenkins-gitea-access-token'
,
passwordVariable:
'TOKEN'
,
usernameVariable:
'USER'
)]
)
{
dir
(
'provisioning'
)
{
if
(
env
.
BRANCH_NAME
==
'release'
)
{
sh
'git add playbook/inventory/versions/.'
}
else
{
sh
'git add inventories/group_vars/*/versions'
}
dir
(
'provisioning'
)
{
if
(
sh
(
script:
"git status | grep 'inventories/group_vars/.*/versions'"
,
returnStatus:
true
)
==
1
)
{
return
}
withCredentials
([
usernamePassword
(
credentialsId:
'jenkins-gitea-access-token'
,
passwordVariable:
'TOKEN'
,
usernameVariable:
'USER'
)])
{
sh
'git add inventories/group_vars/*/versions'
sh
'git config user.email "jenkins@ozg.de"'
sh
'git config user.name "jenkins"'
sh
"git commit -m 'jenkins rollout ${environment} goofy version ${IMAGE_TAG}'"
...
...
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