-
Notifications
You must be signed in to change notification settings - Fork 643
Migrate CruiseControlMetricsReporterTest to TestContainers #2303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,11 +5,14 @@ jobs: | |
| build: | ||
| environment: | ||
| _JAVA_OPTIONS: "-Xms512m -Xmx1g" | ||
| TESTCONTAINERS_RYUK_DISABLED: "true" | ||
| working_directory: ~/workspace | ||
| docker: | ||
| - image: cimg/openjdk:17.0 | ||
| steps: | ||
| - checkout | ||
| - setup_remote_docker: | ||
| docker_layer_caching: true | ||
| - restore_cache: | ||
| key: dependency-cache-{{ checksum "build.gradle" }} | ||
| - run: | ||
|
|
@@ -19,7 +22,17 @@ jobs: | |
| command: ./gradlew --max-workers=1 --no-daemon analyze | ||
| - run: | ||
| no_output_timeout: 15m | ||
| command: ./gradlew --no-daemon -PmaxParallelForks=1 build | ||
| command: | | ||
| export NETWORK_NAME="test_containers_network" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it mandatory to create and pass down If everything works fine without those two (in case the framework creates its own ephemeral resources), I'd personally prefer not having them for the sake of simplicity. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reading the comments in
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, these variables are mandatory for allowing the CircleCI job to find/connect to the containers created by TestContainers. I have just added some comment/Javadocs to make this more clear. Let me know what you think! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. Makes sense. And the docs explain it well now. Thanks! |
||
|
|
||
| # Create a shared Docker network, required for communication between the CircleCI job container | ||
| # and TestContainers services. | ||
| docker network create $NETWORK_NAME | ||
|
|
||
| # Extract Docker host for helping CircleCI find TestContainer services. | ||
| export CONTAINER_HOST=$(docker network inspect "$NETWORK_NAME" --format='{{(index .IPAM.Config 0).Gateway}}') | ||
|
|
||
| ./gradlew --no-daemon -PmaxParallelForks=1 build | ||
| - save_cache: | ||
| key: dependency-cache-{{ checksum "build.gradle" }} | ||
| paths: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.