Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
common-lib
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
lib
common-lib
Commits
88851f64
Commit
88851f64
authored
1 year ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-4589 adjust Jenkinsfile
parent
a2960014
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
+10
-10
10 additions, 10 deletions
Jenkinsfile
with
10 additions
and
10 deletions
Jenkinsfile
+
10
−
10
View file @
88851f64
...
@@ -8,7 +8,7 @@ pipeline {
...
@@ -8,7 +8,7 @@ pipeline {
}
}
environment
{
environment
{
BLUE_OCEAN_URL
=
"https://jenkins.ozg-sh.de/job/
kop
-common/job/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/"
BLUE_OCEAN_URL
=
"https://jenkins.ozg-sh.de/job/
ozgcloud
-common/job/${env.BRANCH_NAME}/${env.BUILD_NUMBER}/"
RELEASE_REGEX
=
/\d+.\d+.\d+/
RELEASE_REGEX
=
/\d+.\d+.\d+/
SNAPSHOT_REGEX
=
/\d+.\d+.\d+-SNAPSHOT/
SNAPSHOT_REGEX
=
/\d+.\d+.\d+-SNAPSHOT/
}
}
...
@@ -27,10 +27,10 @@ pipeline {
...
@@ -27,10 +27,10 @@ pipeline {
def rootPom = readMavenPom file: 'pom.xml'
def rootPom = readMavenPom file: 'pom.xml'
def rootVersion = rootPom.version
def rootVersion = rootPom.version
def dependenciesPom = readMavenPom file: '
kop
-common-dependencies/pom.xml'
def dependenciesPom = readMavenPom file: '
ozgcloud
-common-dependencies/pom.xml'
def dependenciesVersion = dependenciesPom.parent.version
def dependenciesVersion = dependenciesPom.parent.version
def parentPom = readMavenPom file: '
kop
-common-parent/pom.xml'
def parentPom = readMavenPom file: '
ozgcloud
-common-parent/pom.xml'
def parentVersion = parentPom.version
def parentVersion = parentPom.version
if(env.BRANCH_NAME == 'release'){
if(env.BRANCH_NAME == 'release'){
...
@@ -49,12 +49,12 @@ pipeline {
...
@@ -49,12 +49,12 @@ pipeline {
}
}
}
}
}*/
}*/
stage
(
'Build
Kop
-Common Dependencies'
)
{
stage
(
'Build
OzgCloud
-Common Dependencies'
)
{
steps
{
steps
{
script
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
}
}
dir
(
'
kop
-common-dependencies'
)
{
dir
(
'
ozgcloud
-common-dependencies'
)
{
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
sh
'mvn --version'
sh
'mvn --version'
sh
'mvn -s $MAVEN_SETTINGS clean install'
sh
'mvn -s $MAVEN_SETTINGS clean install'
...
@@ -64,7 +64,7 @@ pipeline {
...
@@ -64,7 +64,7 @@ pipeline {
}
}
stage
(
'Build
Kop
-Common'
)
{
stage
(
'Build
OzgCloud
-Common'
)
{
steps
{
steps
{
script
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
FAILED_STAGE
=
env
.
STAGE_NAME
...
@@ -74,7 +74,7 @@ pipeline {
...
@@ -74,7 +74,7 @@ pipeline {
sh
'mvn -s $MAVEN_SETTINGS clean install'
sh
'mvn -s $MAVEN_SETTINGS clean install'
script
{
script
{
dir
(
'
kop
-common-lib'
)
{
dir
(
'
ozgcloud
-common-lib'
)
{
try
{
try
{
if
(
env
.
BRANCH_NAME
==
'master'
)
{
if
(
env
.
BRANCH_NAME
==
'master'
)
{
withSonarQubeEnv
(
'sonarqube-ozg-sh'
){
withSonarQubeEnv
(
'sonarqube-ozg-sh'
){
...
@@ -90,7 +90,7 @@ pipeline {
...
@@ -90,7 +90,7 @@ pipeline {
}
}
}
}
stage
(
'Deploy
Kop
-Common to Nexus'
){
stage
(
'Deploy
OzgCloud
-Common to Nexus'
){
when
{
when
{
anyOf
{
anyOf
{
branch
'master'
branch
'master'
...
@@ -123,9 +123,9 @@ pipeline {
...
@@ -123,9 +123,9 @@ pipeline {
Void
sendFailureMessage
()
{
Void
sendFailureMessage
()
{
def
room
=
''
def
room
=
''
def
data
=
"""{"msgtype":"m.text", \
def
data
=
"""{"msgtype":"m.text", \
"body":"
kop
-common: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${BLUE_OCEAN_URL}", \
"body":"
ozgcloud
-common: Build Failed. Stage: ${FAILED_STAGE} Build-ID: ${env.BUILD_NUMBER} Link: ${BLUE_OCEAN_URL}", \
"format": "org.matrix.custom.html", \
"format": "org.matrix.custom.html", \
"formatted_body":"
kop
-common: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${BLUE_OCEAN_URL}'>${env.BUILD_NUMBER}</a>"}"""
"formatted_body":"
ozgcloud
-common: Build Failed. Stage: ${FAILED_STAGE} Build-ID: <a href='${BLUE_OCEAN_URL}'>${env.BUILD_NUMBER}</a>"}"""
if
(
env
.
BRANCH_NAME
==
'master'
)
{
if
(
env
.
BRANCH_NAME
==
'master'
)
{
room
=
"!iQPAvQIiRwRpNOszjw:matrix.ozg-sh.de"
room
=
"!iQPAvQIiRwRpNOszjw: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