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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
devops
operator
Compare revisions
73ab2a9fe5e29739b9008243ed420fdc510fac55 to 5c0444ce16f1da0f9c878e7666ba5a291997f0c2
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
ozg-cloud/devops/operator
Select target project
No results found
5c0444ce16f1da0f9c878e7666ba5a291997f0c2
Select Git revision
Swap
Target
ozg-cloud/devops/operator
Select target project
ozg-cloud/devops/operator
1 result
73ab2a9fe5e29739b9008243ed420fdc510fac55
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (5)
OZG-7922 adjust keycloak versions
· bc9a2d1f
Martin
authored
3 weeks ago
bc9a2d1f
OZG-7922 update ozgclod-common-parent
· 9c6fe57a
Martin
authored
3 weeks ago
9c6fe57a
OZG-7922 update versions
· b3b0dc73
Martin
authored
3 weeks ago
b3b0dc73
OZG-7922 adjust image tag generation
· 9c5534fb
Martin
authored
3 weeks ago
9c5534fb
Merge branch 'OZG-7922-FixKeycloakOperatorException' into 'main'
· 5c0444ce
Martin Küster
authored
3 weeks ago
Ozg 7922 fix keycloak operator exception See merge request
!2
5c0444ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Jenkinsfile
+24
-24
24 additions, 24 deletions
Jenkinsfile
ozgcloud-keycloak-operator/pom.xml
+27
-5
27 additions, 5 deletions
ozgcloud-keycloak-operator/pom.xml
pom.xml
+3
-3
3 additions, 3 deletions
pom.xml
with
54 additions
and
32 deletions
Jenkinsfile
View file @
5c0444ce
...
...
@@ -80,7 +80,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"
...
...
@@ -166,7 +166,7 @@ pipeline {
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
HELM_CHART_VERSION
=
generate
HelmChartVersion
()
HELM_CHART_VERSION
=
generate
ImageTag
()
;
testAndDeployKeycloakHelmChart
(
HELM_CHART_VERSION
)
}
...
...
@@ -177,7 +177,7 @@ pipeline {
steps
{
script
{
FAILED_STAGE
=
env
.
STAGE_NAME
HELM_CHART_VERSION
=
generate
HelmChartVersion
()
HELM_CHART_VERSION
=
generate
ImageTag
()
testAndDeployElasticsearchHelmChart
(
HELM_CHART_VERSION
)
}
...
...
@@ -259,19 +259,6 @@ String getHelmRepoUrl(){
return
"https://nexus.ozg-sh.de/service/rest/v1/components?repository=ozg-base-apps-snapshot"
}
String
generateHelmChartVersion
()
{
def
chartVersion
=
getPomVersion
(
'pom.xml'
)
if
(
isMainBranch
())
{
chartVersion
+=
"-${env.GIT_COMMIT.take(7)}"
}
else
if
(!
isReleaseBranch
())
{
chartVersion
+=
"-${env.BRANCH_NAME}"
}
return
chartVersion
.
replaceAll
(
'_'
,
'-'
)
}
Boolean
isMainBranch
()
{
return
env
.
BRANCH_NAME
==
'main'
}
...
...
@@ -370,20 +357,33 @@ Void tagAndPushDockerImage(String imageName, String newTag){
}
}
String
getPomVersion
(
String
pomFile
){
def
pom
=
readMavenPom
file:
pomFile
String
generateImageTag
()
{
if
(
isReleaseBranch
())
{
return
getPomVersion
()
}
return
"${getPomVersion()}-${validateBranchName(env.BRANCH_NAME)}${getCommitHash()}"
.
replaceAll
(
"_"
,
"-"
)
}
String
getPomVersion
(){
def
pom
=
readMavenPom
file:
'pom.xml'
return
pom
.
version
}
String
generateImageTag
()
{
def
imageTag
=
"${env.BRANCH_NAME}-${getPomVersion('pom.xml')}"
if
(
env
.
BRANCH_NAME
==
'main'
)
{
imageTag
+=
"-${env.GIT_COMMIT.take(7)}"
String
validateBranchName
(
branchName
)
{
int
maxLength
=
20
if
(
branchName
.
length
()
>
maxLength
)
{
String
originalBranchName
=
branchName
branchName
=
branchName
.
substring
(
0
,
maxLength
)
echo
"WARNING: Branch name '${originalBranchName}' exceeded ${maxLength} characters. "
+
"It has been truncated to '${branchName}' for deployment purposes."
}
return
branchName
}
return
imageTag
String
getCommitHash
()
{
return
"-${env.GIT_COMMIT.take(7)}"
;
}
String
getParentPomVersion
(
String
filePath
)
{
...
...
This diff is collapsed.
Click to expand it.
ozgcloud-keycloak-operator/pom.xml
View file @
5c0444ce
...
...
@@ -43,6 +43,7 @@
<properties>
<spring-boot.build-image.imageName>
docker.ozg-sh.de/ozgcloud-keycloak-operator:build-latest
</spring-boot.build-image.imageName>
<keycloak.version>
24.0.5
</keycloak.version>
</properties>
<dependencies>
...
...
@@ -57,16 +58,37 @@
<!-- keycloak -->
<dependency>
<groupId>
org.keycloak
</groupId>
<artifactId>
keycloak-admin-client
</artifactId>
<groupId>
org.keycloak
</groupId>
<artifactId>
keycloak-admin-client
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.keycloak
</groupId>
<artifactId>
keycloak-core
</artifactId>
</exclusion>
<exclusion>
<groupId>
org.keycloak
</groupId>
<artifactId>
keycloak-common
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.keycloak
</groupId>
<artifactId>
keycloak-core
</artifactId>
<version>
${keycloak.version}
</version>
</dependency>
<dependency>
<groupId>
org.keycloak
</groupId>
<artifactId>
keycloak-common
</artifactId>
<version>
${keycloak.version}
</version>
</dependency>
<!-- tools -->
<dependency>
<groupId>
org.mapstruct
</groupId>
<artifactId>
mapstruct
</artifactId>
</dependency>
<!-- javax -->
<dependency>
<groupId>
javax.validation
</groupId>
...
...
@@ -88,7 +110,7 @@
<groupId>
commons-beanutils
</groupId>
<artifactId>
commons-beanutils
</artifactId>
</dependency>
<!-- test -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
...
...
This diff is collapsed.
Click to expand it.
pom.xml
View file @
5c0444ce
...
...
@@ -30,7 +30,7 @@
<parent>
<groupId>
de.ozgcloud.common
</groupId>
<artifactId>
ozgcloud-common-parent
</artifactId>
<version>
4.
7
.0
</version>
<version>
4.
11
.0
</version>
</parent>
<groupId>
de.ozgcloud
</groupId>
...
...
@@ -48,13 +48,13 @@
</modules>
<properties>
<operator-sdk.version>
5.
4.1
</operator-sdk.version>
<operator-sdk.version>
5.
6.0
</operator-sdk.version>
<!-- tools -->
<reflections.version>
0.10.2
</reflections.version>
<validation-api.version>
2.0.1.Final
</validation-api.version>
<!-- test -->
<kubernetes-server-mock.version>
6.13.
4
</kubernetes-server-mock.version>
<kubernetes-server-mock.version>
6.13.
5
</kubernetes-server-mock.version>
<io.javaoperatorsdk.version>
0.9.7
</io.javaoperatorsdk.version>
<!-- plugin -->
...
...
This diff is collapsed.
Click to expand it.