Skip to content

Commit ecb080a

Browse files
authored
Merge branch 'develop' into feature/add-lowkey-vault-support
2 parents c008181 + 8470afd commit ecb080a

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

docs/cicd/index.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,23 @@ services:
2020
variables:
2121
DOCKER_HOST: tcp://docker:2375
2222
```
23+
24+
## Bitbucket Pipelines
25+
26+
Enable Bitbucket Pipelines as usual on the **Repository settings → Pipelines → Settings** page. After enabling your pipeline, replace the contents of the `bitbucket-pipelines.yml` file, located at the root of your repository, with the following:
27+
28+
```yml
29+
image: mcr.microsoft.com/dotnet/sdk:8.0
30+
options:
31+
docker: true
32+
pipelines:
33+
default:
34+
- step:
35+
script:
36+
# Bitbucket Pipelines does not support Ryuk:
37+
# https://dotnet.testcontainers.org/api/resource_reaper/.
38+
- export TESTCONTAINERS_RYUK_DISABLED=true
39+
- dotnet test
40+
services:
41+
- docker
42+
```

src/Testcontainers.Keycloak/KeycloakBuilder.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ private KeycloakBuilder(KeycloakConfiguration resourceConfiguration)
4444
public KeycloakBuilder WithUsername(string username)
4545
{
4646
return Merge(DockerResourceConfiguration, new KeycloakConfiguration(username: username))
47+
.WithEnvironment("KC_BOOTSTRAP_ADMIN_USERNAME", username)
4748
.WithEnvironment("KEYCLOAK_ADMIN", username);
4849
}
4950

@@ -55,6 +56,7 @@ public KeycloakBuilder WithUsername(string username)
5556
public KeycloakBuilder WithPassword(string password)
5657
{
5758
return Merge(DockerResourceConfiguration, new KeycloakConfiguration(password: password))
59+
.WithEnvironment("KC_BOOTSTRAP_ADMIN_PASSWORD", password)
5860
.WithEnvironment("KEYCLOAK_ADMIN_PASSWORD", password);
5961
}
6062

tests/Testcontainers.Keycloak.Tests/KeycloakContainerTest.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,13 @@ public KeycloakV25Configuration()
6565
{
6666
}
6767
}
68+
69+
[UsedImplicitly]
70+
public sealed class KeycloakV26Configuration : KeycloakContainerTest
71+
{
72+
public KeycloakV26Configuration()
73+
: base(new KeycloakBuilder().WithImage("quay.io/keycloak/keycloak:26.0").Build())
74+
{
75+
}
76+
}
6877
}

0 commit comments

Comments
 (0)