Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bayernId-proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
bayernId-proxy
Commits
47c1200d
Commit
47c1200d
authored
11 months ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-5907 update jenkinsfile for branch jar deployen
parent
e7ff6619
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Jenkinsfile
+20
-18
20 additions, 18 deletions
Jenkinsfile
with
20 additions
and
18 deletions
Jenkinsfile
+
20
−
18
View file @
47c1200d
...
...
@@ -43,34 +43,42 @@ pipeline {
}
}
stage
(
'
Build BayernIdProxy
'
)
{
stage
(
'
Set Version
'
)
{
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
JAR_TAG
=
generate
ImageTag
(
'pom.xml'
)
JAR_TAG
=
generate
HelmChartVersion
(
'pom.xml'
)
}
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
sh
"mvn -s $MAVEN_SETTINGS versions:set -DnewVersion=${JAR_TAG} -DprocessAllModules=true -DgenerateBackupPoms=false"
sh
"mvn -s $MAVEN_SETTINGS -B versions:set -DnewVersion=${JAR_TAG}"
//the command above does not work for bayernid-proxy-interface pom
sh
"mvn -s $MAVEN_SETTINGS -B versions:set -DnewVersion=${JAR_TAG} -f bayernid-proxy-interface/pom.xml"
sh
"mvn --no-transfer-progress -s $MAVEN_SETTINGS clean install -Dmaven.wagon.http.retryHandler.count=3 -DelasticTests.disabled=true"
sh
"mvn -s $MAVEN_SETTINGS versions:revert"
}
}
}
stage
(
'
Deploy to Nexus
'
){
stage
(
'
Build BayernIdProxy
'
)
{
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
deployJarFiles
()
}
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
sh
'mvn --no-transfer-progress -s $MAVEN_SETTINGS clean install -Dmaven.wagon.http.retryHandler.count=3 -DelasticTests.disabled=true'
sh
"mvn -s $MAVEN_SETTINGS versions:revert"
}
}
}
stage
(
'Deploy to Nexus main/release'
){
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
}
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
sh
'mvn --no-transfer-progress -s $MAVEN_SETTINGS -DskipTests deploy -Dmaven.wagon.http.retryHandler.count=3'
}
}
}
stage
(
'Build Docker image nachrichten-bayernid-proxy'
)
{
steps
{
...
...
@@ -256,12 +264,6 @@ Void tagAndPushDockerImage(String imageName, String newTag){
}
}
Void
deployJarFiles
(){
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
sh
'mvn --no-transfer-progress -s $MAVEN_SETTINGS -DskipTests deploy -Dmaven.wagon.http.retryHandler.count=3'
}
}
String
getPomVersion
(
String
pomFile
){
def
pom
=
readMavenPom
file:
pomFile
...
...
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