Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zufi-manager
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
zufi-manager
Commits
acde02da
Commit
acde02da
authored
5 months ago
by
Martin
Browse files
Options
Downloads
Patches
Plain Diff
OZG-7324 adjust JenkinsFile
parent
d232bbb8
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
+12
-12
12 additions, 12 deletions
Jenkinsfile
with
12 additions
and
12 deletions
Jenkinsfile
+
12
−
12
View file @
acde02da
...
...
@@ -29,7 +29,7 @@ pipeline {
}
environment
{
BLUE_OCEAN
_URL
=
"https://jenkins.infra.ozg-cloud.systems/job/zufi-manager/job/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/"
JENKINS
_URL
=
"https://jenkins.infra.ozg-cloud.systems/job/
codeSH_
zufi-manager/job/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/"
RELEASE_REGEX
=
/\d+.\d+.\d+/
SNAPSHOT_REGEX
=
/\d+.\d+.\d+-SNAPSHOT/
FAILED_STAGE
=
""
...
...
@@ -75,7 +75,7 @@ pipeline {
when
{
not
{
anyOf
{
branch
'ma
ster
'
branch
'ma
in
'
branch
'release'
}
}
...
...
@@ -180,7 +180,7 @@ pipeline {
stage
(
'Sonar Checks'
)
{
when
{
branch
'ma
ster
'
branch
'ma
in
'
}
steps
{
script
{
...
...
@@ -226,7 +226,7 @@ pipeline {
stage
(
'Trigger Dev rollout'
)
{
when
{
branch
'ma
ster
'
branch
'ma
in
'
}
steps
{
script
{
...
...
@@ -263,7 +263,7 @@ pipeline {
post
{
failure
{
script
{
if
(
isMa
ster
Branch
()
||
isReleaseBranch
())
{
if
(
isMa
in
Branch
()
||
isReleaseBranch
())
{
sendFailureMessage
()
}
}
...
...
@@ -334,11 +334,11 @@ String buildVersionName() {
Void
sendFailureMessage
()
{
def
room
=
''
def
data
=
"""{"msgtype":"m.text", \
"body":"zufiManager: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${
BLUE_OCEAN
_URL}", \
"body":"zufiManager: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${
JENKINS
_URL}", \
"format": "org.matrix.custom.html", \
"formatted_body":"zufiManager: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${
BLUE_OCEAN
_URL}'>${env.BUILD_NUMBER}</a>"}"""
"formatted_body":"zufiManager: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${
JENKINS
_URL}'>${env.BUILD_NUMBER}</a>"}"""
if
(
isMa
ster
Branch
())
{
if
(
isMa
in
Branch
())
{
room
=
"!iQPAvQIiRwRpNOszjw:matrix.ozg-sh.de"
}
else
if
(
isReleaseBranch
())
{
room
=
"!oWZpUGTFsxkJIYNfYg:matrix.ozg-sh.de"
...
...
@@ -477,7 +477,7 @@ String getPomVersion(String pomFile){
}
String
getBuildProfile
()
{
if
(
isMa
ster
Branch
())
{
if
(
isMa
in
Branch
())
{
return
"-P dev"
}
else
if
(
isReleaseBranch
())
{
return
"-P release"
...
...
@@ -486,8 +486,8 @@ String getBuildProfile() {
}
}
Boolean
isMa
ster
Branch
()
{
return
env
.
BRANCH_NAME
==
'ma
ster
'
Boolean
isMa
in
Branch
()
{
return
env
.
BRANCH_NAME
==
'ma
in
'
}
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