Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nachrichten-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
nachrichten-manager
Commits
ea3af846
Commit
ea3af846
authored
4 months ago
by
Bastian
Browse files
Options
Downloads
Patches
Plain Diff
OZG-7324 jenkinsfile change branch master to main
parent
74acaf32
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
+30
-7
30 additions, 7 deletions
Jenkinsfile
with
30 additions
and
7 deletions
Jenkinsfile
+
30
−
7
View file @
ea3af846
/*
* Copyright (C) 2024 Das Land Schleswig-Holstein vertreten durch den
* Ministerpräsidenten des Landes Schleswig-Holstein
* Staatskanzlei
* Abteilung Digitalisierung und zentrales IT-Management der Landesregierung
*
* Lizenziert unter der EUPL, Version 1.2 oder - sobald
* diese von der Europäischen Kommission genehmigt wurden -
* Folgeversionen der EUPL ("Lizenz");
* Sie dürfen dieses Werk ausschließlich gemäß
* dieser Lizenz nutzen.
* Eine Kopie der Lizenz finden Sie hier:
*
* https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
*
* Sofern nicht durch anwendbare Rechtsvorschriften
* gefordert oder in schriftlicher Form vereinbart, wird
* die unter der Lizenz verbreitete Software "so wie sie
* ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN -
* ausdrücklich oder stillschweigend - verbreitet.
* Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen.
*/
pipeline
{
agent
{
node
{
...
...
@@ -6,7 +29,7 @@ pipeline {
}
environment
{
BLUE_OCEAN
_URL
=
"https://jenkins.infra.ozg-cloud.systems/job/nachrichten-manager/job/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/"
JENKINS
_URL
=
"https://jenkins.infra.ozg-cloud.systems/job/
codeSH_
nachrichten-manager/job/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/"
RELEASE_REGEX
=
/\d+.\d+.\d+/
SNAPSHOT_REGEX
=
/\d+.\d+.\d+-SNAPSHOT/
FAILED_STAGE
=
""
...
...
@@ -47,7 +70,7 @@ pipeline {
when
{
not
{
anyOf
{
branch
'ma
ster
'
branch
'ma
in
'
branch
'release'
}
}
...
...
@@ -106,7 +129,7 @@ pipeline {
stage
(
'Sonar Checks'
)
{
when
{
branch
'ma
ster
'
branch
'ma
in
'
}
steps
{
script
{
...
...
@@ -144,7 +167,7 @@ pipeline {
}
failure
{
script
{
if
(
env
.
BRANCH_NAME
==
'ma
ster
'
||
env
.
BRANCH_NAME
==
'release'
)
{
if
(
env
.
BRANCH_NAME
==
'ma
in
'
||
env
.
BRANCH_NAME
==
'release'
)
{
sendFailureMessage
()
}
}
...
...
@@ -168,12 +191,12 @@ Void sendFailureMessage() {
def
room
=
''
def
data
=
"""{"msgtype":"m.text", \
"body":"NachrichtenManager: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER}
Link: ${
BLUE_OCEAN
_URL}", \
Link: ${
JENKINS
_URL}", \
"format": "org.matrix.custom.html", \
"formatted_body":"NachrichtenManager: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a
href='${
BLUE_OCEAN
_URL}'>${env.BUILD_NUMBER}</a>"}"""
href='${
JENKINS
_URL}'>${env.BUILD_NUMBER}</a>"}"""
if
(
env
.
BRANCH_NAME
==
'ma
ster
'
)
{
if
(
env
.
BRANCH_NAME
==
'ma
in
'
)
{
room
=
"!GjqhmouBtnDbwUkAjx:matrix.ozg-sh.de"
}
else
if
(
env
.
BRANCH_NAME
==
'release'
)
{
...
...
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