-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, we maintained a gradle.build file with dependency versions. These dependencies could be updated regularly. Since version 24 of Keycloak, the Keycloak team has been testing the integration of Aurora DB with a version of the AWS wrapper referenced here: keycloak/keycloak@eadd1c4 To align with what is tested by Keycloak and thus avoid compatibility issues, this PR makes a modification to the dependency construction. It retrieves the pom.xml of the Keycloak version, extracts the referenced version of the AWS wrapper, and then downloads the pom.xml of the latter and installs all transitive dependencies with Maven (this is done in the builder step). A utility script retrieves the version of the wrapper to download from the version of keycloak. This PR also includes the removal of the launcher workaround since bitnami/containers#63945 has been merged. fixes #43
- Loading branch information
1 parent
27d935d
commit 69da7f8
Showing
7 changed files
with
105 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Script: get_aws_jdbc_wrapper_version.sh | ||
# Description: Finds the AWS JDBC wrapper version of the Keycloak version from the pom.xml, <keycloak-version> must be formatted as major.minor.patch | ||
# Usage: get_aws_jdbc_wrapper_version.sh <keycloak-version> | ||
|
||
set -Eeuo pipefail | ||
|
||
display_help() { | ||
echo "Script: get_aws_jdbc_wrapper_version.sh" | ||
echo "Description: Finds the AWS JDBC wrapper version of the Keycloak version from the pom.xml" | ||
echo "Usage: get_aws_jdbc_wrapper_version.sh <keycloak-version>" | ||
} | ||
|
||
# Check if there is exactly one argument provided | ||
if [[ $# -ne 1 ]]; then | ||
echo "Error: Incorrect number of arguments." | ||
display_help | ||
exit 1 | ||
fi | ||
|
||
keycloak_version="$1" | ||
|
||
# Validate keycloak version format (major.minor.patch) | ||
if ! [[ "$keycloak_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
echo "Error: Invalid keycloak version format. It must be in the format of major.minor.patch." | ||
display_help | ||
exit 1 | ||
fi | ||
|
||
# Function to extract the first number from a version string | ||
get_major_version() { | ||
echo "$keycloak_version" | cut -d '.' -f1 | ||
} | ||
|
||
# Keycloak only started to reference the aws_jdbc_wrapper version starting with v24, defaulting a fixed version of the jdbc driver, | ||
# this check also allow bumping minimal aws_jdbc_wrapper version for critical fixes | ||
if [[ "$(get_major_version "$keycloak_version")" -lt "25" ]] ; then | ||
echo "2.3.5" # fix https://github.com/keycloak/keycloak/issues/27290 | ||
exit 0 | ||
fi | ||
|
||
# Fetch the AWS JDBC wrapper version from the pom.xml file | ||
AWS_JDBC_VERSION="$(curl -s "https://raw.githubusercontent.com/keycloak/keycloak/$keycloak_version/pom.xml" | awk -F'[><]' '/<aws-jdbc-wrapper.version>/{print $3}')" | ||
|
||
if [[ -z "$AWS_JDBC_VERSION" ]]; then | ||
echo "Error: Failed to retrieve AWS JDBC version." >&2 | ||
exit 1 | ||
fi | ||
|
||
echo "$AWS_JDBC_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.