Skip to content

Commit adce5d1

Browse files
authored
Merge pull request #184 from com-pas/chore/update-keycloak-image-experimental-no-auth-path
chore: Update keycloak image
2 parents 2dd2cbe + 54b368c commit adce5d1

File tree

4 files changed

+20
-24
lines changed

4 files changed

+20
-24
lines changed

.github/workflows/run-integration-tests-postgresql.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232
uses: docker/setup-buildx-action@v3
3333

3434
- name: Start containers
35-
run: docker-compose -f "compas/docker-compose-postgresql.yml" up -d --build
35+
run: docker compose -f "compas/docker-compose-postgresql.yml" up -d --build
3636
env:
37-
COMPAS_HOSTNAME: compas_reverse-proxy_1
37+
COMPAS_HOSTNAME: compas-reverse-proxy-1
3838
CONFIGURATION_LOCATION: /nginx.conf
3939

4040
- name: Wait until containers started
@@ -45,11 +45,11 @@ jobs:
4545
- name: Execute integration tests (firefox)
4646
# Using the Docker Image from ppodgorsek (https://github.com/ppodgorsek/docker-robot-framework)
4747
# to run the Robot Framework Test Scripts.
48-
# To connect with the Docker Compose and use http://compas_reverse-proxy_1/ as URL we are
48+
# To connect with the Docker Compose and use http://compas-reverse-proxy-1/ as URL we are
4949
# connecting to the same network "compas_default" that's started bij Docker Compose.
5050
run: |
5151
docker run --rm -e BROWSER=firefox \
52-
-e ROBOT_OPTIONS="-v url:http://compas_reverse-proxy_1/" \
52+
-e ROBOT_OPTIONS="-v url:http://compas-reverse-proxy-1/" \
5353
-v $(pwd)/target/firefox:/opt/robotframework/reports:Z \
5454
-v $(pwd)/integration-testing:/opt/robotframework/tests:Z \
5555
--user $(id -u):$(id -g) \
@@ -61,11 +61,11 @@ jobs:
6161
- name: Execute integration tests (chromium)
6262
# Using the Docker Image from ppodgorsek (https://github.com/ppodgorsek/docker-robot-framework)
6363
# to run the Robot Framework Test Scripts.
64-
# To connect with the Docker Compose and use http://compas_reverse-proxy_1/ as URL we are
64+
# To connect with the Docker Compose and use http://compas-reverse-proxy-1/ as URL we are
6565
# connecting to the same network "compas_default" that's started bij Docker Compose.
6666
run: |
6767
docker run --rm -e BROWSER=chromium \
68-
-e ROBOT_OPTIONS="-v url:http://compas_reverse-proxy_1/" \
68+
-e ROBOT_OPTIONS="-v url:http://compas-reverse-proxy-1/" \
6969
-v $(pwd)/target/firefox:/opt/robotframework/reports:Z \
7070
-v $(pwd)/integration-testing:/opt/robotframework/tests:Z \
7171
--user $(id -u):$(id -g) \
@@ -84,4 +84,4 @@ jobs:
8484
8585
- name: Stop containers
8686
if: always()
87-
run: docker-compose -f "compas/docker-compose-postgresql.yml" down -v
87+
run: docker compose -f "compas/docker-compose-postgresql.yml" down -v

compas/docker-compose-postgresql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ services:
3333
ports:
3434
- "8089:8080"
3535
environment:
36-
- KEYCLOAK_FRONTEND_URL=http://${COMPAS_HOSTNAME}/auth/
37-
- KEYCLOAK_HOSTNAME=${COMPAS_HOSTNAME}
38-
- KEYCLOAK_HTTP_PORT=80
39-
- PROXY_ADDRESS_FORWARDING=true
36+
- KC_HOSTNAME=http://${COMPAS_HOSTNAME}/auth/
37+
- KC_HTTP_RELATIVE_PATH=auth
38+
- KC_HTTP_ENABLED=true
39+
- KC_PROXY_HEADERS=xforwarded
4040
healthcheck:
4141
test: ["CMD", "curl", "-f", "http://localhost:8080/auth/"]
4242
interval: 30s

compas/keycloak/Dockerfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
FROM jboss/keycloak:latest
5+
FROM quay.io/keycloak/keycloak:latest
66

77
ARG COMPAS_HOSTNAME
88

9-
# Copy the demo realm configuration to /tmp/ inside the container, so it can be used afterwards
10-
COPY --chown=jboss:jboss keycloak_compas_realm.json /tmp/keycloak_compas_realm.json
11-
RUN sed -i "s/##COMPAS_HOSTNAME##/${COMPAS_HOSTNAME}/g" /tmp/keycloak_compas_realm.json
9+
# Copy the demo realm configuration to /opt/keycloak/data/import inside the container, this is the default import path
10+
COPY --chown=keycloak:keycloak keycloak_compas_realm.json /opt/keycloak/data/import/keycloak_compas_realm.json
11+
RUN sed -i "s/##COMPAS_HOSTNAME##/${COMPAS_HOSTNAME}/g" /opt/keycloak/data/import/keycloak_compas_realm.json
1212

1313
# Creating an Admin account
14-
ENV KEYCLOAK_USER admin
15-
ENV KEYCLOAK_PASSWORD admin
14+
ENV KC_DB_USERNAME admin
15+
ENV KC_DB_PASSWORD admin
1616

17-
# Choosing h2 database
18-
ENV DB_VENDOR h2
19-
20-
# Import the configuration we just copied
21-
ENV KEYCLOAK_IMPORT /tmp/keycloak_compas_realm.json
17+
ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start-dev", "--import-realm"]

integration-testing/TestSuite003-cim-mapping.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ TestCase003-01
2828
Open Project from CIM ${sclname} ${scltype}
2929

3030
Select Tab Substation
31-
Get Text ${substation-editor-selector} section > h1:has-text("Sub1")
31+
Get Text ${substation-editor-selector} section > h1:has-text("af9a4ae3-ba2e-4c34-8e47-5af894ee20f4 - Sub1")
3232

3333
TestCase003-02
34-
[Documentation] Trying to create a project from Invalid CIM Filename
3534
skip
35+
[Documentation] Trying to create a project from Invalid CIM Filename
3636
Set Test Variable ${sclname} MiniGridTestConfiguration_Invalid_XML
3737

3838
${promise}= Promise To Upload File ${CURDIR}/test-files/${sclname}.xml

0 commit comments

Comments
 (0)