Skip to content

Commit 6597269

Browse files
authored
Merge branch 'master' into andrea.marziali/dbm-dynamic-service
2 parents 73656ad + 85fb033 commit 6597269

84 files changed

Lines changed: 1123 additions & 369 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Spring Boot 2.7.x is the last line that still supports Java 8, which this smoke test
2+
// exercises (see the `sourceCompatibility = '1.8'` below). Do not bump to 3.x without
3+
// also moving the smoke test off Java 8.
4+
plugins {
5+
id 'java'
6+
id 'org.springframework.boot' version '2.7.15'
7+
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
8+
}
9+
10+
def sharedRootDir = "$rootDir/../../../"
11+
def sharedConfigDirectory = "$sharedRootDir/gradle"
12+
rootProject.ext.sharedConfigDirectory = sharedConfigDirectory
13+
14+
apply from: "$sharedConfigDirectory/repositories.gradle"
15+
16+
if (hasProperty('appBuildDir')) {
17+
buildDir = property('appBuildDir')
18+
}
19+
20+
version = ""
21+
22+
java {
23+
sourceCompatibility = '1.8'
24+
}
25+
26+
if (hasProperty('apiJar')) {
27+
dependencies {
28+
implementation files(property('apiJar'))
29+
}
30+
} else {
31+
dependencies {
32+
implementation "com.datadoghq:dd-trace-api:+"
33+
}
34+
}
35+
36+
dependencies {
37+
compileOnly 'com.github.spotbugs:spotbugs-annotations:4.9.8'
38+
implementation 'org.springframework.boot:spring-boot-starter-web'
39+
// OpenTracing 0.32.0 is the last release and is intentionally pinned: this smoke test
40+
// exercises the legacy OpenTracing bridge in dd-trace-ot. Do not "upgrade" — there is
41+
// no newer version.
42+
implementation group: 'io.opentracing', name: 'opentracing-api', version: '0.32.0'
43+
implementation group: 'io.opentracing', name: 'opentracing-util', version: '0.32.0'
44+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// The `gradlePluginProxy` / `mavenRepositoryProxy` properties point to internal Maven
2+
// mirrors used by CI when the public repos are unreachable; they are forwarded from the
3+
// outer build via the smoke-test plugin. `allowInsecureProtocol` is required because the
4+
// mirrors are reached over plain HTTP inside the CI network.
5+
pluginManagement {
6+
repositories {
7+
mavenLocal()
8+
if (settings.hasProperty("gradlePluginProxy")) {
9+
maven {
10+
url settings["gradlePluginProxy"]
11+
allowInsecureProtocol = true
12+
}
13+
}
14+
if (settings.hasProperty("mavenRepositoryProxy")) {
15+
maven {
16+
url settings["mavenRepositoryProxy"]
17+
allowInsecureProtocol = true
18+
}
19+
}
20+
gradlePluginPortal()
21+
mavenCentral()
22+
}
23+
}
24+
25+
def isCI = providers.environmentVariable("CI").isPresent()
26+
27+
// On CI, point the local Gradle build cache to the shared workspace directory under the
28+
// repository root, so cache entries are reused across the many smoke-test nested builds
29+
// (and across CI jobs that mount the same workspace). See f6ec1f5cc8 / #982 for the
30+
// root-level cache, and b34ccbc048 for the `isCI` gating — locally we keep the default
31+
// per-user cache to avoid leaking entries into the repo tree.
32+
if (isCI) {
33+
def sharedRootDir = "$rootDir/../../../"
34+
buildCache {
35+
local {
36+
directory = "$sharedRootDir/workspace/build-cache"
37+
}
38+
}
39+
}
40+
41+
rootProject.name = 'apm-tracing-disabled-smoketest'

dd-smoke-tests/apm-tracing-disabled/src/main/java/datadog/smoketest/apmtracingdisabled/AppConfig.java renamed to dd-smoke-tests/apm-tracing-disabled/application/src/main/java/datadog/smoketest/apmtracingdisabled/AppConfig.java

File renamed without changes.

dd-smoke-tests/apm-tracing-disabled/src/main/java/datadog/smoketest/apmtracingdisabled/Controller.java renamed to dd-smoke-tests/apm-tracing-disabled/application/src/main/java/datadog/smoketest/apmtracingdisabled/Controller.java

File renamed without changes.

dd-smoke-tests/apm-tracing-disabled/src/main/java/datadog/smoketest/apmtracingdisabled/SpringbootApplication.java renamed to dd-smoke-tests/apm-tracing-disabled/application/src/main/java/datadog/smoketest/apmtracingdisabled/SpringbootApplication.java

File renamed without changes.
Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,32 @@
1-
import org.springframework.boot.gradle.tasks.bundling.BootJar
2-
31
plugins {
4-
id 'java'
5-
id 'org.springframework.boot' version '2.7.15'
6-
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
2+
id 'dd-trace-java.smoke-test-app'
73
id 'java-test-fixtures'
84
}
95

106
apply from: "$rootDir/gradle/java.gradle"
11-
apply from: "$rootDir/gradle/spring-boot-plugin.gradle"
7+
128
description = 'ASM Standalone Billing Tests.'
139

14-
java {
15-
sourceCompatibility = '1.8'
10+
smokeTestApp {
11+
application {
12+
taskName = 'bootJar'
13+
artifactPath = 'libs/apm-tracing-disabled-smoketest.jar'
14+
sysProperty = 'datadog.smoketest.springboot.shadowJar.path'
15+
}
16+
projectJar('apiJar', project(':dd-trace-api'))
1617
}
1718

1819
dependencies {
19-
implementation 'org.springframework.boot:spring-boot-starter-web'
20-
implementation group: 'io.opentracing', name: 'opentracing-api', version: '0.32.0'
21-
implementation group: 'io.opentracing', name: 'opentracing-util', version: '0.32.0'
22-
implementation project(':dd-trace-api')
2320
testImplementation project(':dd-smoke-tests')
2421
testImplementation(testFixtures(project(":dd-smoke-tests:iast-util")))
2522
}
2623

27-
tasks.withType(Test).configureEach {
28-
def bootJarTask = tasks.named('bootJar', BootJar)
29-
dependsOn bootJarTask
30-
jvmArgumentProviders.add(new CommandLineArgumentProvider() {
31-
@Override
32-
Iterable<String> asArguments() {
33-
return bootJarTask.map { ["-Ddatadog.smoketest.springboot.shadowJar.path=${it.archiveFile.get()}"] }.get()
34-
}
35-
})
24+
spotless {
25+
java {
26+
target "**/*.java"
27+
}
28+
29+
groovyGradle {
30+
target '*.gradle', "**/*.gradle"
31+
}
3632
}

dd-smoke-tests/datastreams/kafkaschemaregistry/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
33
plugins {
44
id 'com.gradleup.shadow'
55
id 'java'
6-
id 'org.springframework.boot' version '2.6.3'
76
}
87

98
apply from: "$rootDir/gradle/java.gradle"
10-
apply from: "$rootDir/gradle/spring-boot-plugin.gradle"
119
description = 'Kafka Smoke Tests.'
1210

1311
tasks.named("jar", Jar) {
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Spring Boot 2.7.x is the last line that still supports Java 8, which this smoke test
2+
// exercises (see the Java 8 `sourceCompatibility` below). Do not bump to 3.x without
3+
// also moving the smoke test off Java 8.
4+
plugins {
5+
id 'java'
6+
id 'org.springframework.boot' version '2.7.15'
7+
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
8+
}
9+
10+
def sharedRootDir = "$rootDir/../../../"
11+
def sharedConfigDirectory = "$sharedRootDir/gradle"
12+
rootProject.ext.sharedConfigDirectory = sharedConfigDirectory
13+
14+
apply from: "$sharedConfigDirectory/repositories.gradle"
15+
16+
if (hasProperty('appBuildDir')) {
17+
buildDir = property('appBuildDir')
18+
}
19+
20+
version = ""
21+
22+
// Pin bytecode target: the nested daemon now runs on JDK 21, but the smoke test launches
23+
// the produced jar on Java 8.
24+
java {
25+
sourceCompatibility = JavaVersion.VERSION_1_8
26+
}
27+
28+
// `iastUtilJar` is wired up by the outer `smokeTestApp { projectJar('iastUtilJar', ...) }`
29+
// block in ../build.gradle: it passes the path of the built `:dd-smoke-tests:iast-util`
30+
// jar into this nested build as a Gradle property. We add it as a flat-file dependency
31+
// because the outer build's projects are not addressable from inside the nested build.
32+
if (hasProperty('iastUtilJar')) {
33+
dependencies {
34+
implementation files(property('iastUtilJar'))
35+
}
36+
}
37+
38+
dependencies {
39+
implementation('org.springframework.boot:spring-boot-starter-web')
40+
implementation('org.springframework.boot:spring-boot-starter-actuator')
41+
implementation('org.springframework.kafka:spring-kafka')
42+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// The `gradlePluginProxy` / `mavenRepositoryProxy` properties point to internal Maven
2+
// mirrors used by CI when the public repos are unreachable; they are forwarded from the
3+
// outer build via the smoke-test plugin. `allowInsecureProtocol` is required because the
4+
// mirrors are reached over plain HTTP inside the CI network.
5+
pluginManagement {
6+
repositories {
7+
mavenLocal()
8+
if (settings.hasProperty("gradlePluginProxy")) {
9+
maven {
10+
url settings["gradlePluginProxy"]
11+
allowInsecureProtocol = true
12+
}
13+
}
14+
if (settings.hasProperty("mavenRepositoryProxy")) {
15+
maven {
16+
url settings["mavenRepositoryProxy"]
17+
allowInsecureProtocol = true
18+
}
19+
}
20+
gradlePluginPortal()
21+
mavenCentral()
22+
}
23+
}
24+
25+
def isCI = providers.environmentVariable("CI").isPresent()
26+
27+
// On CI, point the local Gradle build cache to the shared workspace directory under the
28+
// repository root, so cache entries are reused across the many smoke-test nested builds
29+
// (and across CI jobs that mount the same workspace). See f6ec1f5cc8 / #982 for the
30+
// root-level cache, and b34ccbc048 for the `isCI` gating — locally we keep the default
31+
// per-user cache to avoid leaking entries into the repo tree.
32+
if (isCI) {
33+
def sharedRootDir = "$rootDir/../../../"
34+
buildCache {
35+
local {
36+
directory = "$sharedRootDir/workspace/build-cache"
37+
}
38+
}
39+
}
40+
41+
rootProject.name = 'kafka-2-smoketest'

dd-smoke-tests/kafka-2/src/main/java/datadog/smoketest/kafka/KafkaApplication.java renamed to dd-smoke-tests/kafka-2/application/src/main/java/datadog/smoketest/kafka/KafkaApplication.java

File renamed without changes.

0 commit comments

Comments
 (0)