Skip to content

Commit

Permalink
Merge branch 'main' into add_timeplus_container
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasmine-ge authored Aug 13, 2024
2 parents 69a6974 + b27316d commit b29c4a9
Show file tree
Hide file tree
Showing 175 changed files with 2,052 additions and 479 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ body:
- Dynalite
- Elasticsearch
- GCloud
- Grafana
- HiveMQ
- InfluxDB
- K3S
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ body:
- Dynalite
- Elasticsearch
- GCloud
- Grafana
- HiveMQ
- InfluxDB
- K3S
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ body:
- Dynalite
- Elasticsearch
- GCloud
- Grafana
- HiveMQ
- InfluxDB
- K3S
Expand Down Expand Up @@ -84,7 +85,7 @@ body:
id: benefit
attributes:
label: Benefit
description: What's the benefit of addng this feature to the project?
description: What's the benefit of adding this feature to the project?
validations:
required: true
- type: textarea
Expand Down
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ updates:
update-types: [ "version-update:semver-minor", "version-update:semver-patch" ]
- dependency-name: "org.apache.commons:commons-compress"
update-types: [ "version-update:semver-minor" ]
- dependency-name: "org.awaitility:awaitility"
update-types: [ "version-update:semver-patch" ]
- package-ecosystem: "gradle"
directory: "/"
allow:
Expand Down Expand Up @@ -76,6 +78,9 @@ updates:
schedule:
interval: "weekly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "org.awaitility:awaitility"
update-types: [ "version-update:semver-patch" ]
- package-ecosystem: "gradle"
directory: "/modules/cratedb"
schedule:
Expand Down Expand Up @@ -106,6 +111,11 @@ updates:
schedule:
interval: "weekly"
open-pull-requests-limit: 10
- package-ecosystem: "gradle"
directory: "/modules/grafana"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
- package-ecosystem: "gradle"
directory: "/modules/hivemq"
schedule:
Expand All @@ -116,6 +126,9 @@ updates:
schedule:
interval: "weekly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "com.influxdb:influxdb-java-client"
update-types: [ "version-update:semver-major" ]
- package-ecosystem: "gradle"
directory: "/modules/jdbc"
schedule:
Expand Down Expand Up @@ -272,6 +285,9 @@ updates:
schedule:
interval: "weekly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "org.awaitility:awaitility"
update-types: [ "version-update:semver-patch" ]
- package-ecosystem: "gradle"
directory: "/modules/r2dbc"
schedule:
Expand Down Expand Up @@ -306,6 +322,8 @@ updates:
ignore:
- dependency-name: "org.apache.qpid:qpid-jms-client"
update-types: [ "version-update:semver-major" ]
- dependency-name: "org.awaitility:awaitility"
update-types: [ "version-update:semver-patch" ]
- package-ecosystem: "gradle"
directory: "/modules/solr"
schedule:
Expand Down Expand Up @@ -376,6 +394,20 @@ updates:
update-types: [ "version-update:semver-major" ]
- dependency-name: "com.diffplug.spotless"
update-types: [ "version-update:semver-minor" ]
- dependency-name: "com.hazelcast:hazelcast"
update-types: [ "version-update:semver-minor" ]

# Smoke test
- package-ecosystem: "gradle"
directory: "/smoke-test"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
ignore:
- dependency-name: "ch.qos.logback:logback-classic"
update-types: [ "version-update:semver-minor" ]
- dependency-name: "com.diffplug.spotless"
update-types: [ "version-update:semver-minor" ]

# GitHub Actions
- package-ecosystem: "github-actions"
Expand Down
8 changes: 8 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
- core/src/main/java/org/testcontainers/containers/ComposeDelegate.java
- core/src/main/java/org/testcontainers/containers/DockerComposeContainer.java
- core/src/main/java/org/testcontainers/containers/DockerComposeFiles.java
- core/src/test/java/org/testcontainers/containers/Compose*Test.java
- core/src/test/java/org/testcontainers/containers/DockerCompose*Test.java
- core/src/test/java/org/testcontainers/junit/Compose*Test.java
- core/src/test/java/org/testcontainers/junit/DockerCompose*Test.java
"github_actions":
- changed-files:
- any-glob-to-any-file:
Expand Down Expand Up @@ -67,6 +71,10 @@
- changed-files:
- any-glob-to-any-file:
- modules/gcloud/**/*
"modules/grafana":
- changed-files:
- any-glob-to-any-file:
- modules/grafana/**/*
"modules/hivemq":
- changed-files:
- any-glob-to-any-file:
Expand Down
3 changes: 3 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ labels:
- name: modules/gcloud
color: '#006b75'

- name: modules/grafana
color: '#006b75'

- name: modules/hivemq
color: '#006b75'

Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI - Windows

on:
pull_request:
paths-ignore:
- '.github/ISSUE_TEMPLATE/*.yaml'
- '.github/CODEOWNERS'
- '.github/pull_request_template.md'
- 'docs/**/*.css'
- 'docs/**/*.html'
- 'docs/**/*.ico'
- 'docs/**/*.md'
- 'docs/**/*.png'
- 'docs/**/*.svg'
- 'mkdocs.yml'
- 'README.md'
- 'RELEASING.md'
- '.sdkmanrc'
push:
branches: [ main ]
paths-ignore:
- '.github/ISSUE_TEMPLATE/*.yaml'
- '.github/CODEOWNERS'
- '.github/pull_request_template.md'
- 'docs/**/*.css'
- 'docs/**/*.html'
- 'docs/**/*.ico'
- 'docs/**/*.md'
- 'docs/**/*.png'
- 'docs/**/*.svg'
- 'mkdocs.yml'
- 'README.md'
- 'RELEASING.md'
- '.sdkmanrc'

concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.sha }}"
cancel-in-progress: true

permissions:
contents: read

jobs:
core:
runs-on: self-hosted
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- name: Build with Gradle
run: ./gradlew.bat cleanTest testcontainers:test --no-daemon --continue --scan --no-build-cache
- uses: ./.github/actions/setup-junit-report
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ permissions:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}

jobs:
core:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/combine-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
steps:
- name: combine-prs
id: combine-prs
uses: github/combine-prs@v5.0.0
uses: github/combine-prs@v5.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
58 changes: 58 additions & 0 deletions .github/workflows/moby-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Tests against recent Docker engine releases

on:
workflow_dispatch:
schedule:
# nightly build, at 23:59 CEST
- cron: '59 23 * * *'

jobs:
test_docker:
strategy:
matrix:
install-docker-type: ["STABLE", "ROOTLESS", "ROOTFUL"]
name: "Core tests using Docker ${{ matrix.install-docker-type }}"
runs-on: ubuntu-22.04
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build

- name: Install Stable Docker
if: ${{ matrix.install-docker-type == 'STABLE' }}
run: curl https://get.docker.com

- name: Install Docker from the TEST channel
if: ${{ matrix.install-docker-type == 'ROOTFUL' }}
run: curl https://get.docker.com | CHANNEL=test sh

- name: Setup rootless Docker
if: ${{ matrix.install-docker-type == 'ROOTLESS' }}
uses: ScribeMD/rootless-docker@6bd157a512c2fafa4e0243a8aa87d964eb890886 # v0.2.2

- name: Remove Docker root socket
if: ${{ matrix.install-docker-type == 'ROOTLESS' }}
run: sudo rm -rf /var/run/docker.sock

- name: Check Docker version
run: docker version

- name: Build with Gradle
run: ./gradlew cleanTest --no-daemon --continue --scan -Dscan.tag.DOCKER_${{ matrix.install-docker-type }} testcontainers:test -Dorg.gradle.caching=false
- uses: ./.github/actions/setup-junit-report

- name: Notify to Slack on failures
if: failure()
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"tc_project": "testcontainers-java",
"tc_docker_install_type": "${{ matrix.install-docker-type }}",
"tc_github_action_url": "https://github.com/testcontainers/testcontainers-java/actions/runs/${{ env.GITHUB_RUN_ID }}/job/${{ env.GITHUB_RUN_NUMBER }}",
"tc_github_action_status": "FAILED",
"tc_slack_channel_id": "${{ secrets.SLACK_DOCKER_LATEST_CHANNEL_ID }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DOCKER_LATEST_WEBHOOK }}
2 changes: 1 addition & 1 deletion .github/workflows/update-docs-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sed -i "s/latest_version: .*/latest_version: ${GITHUB_REF##*/}/g" mkdocs.yml
git diff
- name: Create Pull Request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v3.10.1
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v3.10.1
with:
title: Update docs version to ${GITHUB_REF##*/}
body: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-testcontainers-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
sed -i "s/^testcontainers\.version=.*/testcontainers\.version=${GITHUB_REF##*/}/g" gradle.properties
git diff
- name: Create Pull Request
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v3.10.1
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v3.10.1
with:
title: Update testcontainers version to ${GITHUB_REF##*/}
body: |
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ buildscript {

dependencies {
// https://github.com/melix/japicmp-gradle-plugin/issues/36
classpath 'com.google.guava:guava:32.1.2-jre'
classpath 'com.google.guava:guava:33.2.1-jre'
classpath 'com.github.tjni.captainhook:captain-hook:0.1.5'
}
}

plugins {
id 'io.franzbecker.gradle-lombok' version '5.0.0'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'me.champeau.gradle.japicmp' version '0.4.2' apply false
id 'me.champeau.gradle.japicmp' version '0.4.3' apply false
id 'com.diffplug.spotless' version '6.13.0' apply false
}

Expand Down Expand Up @@ -88,7 +88,7 @@ subprojects {
}
ext.isCI = System.getenv("CI") != null
if (isCI) {
retry {
develocity.testRetry {
maxRetries = 2
maxFailures = 5
failOnPassedAfterRetry = false
Expand Down
13 changes: 7 additions & 6 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ dependencies {
exclude group: 'org.apache.commons', module: 'commons-compress'
}

shaded 'org.awaitility:awaitility:4.2.1'
shaded 'org.awaitility:awaitility:4.2.0'

api platform('com.github.docker-java:docker-java-bom:3.3.6')
shaded platform('com.github.docker-java:docker-java-bom:3.3.6')
api platform('com.github.docker-java:docker-java-bom:3.4.0')
shaded platform('com.github.docker-java:docker-java-bom:3.4.0')

api "com.github.docker-java:docker-java-api"

Expand All @@ -99,7 +99,7 @@ dependencies {

api 'com.github.docker-java:docker-java-transport-zerodep'

shaded 'com.google.guava:guava:33.2.0-jre'
shaded 'com.google.guava:guava:33.2.1-jre'
shaded "org.yaml:snakeyaml:1.33"

shaded 'org.glassfish.main.external:trilead-ssh2-repackaged:4.1.2'
Expand All @@ -120,12 +120,13 @@ dependencies {
// Synthetic JAR used for MountableFileTest and DirectoryTarResourceTest
testImplementation files('testlib/repo/fakejar/fakejar/0/fakejar-0.jar')

testImplementation 'org.assertj:assertj-core:3.25.3'
testImplementation 'org.assertj:assertj-core:3.26.3'
testImplementation 'io.rest-assured:rest-assured:5.5.0'

jarFileTestCompileOnly "org.projectlombok:lombok:${lombok.version}"
jarFileTestAnnotationProcessor "org.projectlombok:lombok:${lombok.version}"
jarFileTestImplementation 'junit:junit:4.13.2'
jarFileTestImplementation 'org.assertj:assertj-core:3.25.3'
jarFileTestImplementation 'org.assertj:assertj-core:3.26.3'
jarFileTestImplementation 'org.ow2.asm:asm-debug-all:5.2'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.testcontainers;

import java.net.URI;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Path;
Expand All @@ -14,7 +16,8 @@ public abstract class AbstractJarFileTest {
static {
try {
Path jarFilePath = Paths.get(System.getProperty("jarFile"));
URI jarFileUri = new URI("jar", jarFilePath.toUri().toString(), null);
String decodedPath = URLDecoder.decode(jarFilePath.toUri().toString(), StandardCharsets.UTF_8.name());
URI jarFileUri = new URI("jar", decodedPath, null);
FileSystem fileSystem = FileSystems.newFileSystem(jarFileUri, Collections.emptyMap());
root = fileSystem.getPath("/");
} catch (Exception e) {
Expand Down
Loading

0 comments on commit b29c4a9

Please sign in to comment.