Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ env:
AZURITE_IMAGE: mcr.microsoft.com/azure-storage/azurite:3.35.0@sha256:647c63a91102a9d8e8000aab803436e1fc85fbb285e7ce830a82ee5d6661cf37
EVENTHUBS_EMULATOR_IMAGE: mcr.microsoft.com/azure-messaging/eventhubs-emulator:2.2.0@sha256:2c8e0d4dd93a5fc078df2721eeb3e211442d555d61293ac3972df931c6d9333a
COSMOSDB_EMULATOR_IMAGE: mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:vnext-EN20260907@sha256:2db1f9e74c506bcf6fc347aa937aea1c00fa756061296a5a9efba530ce86ec02
CONSUL_IMAGE: public.ecr.aws/hashicorp/consul:1.19
CONSUL_IMAGE: mirror.gcr.io/hashicorp/consul:1.19@sha256:e244c64df77ab3586f177f1692e98575086eb40343dc82a6320f5e79543490eb
CONSUL_FALLBACK_IMAGE: docker.io/hashicorp/consul:1.19@sha256:e244c64df77ab3586f177f1692e98575086eb40343dc82a6320f5e79543490eb
DYNAMODB_IMAGE: amazon/dynamodb-local:latest
ELASTICMQ_IMAGE: softwaremill/elasticmq-native:latest
# Keep in sync with SeaweedFSTestContainer
Expand Down Expand Up @@ -494,7 +495,14 @@ jobs:
set -euo pipefail

bash .github/scripts/docker-pull-with-retry.sh "$TESTCONTAINERS_RYUK_IMAGE"
bash .github/scripts/docker-pull-with-retry.sh "$CONSUL_IMAGE"
consul_image="$CONSUL_IMAGE"
if ! bash .github/scripts/docker-pull-with-retry.sh "$consul_image"; then
echo "Pulling Consul from Docker Hub after the mirror failed."
consul_image="$CONSUL_FALLBACK_IMAGE"
bash .github/scripts/docker-pull-with-retry.sh "$consul_image"
fi

echo "CONSUL_IMAGE=$consul_image" >> "$GITHUB_ENV"
- name: Test
uses: ./.github/actions/run-tests
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public static class ConsulTestUtils
() => EnsureConsulAndGetSkipReasonAsync().GetAwaiter().GetResult(),
LazyThreadSafetyMode.PublicationOnly);

private static readonly ConsulContainer _container = new ConsulBuilder("public.ecr.aws/hashicorp/consul:1.19")
private static readonly ConsulContainer _container = new ConsulBuilder(
Environment.GetEnvironmentVariable("CONSUL_IMAGE")
?? "mirror.gcr.io/hashicorp/consul:1.19@sha256:e244c64df77ab3586f177f1692e98575086eb40343dc82a6320f5e79543490eb")
.WithCreateParameterModifier(parameters =>
{
if (parameters.HostConfig is not null && !IsWindowsDockerDaemon())
Expand Down
Loading