Skip to content

Fix proxy settings for maven smoke tests #9099

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

Merged
merged 23 commits into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
1e0e235
see if the issue is with settings.xml. Also change update policy to `…
randomanderson Jul 1, 2025
a0d1cf3
Disable skipping tests based on git changes
smola Jul 1, 2025
7f91252
Give names to projects and print command
randomanderson Jul 1, 2025
61d3ff6
Merge remote-tracking branch 'origin/smola/disable-test-git-skip' int…
randomanderson Jul 1, 2025
75a0524
some more debug info
randomanderson Jul 1, 2025
0ab6985
Revert "Give names to projects and print command"
randomanderson Jul 1, 2025
dac8842
more debug
randomanderson Jul 1, 2025
bc9561f
more debug
randomanderson Jul 2, 2025
cb36f4c
set and create MAVEN_USER_HOME in base gradle job
randomanderson Jul 2, 2025
410ab2f
fix maven home
randomanderson Jul 2, 2025
bff3d82
Use mirror instead of repository
randomanderson Jul 2, 2025
29cda74
offline mode doesn't work
randomanderson Jul 2, 2025
f72d4ab
minimize the diff
randomanderson Jul 2, 2025
f7d57f9
Merge branch 'master' into landerson/maven-smoke-test-proxy
randomanderson Jul 2, 2025
02945a2
remove debug and m2 folder changes
randomanderson Jul 2, 2025
30b1769
Revert "remove debug and m2 folder changes"
randomanderson Jul 2, 2025
9ad2380
undo merged fix
randomanderson Jul 2, 2025
50cb503
Revert "undo merged fix"
randomanderson Jul 2, 2025
b0ba26c
use "package" in addition to go-offline
randomanderson Jul 3, 2025
4ad5d31
fix error, only run some tests
randomanderson Jul 3, 2025
0158a96
remove "package" because it's too slow
randomanderson Jul 3, 2025
6f44553
Reapply "remove debug and m2 folder changes"
randomanderson Jul 3, 2025
d0b8bb8
Cleanup for PR
randomanderson Jul 3, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
}

def "test #projectName, v#mavenVersion"() {
println "Starting: ${projectName} ${mavenVersion}"
Assumptions.assumeTrue(Jvm.current.isJavaVersionCompatible(minSupportedJavaVersion),
"Current JVM " + Jvm.current.javaVersion + " is not compatible with minimum required version " + minSupportedJavaVersion)

Expand Down Expand Up @@ -245,6 +246,9 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
def projectResourcesUri = this.getClass().getClassLoader().getResource(projectFilesSources).toURI()
def projectResourcesPath = Paths.get(projectResourcesUri)
copyFolder(projectResourcesPath, projectHome)

def sharedSettingsPath = Paths.get(this.getClass().getClassLoader().getResource("settings.mirror.xml").toURI())
Files.copy(sharedSettingsPath, projectHome.resolve("settings.mirror.xml"))
}

private void copyFolder(Path src, Path dest) throws IOException {
Expand Down Expand Up @@ -332,7 +336,10 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
command.addAll(jvmArguments(runWithAgent, setServiceName, additionalAgentArgs))
command.addAll((String[]) ["-jar", mavenRunnerShadowJar])
command.addAll(programArguments())
command.addAll(["-s", "${projectHome.toAbsolutePath()}/settings.xml".toString()])

if (System.getenv().get("MAVEN_REPOSITORY_PROXY") != null) {
command.addAll(["-s", "${projectHome.toAbsolutePath()}/settings.mirror.xml".toString()])
}
command.addAll(mvnCommand)

ProcessBuilder processBuilder = new ProcessBuilder(command)
Expand Down
9 changes: 9 additions & 0 deletions dd-smoke-tests/maven/src/test/resources/settings.mirror.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<settings>
<mirrors>
<mirror>
<id>env-proxy</id>
<mirrorOf>*</mirrorOf>
<url>${env.MAVEN_REPOSITORY_PROXY}</url>
</mirror>
</mirrors>
</settings>

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading