Skip to content

Commit

Permalink
keycloak: bitnami: upgrade to 25 and fix data path (#26092)
Browse files Browse the repository at this point in the history
Dynamically parse major version to pass `bitnami/compat` pipeline and
create a missing `data` dir.

Signed-off-by: Dentrax <[email protected]>
  • Loading branch information
Dentrax authored Aug 10, 2024
1 parent 778fb65 commit 35152ef
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions keycloak.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package:
name: keycloak
version: 25.0.2
epoch: 2
epoch: 3
description: Open Source Identity and Access Management For Modern Applications and Services
copyright:
- license: Apache-2.0
Expand All @@ -10,6 +10,15 @@ package:
- bash # Keycloak helper scripts require bash, aren't compatible with busybox.
- openjdk-17-default-jvm

# Create a new major-version variable that contains only the major version
# to use in the bitnami/compat pipeline to find out the correct folder for the image.
# e.g. 25.0.2 will create a new var major-version=25
var-transforms:
- from: ${{package.version}}
match: ^(\d+).*
replace: $1
to: major-version

environment:
contents:
packages:
Expand Down Expand Up @@ -49,6 +58,9 @@ pipeline:
unzip -d ${{targets.destdir}}/usr/share/java quarkus/dist/target/keycloak-*.zip
cp -avR ${{targets.destdir}}/usr/share/java/keycloak-* ${{targets.destdir}}/usr/share/java/keycloak
# Create an empty data directory for keycloak. Required by the UI to store some data.
mkdir -p ${{targets.destdir}}/usr/share/java/keycloak/data
mkdir -p ${{targets.destdir}}/usr/bin
for i in kc.sh kcadm.sh kcreg.sh; do
ln -sf /usr/share/java/keycloak/bin/$i ${{targets.destdir}}/usr/bin/$i
Expand All @@ -67,6 +79,7 @@ subpackages:
description: "compat package with bitnami/keycloak image"
dependencies:
runtime:
- coreutils # Keycloak Helm Chart scripts require coreutils, aren't compatible with busybox. (i.e., `cp` with `--preserve` option)
- krb5
- libaio
- procps
Expand All @@ -79,7 +92,7 @@ subpackages:
- uses: bitnami/compat
with:
image: keycloak
version-path: 24/debian-12
version-path: ${{vars.major-version}}/debian-12
- runs: |
mkdir -p ${{targets.contextdir}}/bitnami/keycloak
mkdir -p ${{targets.contextdir}}/opt/bitnami/keycloak
Expand Down

0 comments on commit 35152ef

Please sign in to comment.