Skip to content

Commit 010d249

Browse files
authored
Merge branch 'master' into alejandro.gonzalez/set-fixed-last-version-org-json
2 parents 512944b + b1b0ab3 commit 010d249

42 files changed

Lines changed: 817 additions & 8 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.

.gitlab-ci.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ stages:
2020
- generate-signing-key
2121

2222
variables:
23+
# Gitlab runner features; see https://docs.gitlab.com/runner/configuration/feature-flags.html
24+
# Fold and time all script sections
25+
FF_SCRIPT_SECTIONS: 1
26+
2327
REGISTRY: 486234852809.dkr.ecr.us-east-1.amazonaws.com
2428
BUILD_JOB_NAME: "build"
2529
DEPENDENCY_CACHE_POLICY: pull
@@ -132,9 +136,18 @@ default:
132136
policy: $BUILD_CACHE_POLICY
133137
before_script:
134138
- source .gitlab/gitlab-utils.sh
135-
- export GRADLE_USER_HOME=`pwd`/.gradle
139+
- export GRADLE_USER_HOME=$(pwd)/.gradle
140+
- |
141+
# Don't put jvm args here as it will be picked up by child gradle processes used in tests
142+
cat << EOF > $GRADLE_USER_HOME/gradle.properties
143+
mavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY
144+
gradlePluginProxy=$GRADLE_PLUGIN_PROXY
145+
EOF
146+
- |
147+
# replace maven central part by MAVEN_REPOSITORY_PROXY in .mvn/wrapper/maven-wrapper.properties
148+
sed -i "s|https://repo.maven.apache.org/maven2/|$MAVEN_REPOSITORY_PROXY|g" .mvn/wrapper/maven-wrapper.properties
136149
- export GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx$GRADLE_MEM -Xms$GRADLE_MEM -XX:ErrorFile=/tmp/hs_err_pid%p.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp'"
137-
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS -PmavenRepositoryProxy=$MAVEN_REPOSITORY_PROXY -PgradlePluginProxy=$GRADLE_PLUGIN_PROXY"
150+
- export GRADLE_ARGS=" --build-cache --stacktrace --no-daemon --parallel --max-workers=$GRADLE_WORKERS"
138151
- *normalize_node_index
139152
# for weird reasons, gradle will always "chmod 700" the .gradle folder
140153
# with Gitlab caching, .gradle is always owned by root and thus gradle's chmod invocation fails
@@ -361,7 +374,7 @@ muzzle:
361374
- ./gradlew writeMuzzleTasksToFile $GRADLE_ARGS
362375
- sort workspace/build/muzzleTasks > sortedMuzzleTasks
363376
- split --number=l/$NORMALIZED_NODE_TOTAL --suffix-length=1 --numeric-suffixes sortedMuzzleTasks muzzleSplit
364-
- ./gradlew `cat muzzleSplit${NORMALIZED_NODE_INDEX} | xargs` $GRADLE_ARGS
377+
- ./gradlew $(cat muzzleSplit${NORMALIZED_NODE_INDEX} | xargs) $GRADLE_ARGS
365378
after_script:
366379
- *cgroup_info
367380
- source .gitlab/gitlab-utils.sh

.gitlab/one-pipeline.locked.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# DO NOT EDIT THIS FILE MANUALLY
22
# This file is auto-generated by automation.
33
include:
4-
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/05e116339b9780a138a474d0348e97debfca97f27bbc4ca489cf4e4c90d9cc94/one-pipeline.yml
4+
- remote: https://gitlab-templates.ddbuild.io/libdatadog/one-pipeline/ca/f2050f53c1f5aed62a24e6b406c746e7d593230ce02b5d56d2a2296db763ebf4/one-pipeline.yml

dd-smoke-tests/gradle/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ test {
1818
events "passed", "skipped", "failed", "standardOut", "standardError"
1919
}
2020

21+
if (project.hasProperty("mavenRepositoryProxy")) {
22+
// propagate proxy URL to tests, to then propagate it to nested Gradle builds
23+
environment "MAVEN_REPOSITORY_PROXY", project.property("mavenRepositoryProxy")
24+
}
25+
2126
// overriding the default timeout of 9 minutes set in configure_tests.gradle,
2227
// as Gradle smoke tests might run for a longer duration
2328
timeout = Duration.of(15, ChronoUnit.MINUTES)

dd-smoke-tests/gradle/src/test/groovy/datadog/smoketest/GradleDaemonSmokeTest.groovy

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class GradleDaemonSmokeTest extends AbstractGradleTest {
9898

9999
where:
100100
gradleVersion | projectName | flakyTests | expectedOrder | eventsNumber
101-
"5.1" | "test-succeed-junit-4-class-ordering" | [
101+
"7.6.4" | "test-succeed-junit-4-class-ordering" | [
102102
test("datadog.smoke.TestSucceedB", "test_succeed"),
103103
test("datadog.smoke.TestSucceedB", "test_succeed_another"),
104104
test("datadog.smoke.TestSucceedA", "test_succeed")
@@ -239,12 +239,19 @@ class GradleDaemonSmokeTest extends AbstractGradleTest {
239239
}
240240

241241
private runGradle(String gradleVersion, List<String> arguments, boolean successExpected) {
242+
def buildEnv = ["GRADLE_VERSION": gradleVersion]
243+
244+
def mavenRepositoryProxy = System.getenv("MAVEN_REPOSITORY_PROXY")
245+
if (mavenRepositoryProxy != null) {
246+
buildEnv += ["MAVEN_REPOSITORY_PROXY": System.getenv("MAVEN_REPOSITORY_PROXY")]
247+
}
248+
242249
GradleRunner gradleRunner = GradleRunner.create()
243250
.withTestKitDir(testKitFolder.toFile())
244251
.withProjectDir(projectFolder.toFile())
245252
.withGradleVersion(gradleVersion)
246253
.withArguments(arguments)
247-
.withEnvironment(["GRADLE_VERSION": gradleVersion])
254+
.withEnvironment(buildEnv)
248255
.forwardOutput()
249256

250257
println "${new Date()}: $specificationContext.currentIteration.displayName - Starting Gradle run"

dd-smoke-tests/gradle/src/test/resources/test-corrupted-config-legacy-instrumentation/build.gradleTest

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ apply plugin: 'java'
22

33
repositories {
44
mavenLocal()
5+
6+
def proxyUrl = System.getenv("MAVEN_REPOSITORY_PROXY")
7+
if (proxyUrl) {
8+
println "Using proxy repository: $proxyUrl"
9+
maven {
10+
url = proxyUrl
11+
allowInsecureProtocol = true
12+
}
13+
}
14+
515
mavenCentral()
616
}
717

dd-smoke-tests/gradle/src/test/resources/test-corrupted-config-new-instrumentation/build.gradleTest

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ apply plugin: 'java'
22

33
repositories {
44
mavenLocal()
5+
6+
def proxyUrl = System.getenv("MAVEN_REPOSITORY_PROXY")
7+
if (proxyUrl) {
8+
println "Using proxy repository: $proxyUrl"
9+
maven {
10+
url = proxyUrl
11+
allowInsecureProtocol = true
12+
}
13+
}
14+
515
mavenCentral()
616
}
717

dd-smoke-tests/gradle/src/test/resources/test-failed-flaky-retries/build.gradleTest

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ apply plugin: 'java'
22

33
repositories {
44
mavenLocal()
5+
6+
def proxyUrl = System.getenv("MAVEN_REPOSITORY_PROXY")
7+
if (proxyUrl) {
8+
println "Using proxy repository: $proxyUrl"
9+
maven {
10+
url = proxyUrl
11+
allowInsecureProtocol = true
12+
}
13+
}
14+
515
mavenCentral()
616
}
717

dd-smoke-tests/gradle/src/test/resources/test-failed-legacy-instrumentation/build.gradleTest

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ apply plugin: 'java'
22

33
repositories {
44
mavenLocal()
5+
6+
def proxyUrl = System.getenv("MAVEN_REPOSITORY_PROXY")
7+
if (proxyUrl) {
8+
println "Using proxy repository: $proxyUrl"
9+
maven {
10+
url = proxyUrl
11+
allowInsecureProtocol = true
12+
}
13+
}
14+
515
mavenCentral()
616
}
717

dd-smoke-tests/gradle/src/test/resources/test-failed-new-instrumentation/build.gradleTest

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ apply plugin: 'java'
22

33
repositories {
44
mavenLocal()
5+
6+
def proxyUrl = System.getenv("MAVEN_REPOSITORY_PROXY")
7+
if (proxyUrl) {
8+
println "Using proxy repository: $proxyUrl"
9+
maven {
10+
url = proxyUrl
11+
allowInsecureProtocol = true
12+
}
13+
}
14+
515
mavenCentral()
616
}
717

dd-smoke-tests/gradle/src/test/resources/test-skip-legacy-instrumentation/build.gradleTest

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ apply plugin: 'java'
22

33
repositories {
44
mavenLocal()
5+
6+
def proxyUrl = System.getenv("MAVEN_REPOSITORY_PROXY")
7+
if (proxyUrl) {
8+
println "Using proxy repository: $proxyUrl"
9+
maven {
10+
url = proxyUrl
11+
allowInsecureProtocol = true
12+
}
13+
}
14+
515
mavenCentral()
616
}
717

0 commit comments

Comments
 (0)