Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
processor-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
processor-manager
Commits
358e143d
Commit
358e143d
authored
1 year ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-4389 remove docker build
parent
9e11dc0b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Jenkinsfile
+0
-49
0 additions, 49 deletions
Jenkinsfile
pom.xml
+0
-11
0 additions, 11 deletions
pom.xml
with
0 additions
and
60 deletions
Jenkinsfile
+
0
−
49
View file @
358e143d
...
@@ -68,36 +68,6 @@ pipeline {
...
@@ -68,36 +68,6 @@ pipeline {
}
}
}
}
stage
(
'Build Docker image'
)
{
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
}
configFileProvider
([
configFile
(
fileId:
'maven-settings'
,
variable:
'MAVEN_SETTINGS'
)])
{
sh
'mvn -s $MAVEN_SETTINGS spring-boot:build-image -DskipTests -Dmaven.wagon.http.retryHandler.count=3'
}
}
}
stage
(
'Tag and Push Docker image'
)
{
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
IMAGE_TAG
=
generateImageTag
()
tagAndPushDockerImage
(
IMAGE_TAG
)
if
(
env
.
BRANCH_NAME
==
'master'
)
{
tagAndPushDockerImage
(
'snapshot-latest'
)
}
else
if
(
env
.
BRANCH_NAME
==
'release'
)
{
tagAndPushDockerImage
(
'latest'
)
}
}
}
}
stage
(
'Sonar Checks'
)
{
stage
(
'Sonar Checks'
)
{
when
{
when
{
branch
'master'
branch
'master'
...
@@ -129,27 +99,8 @@ pipeline {
...
@@ -129,27 +99,8 @@ pipeline {
Void
tagAndPushDockerImage
(
String
newTag
){
withCredentials
([
usernamePassword
(
credentialsId:
'jenkins-nexus-login'
,
usernameVariable:
'USER'
,
passwordVariable:
'PASSWORD'
)])
{
sh
'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}'
sh
"docker tag docker.ozg-sh.de/ozgcloud-processor-manager:build-latest docker.ozg-sh.de/ozgcloud-processor-manager:${newTag}"
sh
"docker push docker.ozg-sh.de/ozgcloud-processor-manager:${newTag}"
}
}
String
getPomVersion
(
String
pomFile
){
String
getPomVersion
(
String
pomFile
){
def
pom
=
readMavenPom
file:
pomFile
def
pom
=
readMavenPom
file:
pomFile
return
pom
.
version
return
pom
.
version
}
}
\ No newline at end of file
String
generateImageTag
()
{
def
imageTag
=
"${env.BRANCH_NAME}-${getPomVersion('pom.xml')}"
if
(
env
.
BRANCH_NAME
==
'master'
)
{
imageTag
+=
"-${env.GIT_COMMIT.take(7)}"
}
return
imageTag
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pom.xml
+
0
−
11
View file @
358e143d
...
@@ -16,10 +16,6 @@
...
@@ -16,10 +16,6 @@
<name>
ozgcloud-processor-manager
</name>
<name>
ozgcloud-processor-manager
</name>
<description>
OZG-Cloud Processor Manager
</description>
<description>
OZG-Cloud Processor Manager
</description>
<properties>
<spring-boot.build-image.imageName>
docker.ozg-sh.de/ozgcloud-processor-manager:build-latest
</spring-boot.build-image.imageName>
</properties>
<dependencies>
<dependencies>
<!-- OZG-Cloud -->
<!-- OZG-Cloud -->
<dependency>
<dependency>
...
@@ -65,13 +61,6 @@
...
@@ -65,13 +61,6 @@
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-surefire-plugin
</artifactId>
<artifactId>
maven-surefire-plugin
</artifactId>
</plugin>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<mainClass>
de.ozgcloud.processor.ProcessorTestApplication
</mainClass>
</configuration>
</plugin>
</plugins>
</plugins>
</build>
</build>
</project>
</project>
\ No newline at end of file
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