Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
operator
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
devops
operator
Commits
07a9bd1c
Commit
07a9bd1c
authored
3 months ago
by
Martin
Browse files
Options
Downloads
Patches
Plain Diff
adjust getPomVersion function signature
parent
9b24c50f
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
+4
-4
4 additions, 4 deletions
Jenkinsfile
with
4 additions
and
4 deletions
Jenkinsfile
+
4
−
4
View file @
07a9bd1c
...
...
@@ -77,7 +77,7 @@ pipeline {
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
JAR_TAG
=
getPomVersion
(
'pom.xml'
).
replace
(
"SNAPSHOT"
,
"${env.BRANCH_NAME}-SNAPSHOT"
)
JAR_TAG
=
getPomVersion
().
replace
(
"SNAPSHOT"
,
"${env.BRANCH_NAME}-SNAPSHOT"
)
}
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
sh
"mvn -s $MAVEN_SETTINGS versions:set -DnewVersion=${JAR_TAG} -DprocessAllModules=true"
...
...
@@ -250,7 +250,7 @@ String getHelmRepoUrl(){
}
String
generateHelmChartVersion
()
{
def
chartVersion
=
getPomVersion
(
'pom.xml'
)
def
chartVersion
=
getPomVersion
()
if
(
isMainBranch
())
{
chartVersion
+=
"-${env.GIT_COMMIT.take(7)}"
...
...
@@ -366,8 +366,8 @@ Void tagAndPushDockerImage(String imageName, String newTag){
}
}
String
getPomVersion
(
String
pomFile
){
def
pom
=
readMavenPom
file:
pom
File
String
getPomVersion
(){
def
pom
=
readMavenPom
file:
'
pom
.xml'
return
pom
.
version
}
...
...
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