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
aefb858d
Commit
aefb858d
authored
9 months ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-6377: Deploy Barrierefreiheit if there is push to tag 'barrierefreiheit-dev'
parent
d71eafe8
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
Jenkinsfile
+37
-6
37 additions, 6 deletions
Jenkinsfile
with
37 additions
and
6 deletions
Jenkinsfile
+
37
−
6
View file @
aefb858d
...
@@ -243,6 +243,27 @@ pipeline {
...
@@ -243,6 +243,27 @@ pipeline {
dependencyCheckPublisher
pattern:
'dependency-check-report.xml'
dependencyCheckPublisher
pattern:
'dependency-check-report.xml'
}
}
}
}
stage
(
'Deploy and build Barrierefreiheit'
)
{
when
{
tag
'barrierefreiheit-dev'
}
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
cloneGitopsRepo
()
IMAGE_TAG
=
generateImageTag
()
HELM_CHART_VERSION
=
generateHelmChartVersion
()
setNewBarrierefreiheitVersion
()
pushGitopsRepo
()
}
}
}
}
}
post
{
post
{
failure
{
failure
{
...
@@ -365,9 +386,19 @@ Void setNewTestVersion() {
...
@@ -365,9 +386,19 @@ Void setNewTestVersion() {
}
}
Void
setNewGitopsVersion
(
String
environment
)
{
Void
setNewGitopsVersion
(
String
environment
)
{
dir
(
"gitops"
)
{
def
envFile
=
"${environment}/application/values/alfa-values.yaml"
def
envFile
=
"${environment}/application/values/alfa-values.yaml"
def
commitMessage
=
"jenkins rollout ${environment} alfa version ${IMAGE_TAG}"
;
setNewGitopsVersion
(
envFile
,
commitMessage
);
}
Void
setNewBarrierefreiheitVersion
()
{
def
envFile
=
"dev/namespace/namespaces/by-barrierefreiheit-dev.yaml"
def
commitMessage
=
"jenkins rollout ${IMAGE_TAG} for Barrierefreiheit Dev"
setNewGitopsVersion
(
envFile
,
commitMessage
);
}
Void
setNewGitopsVersion
(
String
envFile
,
String
commitMessage
)
{
dir
(
"gitops"
)
{
def
envVersions
=
readYaml
file:
envFile
def
envVersions
=
readYaml
file:
envFile
envVersions
.
alfa
.
image
.
tag
=
IMAGE_TAG
envVersions
.
alfa
.
image
.
tag
=
IMAGE_TAG
...
@@ -375,15 +406,15 @@ Void setNewGitopsVersion(String environment) {
...
@@ -375,15 +406,15 @@ Void setNewGitopsVersion(String environment) {
writeYaml
file:
envFile
,
data:
envVersions
,
overwrite:
true
writeYaml
file:
envFile
,
data:
envVersions
,
overwrite:
true
if
(
hasValuesFileChanged
(
env
ironment
))
{
if
(
hasValuesFileChanged
(
env
File
))
{
sh
"git add ${envFile}"
sh
"git add ${envFile}"
sh
"git commit -m '
jenkins rollout ${environment} alfa version ${IMAGE_TAG
}'"
sh
"git commit -m '
${commitMessage
}'"
}
}
}
}
}
}
Boolean
hasValuesFileChanged
(
String
env
ironment
)
{
Boolean
hasValuesFileChanged
(
String
env
File
)
{
return
sh
(
script:
"git status | grep '${env
ironment}/application/values/alfa-values.yaml
'"
,
returnStatus:
true
)
==
env
.
SH_SUCCESS_STATUS_CODE
as
Integer
return
sh
(
script:
"git status | grep '${env
File}
'"
,
returnStatus:
true
)
==
env
.
SH_SUCCESS_STATUS_CODE
as
Integer
}
}
Boolean
isReleaseBranch
()
{
Boolean
isReleaseBranch
()
{
...
...
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