Skip to content

Commit

Permalink
Merge pull request #1162 from ma1uta/main
Browse files Browse the repository at this point in the history
Keycloak 26.0.0
  • Loading branch information
francis-pouatcha authored Nov 15, 2024
2 parents 80691d6 + 23ba5d1 commit 40133bb
Show file tree
Hide file tree
Showing 19 changed files with 2,520 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Used in docker-compose
# shellcheck disable=SC2034
KEYCLOAK_VERSION=25.0.1
KEYCLOAK_VERSION=26.0.5
19 changes: 17 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ jobs:
env:
# we keep 18.0.2 for backwards compatibility with RH-SSO 7.6
- KEYCLOAK_VERSION: 18.0.2
KEYCLOAK_CLIENT_VERSION: 18.0.2
- KEYCLOAK_VERSION: 21.1.2
KEYCLOAK_CLIENT_VERSION: 21.1.2
- KEYCLOAK_VERSION: 22.0.4
KEYCLOAK_CLIENT_VERSION: 22.0.4
- KEYCLOAK_VERSION: 23.0.7
KEYCLOAK_CLIENT_VERSION: 23.0.7
- KEYCLOAK_VERSION: 24.0.5
KEYCLOAK_CLIENT_VERSION: 24.0.5
- KEYCLOAK_VERSION: 25.0.1
KEYCLOAK_CLIENT_VERSION: 25.0.1
- KEYCLOAK_VERSION: 26.0.5
KEYCLOAK_CLIENT_VERSION: 26.0.2
steps:
- uses: actions/[email protected]
with:
Expand All @@ -55,6 +63,11 @@ jobs:
key: ${{ runner.os }}-maven-${{ matrix.env.KEYCLOAK_VERSION }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-${{ matrix.env.KEYCLOAK_VERSION }}

- name: Adapt sources for Keycloak versions < 26.0.0
if: ${{ matrix.env.KEYCLOAK_VERSION < '26.0.0' }}
run: |
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak26" >> $GITHUB_ENV
- name: Adapt sources for Keycloak versions < 23.0.0
if: ${{ matrix.env.KEYCLOAK_VERSION < '23.0.0' }}
run: |
Expand All @@ -72,7 +85,7 @@ jobs:
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak19" >> $GITHUB_ENV
- name: Build & Test
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} ${ADJUSTED_RESTEASY_VERSION} clean verify -Pcoverage ${COMPATIBILITY_PROFILE}
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} -Dkeycloak.client.version=${{ matrix.env.KEYCLOAK_CLIENT_VERSION }} ${ADJUSTED_RESTEASY_VERSION} clean verify -Pcoverage ${COMPATIBILITY_PROFILE}

- name: Upload coverage to Codecov
uses: codecov/[email protected]
Expand Down Expand Up @@ -140,6 +153,7 @@ jobs:
with:
build-args: |-
KEYCLOAK_VERSION=${{ matrix.env.KEYCLOAK_VERSION }}
KEYCLOAK_CLIENT_VERSION=${{ matrix.env.KEYCLOAK_CLIENT_VERSION }}
MAVEN_CLI_OPTS=${{ env.MAVEN_CLI_OPTS }} ${{ env.ADJUSTED_RESTEASY_VERSION }} ${{ env.COMPATIBILITY_PROFILE }}
cache-from: type=gha
cache-to: type=gha,mode=max
Expand Down Expand Up @@ -207,6 +221,7 @@ jobs:
matrix:
env:
- KEYCLOAK_VERSION: 19.0.3
KEYCLOAK_CLIENT_VERSION: 19.0.3
steps:
- uses: actions/[email protected]

Expand All @@ -232,7 +247,7 @@ jobs:
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak22" >> $GITHUB_ENV
echo "ADJUSTED_RESTEASY_VERSION=-Dresteasy.version=4.7.7.Final" >> $GITHUB_ENV
- name: Build & Test
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} -Dkeycloak.dockerTagSuffix="-legacy" ${ADJUSTED_RESTEASY_VERSION} clean verify ${COMPATIBILITY_PROFILE}
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} -Dkeycloak.client.version=${{ matrix.env.KEYCLOAK_CLIENT_VERSION }} -Dkeycloak.dockerTagSuffix="-legacy" ${ADJUSTED_RESTEASY_VERSION} clean verify ${COMPATIBILITY_PROFILE}

lint-other-files:
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Fixed
- Fix versioning in artifact to contain the correct keycloak version [#1097](https://github.com/adorsys/keycloak-config-cli/issues/1097)

- Updated CI to use Keycloak 26.0.5

### Fixed

- Allow executions of same provider with different configurations in Sub-Auth-Flows
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ FROM ${BUILDER_IMAGE} AS BUILDER

WORKDIR /app/

ARG KEYCLOAK_VERSION=25.0.1
ARG KEYCLOAK_VERSION=26.0.5
ARG KEYCLOAK_CLIENT_VERSION=26.0.2
ARG MAVEN_CLI_OPTS="-ntp -B"

COPY .mvn .mvn
Expand All @@ -17,7 +18,8 @@ RUN ./mvnw ${MAVEN_CLI_OPTS} -q dependency:go-offline

COPY src src

RUN ./mvnw ${MAVEN_CLI_OPTS} clean package -DskipTests -Dkeycloak.version=${KEYCLOAK_VERSION} \
RUN ./mvnw ${MAVEN_CLI_OPTS} clean package -DskipTests \
-Dkeycloak.version=${KEYCLOAK_VERSION} -Dkeycloak.client.version=${KEYCLOAK_CLIENT_VERSION} \
-Dlicense.skipCheckLicense -Dcheckstyle.skip -Dmaven.test.skip=true -Dmaven.site.skip=true \
-Dmaven.javadoc.skip=true -Dmaven.gitcommitid.skip=true

Expand Down
112 changes: 110 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<groupId>de.adorsys.keycloak</groupId>
<artifactId>keycloak-config-cli</artifactId>
<packaging>jar</packaging>
<version>6.1.7-SNAPSHOT</version>
<version>6.2.0-SNAPSHOT</version>

<name>keycloak-config-cli</name>
<url>https://github.com/adorsys/keycloak-config-cli</url>
Expand Down Expand Up @@ -60,6 +60,8 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<keycloak.version>${keycloak.version}</keycloak.version>
<!-- According to a new policy of the keycloak libraries releases: https://www.keycloak.org/2024/10/release-updates.html -->
<keycloak.client.version>${keycloak.client.version}</keycloak.client.version>

<checkstyle-plugin.version>3.3.1</checkstyle-plugin.version>
<checkstyle.version>10.17.0</checkstyle.version>
Expand Down Expand Up @@ -177,6 +179,7 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-client</artifactId>
<version>${keycloak.client.version}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -230,6 +233,7 @@
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-authz-client</artifactId>
<version>${keycloak.client.version}</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -472,6 +476,7 @@
<configuration>
<systemPropertyVariables>
<keycloak.version>${keycloak.version}</keycloak.version>
<keycloak.client.version>${keycloak.client.version}</keycloak.client.version>
<java.util.logging.config.file>src/test/resources/logging.properties</java.util.logging.config.file>
</systemPropertyVariables>
</configuration>
Expand Down Expand Up @@ -650,6 +655,28 @@
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/SubGroupUtil.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-keycloakmock-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-importmanagednodeleteit-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -743,6 +770,28 @@ import org.keycloak.representations.userprofile.config.UPConfig;</token>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/SubGroupUtil.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-keycloakmock-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-importmanagednodeleteit-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -805,6 +854,42 @@ import org.keycloak.representations.userprofile.config.UPConfig;</token>
</plugins>
</build>
</profile>
<profile>
<id>pre-keycloak26</id>
<build>
<plugins>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>replace-keycloakmock-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-importmanagednodeleteit-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>pre-keycloak23</id>
<build>
Expand All @@ -825,6 +910,28 @@ import org.keycloak.representations.userprofile.config.UPConfig;</token>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/SubGroupUtil.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-keycloakmock-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/test/util/KeycloakMock.java</destinationFile>
</configuration>
</execution>
<execution>
<id>replace-importmanagednodeleteit-with-legacy</id>
<phase>generate-sources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<sourceFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java.legacy</sourceFile>
<destinationFile>${project.basedir}/src/test/java/de/adorsys/keycloak/config/service/ImportManagedNoDeleteIT.java</destinationFile>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand Down Expand Up @@ -936,7 +1043,8 @@ import org.keycloak.representations.userprofile.config.UPConfig;</token>
</property>
</activation>
<properties>
<keycloak.version>25.0.1</keycloak.version>
<keycloak.version>26.0.5</keycloak.version>
<keycloak.client.version>26.0.2</keycloak.client.version>
</properties>
</profile>
<!-- Configure the JBoss GA Maven repository -->
Expand Down
Loading

0 comments on commit 40133bb

Please sign in to comment.