Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 29 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ permissions:
contents: read

jobs:

# Generate version compatibility matrix in a separate job to avoid multiline secret masking issues.
version-compatibility:
name: Version Compatibility Matrix
Expand Down Expand Up @@ -106,7 +105,6 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}


build:
name: Build
if: needs.conditional.outputs.ci == 'true'
Expand Down Expand Up @@ -186,7 +184,7 @@ jobs:
name: Integration test setup
uses: ./.github/actions/integration-test-setup
with:
jdk-version: '21'
jdk-version: "21"

- name: Build adapter distributions
run: ./mvnw install -DskipTests -f distribution/pom.xml
Expand Down Expand Up @@ -219,7 +217,7 @@ jobs:
name: Integration test setup
uses: ./.github/actions/integration-test-setup
with:
jdk-version: '21'
jdk-version: "21"

- name: Build adapter distributions
run: ./mvnw install -DskipTests -f distribution/pom.xml
Expand Down Expand Up @@ -247,7 +245,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
os: [ubuntu-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -354,8 +352,7 @@ jobs:
fi

- name: Build with JDK
run:
./mvnw install -e -DskipTests -DskipExamples -DskipProtoLock=true
run: ./mvnw install -e -DskipTests -DskipExamples -DskipProtoLock=true

- name: Run unit tests
run: |
Expand Down Expand Up @@ -429,7 +426,7 @@ jobs:

external-infinispan-tests:
name: External Infinispan IT
needs: [ build, conditional ]
needs: [build, conditional]
if: needs.conditional.outputs.ci-store == 'true'
runs-on: ubuntu-latest
timeout-minutes: 150
Expand Down Expand Up @@ -464,7 +461,7 @@ jobs:

stateless-tests:
name: Stateless IT
needs: [ build, conditional ]
needs: [build, conditional]
if: needs.conditional.outputs.ci-store == 'true'
runs-on: ubuntu-latest
timeout-minutes: 150
Expand All @@ -482,7 +479,7 @@ jobs:
./mvnw test ${{ env.SUREFIRE_RETRY }} -Pauth-server-quarkus -Dauth.server.feature=stateless -Dtest=$TESTS -pl testsuite/integration-arquillian/tests/base 2>&1 | misc/log/trimmer.sh

- name: Run new base tests without caches
run: |
run: |
./mvnw package -f tests/pom.xml -Dtest=StatelessTestSuite

- uses: ./.github/actions/upload-flaky-tests
Expand Down Expand Up @@ -517,20 +514,20 @@ jobs:
run: |
AWS_REGION=us-east-1
echo "AWS Region: ${AWS_REGION}"

aws configure set aws_access_key_id "${AWS_ACCESS_KEY_ID}"
aws configure set aws_secret_access_key "${AWS_SECRET_ACCESS_KEY}"
aws configure set region ${AWS_REGION}

AURORA_CLUSTER_NAME="gh-action-$(git rev-parse --short HEAD)-${{ github.run_id }}-${{ github.run_attempt }}"
PASS=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 13; echo)
echo "::add-mask::${PASS}"

echo "aurora-cluster-name=${AURORA_CLUSTER_NAME}" >> $GITHUB_OUTPUT
echo "aurora-cluster-password=${PASS}" >> $GITHUB_OUTPUT
echo "region=${AWS_REGION}" >> $GITHUB_OUTPUT
curl --fail-with-body https://truststore.pki.rds.amazonaws.com/${AWS_REGION}/${AWS_REGION}-bundle.pem -o aws.pem

JDBC_PARAMS='?ssl=true&sslmode=verify-ca&sslrootcert=/opt/keycloak/aws.pem'
echo "jdbc_params=${JDBC_PARAMS}" >> $GITHUB_OUTPUT

Expand All @@ -551,7 +548,7 @@ jobs:
AWS_REGION=${{ steps.aurora-init.outputs.region }}
EC2_CLUSTER_NAME=keycloak_$(git rev-parse --short HEAD)
echo "ec2_cluster=${EC2_CLUSTER_NAME}" >> $GITHUB_OUTPUT

git archive --format=zip --output /tmp/keycloak.zip $GITHUB_REF
zip -u /tmp/keycloak.zip aws.pem
tar -C ~/ -czvf /tmp/m2.tar.gz .m2
Expand Down Expand Up @@ -605,11 +602,11 @@ jobs:
- name: Clear Aurora DB schema
id: aurora-clear-db-schema
run: |
EC2_CLUSTER_NAME=${{ steps.ec2-create.outputs.ec2_cluster }}
AWS_REGION=${{ steps.aurora-init.outputs.region }}
cd .github/scripts/ansible
./mvn_remote_runner.sh ${AWS_REGION} ${EC2_CLUSTER_NAME} "-Pexecute-sql -f tests/base/pom.xml sql:execute@clear-schema-psql -Dautocommit=true -Ddriver=software.amazon.jdbc.Driver -Durl=\"jdbc:aws-wrapper:postgresql://${{ steps.aurora-create.outputs.endpoint }}/keycloak${{ steps.aurora-init.outputs.jdbc_params }}\" -Dusername=keycloak -Dpassword=${{ steps.aurora-init.outputs.aurora-cluster-password }}"
EC2_CLUSTER_NAME=${{ steps.ec2-create.outputs.ec2_cluster }}
AWS_REGION=${{ steps.aurora-init.outputs.region }}

cd .github/scripts/ansible
./mvn_remote_runner.sh ${AWS_REGION} ${EC2_CLUSTER_NAME} "-Pexecute-sql -f tests/base/pom.xml sql:execute@clear-schema-psql -Dautocommit=true -Ddriver=software.amazon.jdbc.Driver -Durl=\"jdbc:aws-wrapper:postgresql://${{ steps.aurora-create.outputs.endpoint }}/keycloak${{ steps.aurora-init.outputs.jdbc_params }}\" -Dusername=keycloak -Dpassword=${{ steps.aurora-init.outputs.aurora-cluster-password }}"

- name: Run Aurora new database tests on EC2
id: aurora-new-integration-tests
Expand Down Expand Up @@ -792,11 +789,11 @@ jobs:
- name: Clear Azure DB schema
id: azure-clear-db-schema
run: |
AZ_VM_CLUSTER_NAME=${{ steps.vm-create.outputs.az_vm_cluster }}
AZURE_REGION=${{ steps.azure-init.outputs.region }}
cd .github/scripts/ansible
./mvn_remote_runner.sh ${AZURE_REGION} ${AZ_VM_CLUSTER_NAME} "-Pexecute-sql -f tests/base/pom.xml sql:execute@clear-schema-mssql -Dautocommit=true -Ddriver=com.microsoft.sqlserver.jdbc.SQLServerDriver -Durl=\"jdbc:sqlserver://${{ steps.azure-create.outputs.endpoint }}:1433;databaseName=${{ steps.azure-create.outputs.db }};encrypt=true;trustServerCertificate=false\" -Dusername=${{ steps.azure-create.outputs.username }} -Dpassword=${{ env.AZURE_DB_PASSWORD }}"
AZ_VM_CLUSTER_NAME=${{ steps.vm-create.outputs.az_vm_cluster }}
AZURE_REGION=${{ steps.azure-init.outputs.region }}

cd .github/scripts/ansible
./mvn_remote_runner.sh ${AZURE_REGION} ${AZ_VM_CLUSTER_NAME} "-Pexecute-sql -f tests/base/pom.xml sql:execute@clear-schema-mssql -Dautocommit=true -Ddriver=com.microsoft.sqlserver.jdbc.SQLServerDriver -Durl=\"jdbc:sqlserver://${{ steps.azure-create.outputs.endpoint }}:1433;databaseName=${{ steps.azure-create.outputs.db }};encrypt=true;trustServerCertificate=false\" -Dusername=${{ steps.azure-create.outputs.username }} -Dpassword=${{ env.AZURE_DB_PASSWORD }}"

- name: Run Azure new database tests on VM
id: azure-new-integration-tests
Expand All @@ -822,7 +819,7 @@ jobs:
results=(files/keycloak/results/*)
rsync -a $results/* ../../../
rm -rf $results

exit $MVN_EXIT

- uses: ./.github/actions/upload-flaky-tests
Expand Down Expand Up @@ -861,7 +858,7 @@ jobs:
name: Run Store Integration Tests - ${{ matrix.db }}
uses: ./.github/actions/run-store-tests
with:
db: ${{ matrix.db }}
db: ${{ matrix.db }}

store-integration-tests-additional:
name: Store IT (additional)
Expand Down Expand Up @@ -1032,7 +1029,9 @@ jobs:
name: WebAuthn IT
if: needs.conditional.outputs.ci-webauthn == 'true'
runs-on: ubuntu-latest
needs: build
needs:
- conditional
- build
timeout-minutes: 45
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down Expand Up @@ -1138,8 +1137,8 @@ jobs:
timeout-minutes: 45
strategy:
matrix:
old-version: [ 24.0.4 ]
database: [ mssql ]
old-version: [24.0.4]
database: [mssql]
fail-fast: false
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand Down