Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vorgang-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
vorgang-manager
Commits
5d48187b
Commit
5d48187b
authored
4 months ago
by
Felix Reichenbach
Browse files
Options
Downloads
Patches
Plain Diff
reduce branch name length to 20 character
parent
4f162cbe
No related branches found
No related tags found
1 merge request
!3
reduce branch name length to 20 characters
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Jenkinsfile
+21
-21
21 additions, 21 deletions
Jenkinsfile
with
21 additions
and
21 deletions
Jenkinsfile
+
21
−
21
View file @
5d48187b
...
...
@@ -39,7 +39,7 @@ pipeline {
}
if
(
!(
rootVersion
==
serverVersion
&&
rootVersion
==
interfaceVersion
)){
error
(
"Versionen sind nicht identisch"
)
error
(
"Versionen sind nicht identisch"
)
}
}
}
...
...
@@ -59,7 +59,7 @@ pipeline {
FAILED_STAGE
=
env
.
STAGE_NAME
VORGANG_MANAGER_TAG
=
getPomVersion
(
'pom.xml'
).
replace
(
"SNAPSHOT"
,
"${env.BRANCH_NAME}-SNAPSHOT"
);
BESCHEID_MANAGER_TAG
=
getPomVersion
(
'bescheid-manager/pom.xml'
).
replace
(
"SNAPSHOT"
,
"${env.BRANCH_NAME}-SNAPSHOT"
)
updateDependencyVersions
(
BESCHEID_MANAGER_TAG
,
VORGANG_MANAGER_TAG
)
}
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
...
...
@@ -70,7 +70,7 @@ pipeline {
}
}
}
stage
(
'Build VorgangManager'
)
{
steps
{
script
{
...
...
@@ -82,7 +82,7 @@ pipeline {
}
}
}
stage
(
'Deploy to Nexus'
){
steps
{
script
{
...
...
@@ -90,7 +90,7 @@ pipeline {
}
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
sh
'mvn --no-transfer-progress -s $MAVEN_SETTINGS -DskipTests deploy -Dmaven.wagon.http.retryHandler.count=3'
}
}
}
...
...
@@ -114,11 +114,11 @@ pipeline {
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
IMAGE_TAG
=
buildVersionName
(
'pom.xml'
)
tagAndPushDockerImage
(
'vorgang-manager'
,
IMAGE_TAG
)
if
(
isMainBranch
())
{
tagAndPushDockerImage
(
'vorgang-manager'
,
'snapshot-latest'
)
tagAndPushDockerImage
(
'vorgang-manager'
,
'e2e-test'
)
...
...
@@ -146,7 +146,7 @@ pipeline {
}
}
}
}
}
stage
(
'Trigger Dev rollout'
)
{
when
{
...
...
@@ -166,10 +166,10 @@ pipeline {
stage
(
'Trigger Test rollout'
)
{
when
{
branch
'release'
}
steps
{
script
{
}
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
cloneGitopsRepo
()
...
...
@@ -178,9 +178,9 @@ pipeline {
pushTestGitopsRepo
()
}
}
}
}
stage
(
'Deploy SBOM to DependencyTrack'
)
{
steps
{
script
{
...
...
@@ -218,7 +218,7 @@ pipeline {
unstable
(
"SonarQube failed"
)
}
}
dir
(
'vorgang-manager-utils'
)
{
try
{
withSonarQubeEnv
(
'sonarqube-ozg-sh'
){
...
...
@@ -233,7 +233,7 @@ pipeline {
}
}
}
post
{
always
{
...
...
@@ -254,7 +254,7 @@ Boolean isReleaseBranch() {
return
env
.
BRANCH_NAME
==
'release'
}
void
deployHelmChart
(
String
helmChartName
,
String
helmChartVersion
)
{
void
deployHelmChart
(
String
helmChartName
,
String
helmChartVersion
)
{
withCredentials
([
usernamePassword
(
credentialsId:
'jenkins-nexus-login'
,
usernameVariable:
'USERNAME'
,
passwordVariable:
'PASSWORD'
)]){
if
(
env
.
BRANCH_NAME
==
'release'
)
{
result
=
sh
script:
'''curl -u $USERNAME:$PASSWORD https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps -F file=@'''
+
helmChartName
+
'''-'''
+
helmChartVersion
+
'''.tgz'''
,
returnStdout:
true
...
...
@@ -270,7 +270,7 @@ void deployHelmChart(String helmChartName, String helmChartVersion) {
}
def
validateBranchName
(
branchName
)
{
int
maxLength
=
3
0
int
maxLength
=
2
0
if
(
branchName
.
length
()
>
maxLength
)
{
String
originalBranchName
=
branchName
branchName
=
branchName
.
substring
(
0
,
maxLength
)
...
...
@@ -309,9 +309,9 @@ void updateDependencyVersions(String bescheidManagerSnapshotVersion, String vorg
writeMavenPom
model:
vorgangManagerServerPom
,
file:
'vorgang-manager-server/pom.xml'
}
def
bescheidManagerServerPom
=
readMavenPom
file:
'bescheid-manager/pom.xml'
if
(
bescheidManagerServerPom
.
properties
[
'vorgang-manager.version'
]
==~
SNAPSHOT_REGEX
)
{
if
(
bescheidManagerServerPom
.
properties
[
'vorgang-manager.version'
]
==~
SNAPSHOT_REGEX
)
{
bescheidManagerServerPom
.
properties
[
'vorgang-manager.version'
]
=
vorgangManagerSnapshotVersion
writeMavenPom
model:
bescheidManagerServerPom
,
file:
'bescheid-manager/pom.xml'
writeMavenPom
model:
bescheidManagerServerPom
,
file:
'bescheid-manager/pom.xml'
}
}
...
...
@@ -378,7 +378,7 @@ Void sendFailureMessage() {
"body":"VorgangManager: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${JENKINS_URL}", \
"format": "org.matrix.custom.html", \
"formatted_body":"VorgangManager: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${JENKINS_URL}'>${env.BUILD_NUMBER}</a>"}"""
if
(
isMainBranch
())
{
room
=
"!GjqhmouBtnDbwUkAjx:matrix.ozg-sh.de"
}
...
...
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