-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathjustfile
More file actions
70 lines (57 loc) · 2.04 KB
/
justfile
File metadata and controls
70 lines (57 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
set quiet
# Default recipe to display help information
[private]
default:
just --list --unsorted
# Build the docker image
[private]
[no-exit-message]
build-docker:
docker build --file="infra/Dockerfile" --tag="keycloak-spi-plugin" .
# Build the project with default Keycloak version
[no-exit-message]
build: build-docker
docker run --rm --volume="${PWD}:/opt/maven" keycloak-spi-plugin mvn -B clean package
# Run unit tests
[no-exit-message]
test: build-docker
docker run --rm --volume="${PWD}:/opt/maven" keycloak-spi-plugin mvn -B test -DskipTests=false
# Build for a specific Keycloak version
build-version VERSION: build-docker
docker run --rm --volume="${PWD}:/opt/maven" keycloak-spi-plugin mvn -B clean package -P keycloak-{{VERSION}}
# Start Keycloak with the authenticator
up:
docker compose up
# Stop Keycloak and clean up
down:
docker compose down
# Watch the Keycloak logs
logs:
docker compose logs -f keycloak
# Start a shell in the Keycloak container
shell:
docker compose exec keycloak bash
# List all available Keycloak versions
versions:
@echo "Supported Keycloak versions:"
@echo "- 26.5.4 (default)"
@echo "- 26.4.7"
@echo "- 26.3.5"
@echo "- 26.2.5"
# Run E2E tests (optionally specify a file pattern, requires test-e2e-setup if FILE is provided)
test-e2e KC_VERSION="26.5.4" FILE="": (build-version KC_VERSION)
#!/usr/bin/env bash
cd tests/e2e
if [ -z "{{FILE}}" ]; then
KC_VERSION={{KC_VERSION}} docker compose --profile test up --build --abort-on-container-exit --exit-code-from test-runner; rc=$?
KC_VERSION={{KC_VERSION}} docker compose --profile test down
exit $rc
else
docker compose run --rm test-runner npx playwright test {{FILE}}
fi
# Start test infrastructure only (for debugging or running specific tests)
test-e2e-setup KC_VERSION="26.5.4": (build-version KC_VERSION)
cd tests/e2e && KC_VERSION={{KC_VERSION}} docker compose up -d --wait
# Stop test containers
test-e2e-down:
cd tests/e2e && docker compose --profile test down