Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eingang-manager
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
eingang-manager
Commits
62a571f2
Commit
62a571f2
authored
2 years ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-3136 build docker image
parent
b3bf2fb7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Jenkinsfile
+46
-18
46 additions, 18 deletions
Jenkinsfile
xta-adapter/pom.xml
+25
-0
25 additions, 0 deletions
xta-adapter/pom.xml
with
71 additions
and
18 deletions
Jenkinsfile
+
46
−
18
View file @
62a571f2
...
@@ -28,32 +28,24 @@ pipeline {
...
@@ -28,32 +28,24 @@ pipeline {
def
rootVersion
=
rootPom
.
version
def
rootVersion
=
rootPom
.
version
def
plutoVersion
=
rootPom
.
properties
[
'pluto.version'
]
def
plutoVersion
=
rootPom
.
properties
[
'pluto.version'
]
def
commonPom
=
readMavenPom
file:
'common/pom.xml'
def
commonVersion
=
getParentPomVersion
(
'common/pom.xml'
)
def
commonVersion
=
commonPom
.
parent
.
version
def
routerVersion
=
getParentPomVersion
(
'router/pom.xml'
)
def
ifAdapterVersion
=
getParentPomVersion
(
'intelliform-adapter/pom.xml'
)
def
routerPom
=
readMavenPom
file:
'router/pom.xml'
def
fsAdapterVersion
=
getParentPomVersion
(
'formsolutions-adapter/pom.xml'
)
def
routerVersion
=
routerPom
.
parent
.
version
def
formCycleAdapterVersion
=
getParentPomVersion
(
'formcycle-adapter/pom.xml'
)
def
xtaAdapterVersion
=
getParentPomVersion
(
'xta-adapter/pom.xml'
)
def
ifAdapterPom
=
readMavenPom
file:
'intelliform-adapter/pom.xml'
def
ifAdapterVersion
=
ifAdapterPom
.
parent
.
version
def
fsAdapterPom
=
readMavenPom
file:
'formsolutions-adapter/pom.xml'
def
fsAdapterVersion
=
fsAdapterPom
.
parent
.
version
def
formCycleAdapterPom
=
readMavenPom
file:
'formcycle-adapter/pom.xml'
def
formCycleAdapterVersion
=
formCycleAdapterPom
.
parent
.
version
if
(
env
.
BRANCH_NAME
==
'release'
){
if
(
env
.
BRANCH_NAME
==
'release'
){
if
(
!
(
rootVersion
==~
RELEASE_REGEX
)
||
!(
plutoVersion
==~
RELEASE_REGEX
)
||
!(
commonVersion
==~
RELEASE_REGEX
)
||
!(
routerVersion
==~
RELEASE_REGEX
)
||
!(
ifAdapterVersion
==~
RELEASE_REGEX
)
||
!(
fsAdapterVersion
==~
RELEASE_REGEX
)
||
!(
formCycleAdapterVersion
==~
RELEASE_REGEX
))
{
if
(
!
isReleaseVersion
([
rootVersion
,
plutoVersion
,
commonVersion
,
routerVersion
,
ifAdapterVersion
,
fsAdapterVersion
,
formCycleAdapterVersion
,
xtaAdapterVersion
]
))
{
error
(
"Keine Release Version für Branch ${env.BRANCH_NAME}."
)
error
(
"Keine Release Version für Branch ${env.BRANCH_NAME}."
)
}
}
}
else
{
}
else
{
if
(
!
(
rootVersion
==~
SNAPSHOT_REGEX
)
||
!(
routerVersion
==~
SNAPSHOT_REGEX
)
||
!(
ifAdapterVersion
==~
SNAPSHOT_REGEX
)
||
!(
fsAdapterVersion
==~
SNAPSHOT_REGEX
)
||
!(
formCycleAdapterVersion
==~
SNAPSHOT_REGEX
))
{
if
(
!
isSnapshotVersion
([
rootVersion
,
commonVersion
,
routerVersion
,
ifAdapterVersion
,
fsAdapterVersion
,
formCycleAdapterVersion
,
xtaAdapterVersion
]
))
{
error
(
"Keine Snapshot Version für Branch ${env.BRANCH_NAME}."
)
error
(
"Keine Snapshot Version für Branch ${env.BRANCH_NAME}."
)
}
}
}
}
if
(
!
(
root
Version
==
commonVersion
&&
rootVersion
==
routerVersion
&&
root
Version
==
if
AdapterVersion
&&
root
Version
==
fs
AdapterVersion
&&
rootVersion
==
formCycleAdapterVersion
)){
if
(
!
isSame
Version
([
commonVersion
,
routerVersion
,
ifAdapter
Version
,
fs
AdapterVersion
,
formCycleAdapter
Version
,
xta
AdapterVersion
],
rootVersion
))
{
error
(
"Versionen sind nicht identisch"
)
error
(
"Versionen sind nicht identisch"
)
}
}
}
}
...
@@ -130,16 +122,19 @@ pipeline {
...
@@ -130,16 +122,19 @@ pipeline {
tagAndPushDockerImage
(
'intelliform-adapter'
,
IMAGE_TAG
)
tagAndPushDockerImage
(
'intelliform-adapter'
,
IMAGE_TAG
)
tagAndPushDockerImage
(
'formsolutions-adapter'
,
IMAGE_TAG
)
tagAndPushDockerImage
(
'formsolutions-adapter'
,
IMAGE_TAG
)
tagAndPushDockerImage
(
'formcycle-adapter'
,
IMAGE_TAG
)
tagAndPushDockerImage
(
'formcycle-adapter'
,
IMAGE_TAG
)
tagAndPushDockerImage
(
'xta-adapter'
,
IMAGE_TAG
)
if
(
env
.
BRANCH_NAME
==
'master'
)
{
if
(
env
.
BRANCH_NAME
==
'master'
)
{
tagAndPushDockerImage
(
'intelliform-adapter'
,
'snapshot-latest'
)
tagAndPushDockerImage
(
'intelliform-adapter'
,
'snapshot-latest'
)
tagAndPushDockerImage
(
'formsolutions-adapter'
,
'snapshot-latest'
)
tagAndPushDockerImage
(
'formsolutions-adapter'
,
'snapshot-latest'
)
tagAndPushDockerImage
(
'formcycle-adapter'
,
'snapshot-latest'
)
tagAndPushDockerImage
(
'formcycle-adapter'
,
'snapshot-latest'
)
tagAndPushDockerImage
(
'xta-adapter'
,
'snapshot-latest'
)
}
}
else
if
(
env
.
BRANCH_NAME
==
'release'
)
{
else
if
(
env
.
BRANCH_NAME
==
'release'
)
{
tagAndPushDockerImage
(
'intelliform-adapter'
,
'latest'
)
tagAndPushDockerImage
(
'intelliform-adapter'
,
'latest'
)
tagAndPushDockerImage
(
'formsolutions-adapter'
,
'latest'
)
tagAndPushDockerImage
(
'formsolutions-adapter'
,
'latest'
)
tagAndPushDockerImage
(
'formcycle-adapter'
,
'latest'
)
tagAndPushDockerImage
(
'formcycle-adapter'
,
'latest'
)
tagAndPushDockerImage
(
'xta-adapter'
,
'latest'
)
}
}
}
}
}
}
...
@@ -377,3 +372,36 @@ String generateImageTag() {
...
@@ -377,3 +372,36 @@ String generateImageTag() {
return
imageTag
return
imageTag
}
}
String
getParentPomVersion
(
String
filePath
)
{
def
pom
=
readMavenPom
file:
filePath
return
pom
.
parent
.
version
}
Boolean
isReleaseVersion
(
List
versions
)
{
return
matchRegexVersion
(
versions
,
RELEASE_REGEX
)
}
Boolean
isSnapshotVersion
(
List
versions
)
{
return
matchRegexVersion
(
versions
,
SNAPSHOT_REGEX
)
}
Boolean
matchRegexVersion
(
List
versions
,
String
regex
)
{
for
(
version
in
versions
)
{
if
(
!(
version
==~
regex
)
)
{
return
false
}
}
return
true
}
Boolean
isSameVersion
(
List
versions
,
String
expectedVersion
)
{
for
(
version
in
versions
)
{
if
(
version
!=
expectedVersion
)
{
return
false
}
}
return
true
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
xta-adapter/pom.xml
+
25
−
0
View file @
62a571f2
...
@@ -8,6 +8,9 @@
...
@@ -8,6 +8,9 @@
<artifactId>
xta-adapter
</artifactId>
<artifactId>
xta-adapter
</artifactId>
<name>
Eingangs Adapter - XTA
</name>
<name>
Eingangs Adapter - XTA
</name>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
<properties>
<spring-boot.build-image.imageName>
docker.ozg-sh.de/xta-adapter:build-latest
</spring-boot.build-image.imageName>
</properties>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
@@ -157,4 +160,26 @@
...
@@ -157,4 +160,26 @@
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
<profiles>
<profile>
<id>
ci-build
</id>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<executions>
<execution>
<id>
build-image
</id>
<phase>
install
</phase>
<goals>
<goal>
build-image
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</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