Skip to content

Commit

Permalink
Merge branch 'main' into fix/auth-flow-with-multiple-executions-of-sa…
Browse files Browse the repository at this point in the history
…me-type
  • Loading branch information
f11h authored Oct 15, 2024
2 parents e0c1167 + d126bab commit 4d25a00
Show file tree
Hide file tree
Showing 142 changed files with 8,599 additions and 2,096 deletions.
2 changes: 1 addition & 1 deletion .edge-build.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17-jdk
FROM eclipse-temurin:21-jdk

ENV KEYCLOAK_VERSION="" MAVEN_CLI_OPTS="-B -ntp" IMPORT_FILES_LOCATIONS=file:/config

Expand Down
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=24.0.1
KEYCLOAK_VERSION=25.0.1
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ body:
label: Environment
description: |
examples:
- **Keycloak Version**: 10.0.1
- **keycloak-config-cli Version**: 1.4.0
- **Java Version**: 11
- **Keycloak Version**: 24.0.1
- **keycloak-config-cli Version**: 5.11.1
- **Java Version**: 21
value: |
- Keycloak Version: [e.g. 10.0.1]
- keycloak-config-cli Version: [e.g. 1.4.0]
- Java Version: [e.g. 11]
- Keycloak Version: [e.g. 24.0.1]
- keycloak-config-cli Version: [e.g. 5.11.1]
- Java Version: [e.g. 21]
validations:
required: false
- type: textarea
Expand Down
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/enhancement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ body:
label: Environment
description: |
examples:
- **Keycloak Version**: 10.0.1
- **keycloak-config-cli Version**: 1.4.0
- **Java Version**: 11
- **Keycloak Version**: 24.0.1
- **keycloak-config-cli Version**: 5.11.1
- **Java Version**: 21
value: |
- Keycloak Version: [e.g. 10.0.1]
- keycloak-config-cli Version: [e.g. 1.4.0]
- Java Version: [e.g. 11]
- Keycloak Version: [e.g. 24.0.1]
- keycloak-config-cli Version: [e.g. 5.11.1]
- Java Version: [e.g. 21]
validations:
required: false
- type: textarea
Expand Down
110 changes: 62 additions & 48 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,23 @@ jobs:
env:
# we keep 18.0.2 for backwards compatibility with RH-SSO 7.6
- KEYCLOAK_VERSION: 18.0.2
- KEYCLOAK_VERSION: 21.1.1
- KEYCLOAK_VERSION: 21.1.2
- KEYCLOAK_VERSION: 22.0.4
- KEYCLOAK_VERSION: 23.0.7
- KEYCLOAK_VERSION: 24.0.1
- KEYCLOAK_VERSION: 24.0.5
- KEYCLOAK_VERSION: 25.0.1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.0
with:
fetch-depth: 0

- name: Setup java
uses: actions/setup-java@v3
uses: actions/setup-java@v4.4.0
with:
distribution: 'temurin'
java-version: 17
java-version: 21

- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ matrix.env.KEYCLOAK_VERSION }}-${{ hashFiles('**/pom.xml') }}
Expand All @@ -57,53 +58,61 @@ jobs:
- name: Adapt sources for Keycloak versions < 23.0.0
if: ${{ matrix.env.KEYCLOAK_VERSION < '23.0.0' }}
run: |
echo "JAVAX_PROFILE=-Ppre-keycloak23" >> $GITHUB_ENV
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak23" >> $GITHUB_ENV
- name: Adapt sources for Keycloak versions < 22.0.0 (jakarta -> javax)
if: ${{ matrix.env.KEYCLOAK_VERSION < '22.0.0' }}
run: |
echo "JAVAX_PROFILE=-Ppre-keycloak22" >> $GITHUB_ENV
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak22" >> $GITHUB_ENV
echo "ADJUSTED_RESTEASY_VERSION=-Dresteasy.version=4.7.7.Final" >> $GITHUB_ENV
- name: Adapt sources for Keycloak versions < 19.0.0
if: ${{ matrix.env.KEYCLOAK_VERSION < '19.0.0' }}
run: |
echo "JAVAX_PROFILE=-Ppre-keycloak19" >> $GITHUB_ENV
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 ${JAVAX_PROFILE}
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} ${ADJUSTED_RESTEASY_VERSION} clean verify -Pcoverage ${COMPATIBILITY_PROFILE}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4.5.0
if: github.ref == 'refs/heads/main'
with:
file: "${{ github.workspace }}/target/site/jacoco/jacoco.xml"
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: ${{ !startsWith(github.event.ref, 'refs/tags/v') }}

- name: Get latest keycloak version
id: latest
run: echo "::set-output name=VERSION::$(tail -n1 .env | cut -d= -f2)"

- name: Login to Docker Hub
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3.3.0
if: startsWith(github.event.ref, 'refs/tags/v')
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Login to Quay.io
uses: docker/login-action@v3.0.0
uses: docker/login-action@v3.3.0
if: startsWith(github.event.ref, 'refs/tags/v')
with:
registry: quay.io
username: ${{ secrets.QUAYIO_USERNAME }}
password: ${{ secrets.QUAYIO_PASSWORD }}

- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
uses: crazy-max/ghaction-github-runtime@v3.0.0

- name: Compute SemVer parts of Keycloak version
id: keycloak_semver
uses: madhead/semver-utils@v4
with:
version: ${{ matrix.env.KEYCLOAK_VERSION }}

- name: Set up Docker Build Metadata
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v4.6.0
uses: docker/metadata-action@v5.5.1
with:
images: adorsys/keycloak-config-cli,quay.io/adorsys/keycloak-config-cli
flavor: |
Expand All @@ -114,21 +123,24 @@ jobs:
type=ref,event=pr
type=semver,event=tag,pattern={{version}}
type=raw,event=tag,value=latest,enable=${{ !contains(github.ref_name, 'rc') }}
# alias tags without Keycloak minor/patch version
type=semver,event=tag,pattern={{version}},suffix=-${{ steps.keycloak_semver.outputs.major }}
type=raw,event=tag,value=latest,enable=${{ !contains(github.ref_name, 'rc') }},suffix=-${{ steps.keycloak_semver.outputs.major }}
labels: |
maintainer=adorsys GmbH & Co. KG
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3.6.1

- name: Build and push
uses: docker/build-push-action@v4.1.1
uses: docker/build-push-action@v6.7.0
with:
build-args: |-
KEYCLOAK_VERSION=${{ matrix.env.KEYCLOAK_VERSION }}
MAVEN_CLI_OPTS=${{ env.MAVEN_CLI_OPTS }} ${{ env.ADJUSTED_RESTEASY_VERSION }} ${{ env.JAVAX_PROFILE }}
MAVEN_CLI_OPTS=${{ env.MAVEN_CLI_OPTS }} ${{ env.ADJUSTED_RESTEASY_VERSION }} ${{ env.COMPATIBILITY_PROFILE }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
Expand All @@ -143,7 +155,7 @@ jobs:
cp target/keycloak-config-cli.jar keycloak-config-cli-${{ matrix.env.KEYCLOAK_VERSION }}.jar
sha256sum keycloak-config-cli-${{ matrix.env.KEYCLOAK_VERSION }}.jar > keycloak-config-cli-${{ matrix.env.KEYCLOAK_VERSION }}.jar.sha256
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4.4.0
with:
name: keycloak-config-cli-${{ matrix.env.KEYCLOAK_VERSION }}
if-no-files-found: error
Expand All @@ -157,17 +169,17 @@ jobs:
strategy:
fail-fast: false
matrix:
java: [11, 17]
java: [17, 21]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.0

- name: Setup java
uses: actions/setup-java@v3
- name: Setup java ${{ matrix.java }}
uses: actions/setup-java@v4.4.0
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}

- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.java }}-maven-build-pom-${{ hashFiles('**/pom.xml') }}
Expand All @@ -176,16 +188,16 @@ jobs:
- name: Adapt sources for Keycloak versions < 23.0.0
if: ${{ matrix.env.KEYCLOAK_VERSION < '23.0.0' }}
run: |
echo "JAVAX_PROFILE=-Ppre-keycloak23" >> $GITHUB_ENV
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak23" >> $GITHUB_ENV
- name: Adapt sources for Keycloak versions < 22.0.0 (jakarta -> javax)
if: ${{ matrix.env.KEYCLOAK_VERSION < '22.0.0' }}
run: |
echo "JAVAX_PROFILE=-Ppre-keycloak22" >> $GITHUB_ENV
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} ${ADJUSTED_RESTEASY_VERSION} clean verify ${JAVAX_PROFILE}
run: ./mvnw ${MAVEN_CLI_OPTS} ${ADJUSTED_RESTEASY_VERSION} clean verify ${COMPATIBILITY_PROFILE} -Djava.version=${{ matrix.java }}

build-legacy:
runs-on: ubuntu-latest
Expand All @@ -194,45 +206,42 @@ jobs:
fail-fast: false
matrix:
env:
- KEYCLOAK_VERSION: 21.1.1
- KEYCLOAK_VERSION: 19.0.3
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.0

- name: Setup java
uses: actions/setup-java@v3
uses: actions/setup-java@v4.4.0
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'

- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-keycloak-legacy-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-keycloak-legacy
- name: Adapt sources for Keycloak versions < 23.0.0
if: ${{ matrix.env.KEYCLOAK_VERSION < '23.0.0' }}
run: |
echo "JAVAX_PROFILE=-Ppre-keycloak23" >> $GITHUB_ENV
echo "COMPATIBILITY_PROFILE=-Ppre-keycloak23" >> $GITHUB_ENV
- name: Adapt sources for Keycloak versions < 22.0.0 (jakarta -> javax)
if: ${{ matrix.env.KEYCLOAK_VERSION < '22.0.0' }}
run: |
echo "JAVAX_PROFILE=-Ppre-keycloak22" >> $GITHUB_ENV
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="" ${ADJUSTED_RESTEASY_VERSION} clean verify ${JAVAX_PROFILE}
run: ./mvnw ${MAVEN_CLI_OPTS} -Dkeycloak.version=${{ matrix.env.KEYCLOAK_VERSION }} -Dkeycloak.dockerTagSuffix="-legacy" ${ADJUSTED_RESTEASY_VERSION} clean verify ${COMPATIBILITY_PROFILE}

lint-other-files:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.0

- name: Lint .github/workflows/*.yaml files
uses: ibiqlik/action-yamllint@v3.1
uses: ibiqlik/action-yamllint@v3.1.1
with:
strict: true
file_or_dir: .github/workflows/
Expand All @@ -247,15 +256,15 @@ jobs:
run: git fetch --prune --unshallow

- name: Set up Helm
uses: azure/setup-helm@v3.5
uses: azure/setup-helm@v4.2.0
with:
version: v3.4.0

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5.2.0
with:
python-version: 3.7

- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-chart-testing-action
Expand All @@ -274,12 +283,17 @@ jobs:
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4.1.8
with:
path: assets

- name: Write release tag without v
id: strip-v-tag
run: |
TAG=${GITHUB_REF_NAME#v}
echo Tag: $Tag
echo "::set-output name=tag::$TAG"
- name: Create Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2.0.8
with:
name: Release ${{ github.ref_name }}
draft: false
Expand All @@ -294,7 +308,7 @@ jobs:
## DockerHub
* https://hub.docker.com/r/adorsys/keycloak-config-cli/tags?name=${{ github.ref_name }}
* https://hub.docker.com/r/adorsys/keycloak-config-cli/tags?name=${{ steps.strip-v-tag.outputs.tag }}
## Quay.io
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/dependabot-merge.yaml

This file was deleted.

Loading

0 comments on commit 4d25a00

Please sign in to comment.