Skip to content

Commit

Permalink
Fixing the deploy-snapshot job (#1693)
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalkoren authored Mar 9, 2021
1 parent 88359ba commit 1820243
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<!-- this dependency is only important in order to make sure the external plugin jar exists -->
<groupId>${project.groupId}</groupId>
<artifactId>external-plugin</artifactId>
<version>${project.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>apm-agent-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ protected AbstractServletContainerIntegrationTest(GenericContainer<?> servletCon
.withStartupTimeout(Duration.ofMinutes(5));
for (TestApp testApp : getTestApps()) {
testApp.getAdditionalEnvVariables().forEach(servletContainer::withEnv);
System.out.println("testApp = " + testApp);
try {
testApp.getAdditionalFilesToBind().forEach((pathToFile, containerPath) -> {
checkFilePresent(pathToFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,11 @@ public ExternalPluginTestApp() {
@Override
public Map<String, String> getAdditionalFilesToBind() {
File externalPluginBuildDir = new File("../external-plugin-test/external-plugin/target/");
System.out.println("externalPluginBuildDir = " + externalPluginBuildDir);
if (externalPluginBuildDir.exists()) {
System.out.println("External plugin dir exists");
File[] files = externalPluginBuildDir.listFiles();
if (files == null) {
System.out.println("No files in the external plugin build dir");
} else {
System.out.println("Files in external plugin build dir: ");
for (File file : files) {
System.out.println(" " + file);
}
}
} else {
System.out.println("External plugin dir does not exit");
}
File pluginJar = Arrays.stream(externalPluginBuildDir.listFiles(file -> file.getName().startsWith("external-plugin-") && file.getName().endsWith(".jar")))
File pluginJar = Arrays.stream(externalPluginBuildDir
.listFiles(file -> file.getName().startsWith("external-plugin-") && !file.getName().contains("javadoc") && file.getName().endsWith(".jar")))
.findFirst()
.orElse(null);
assert pluginJar != null;
System.out.println("pluginJar = " + pluginJar);
return Map.of(pluginJar.getAbsolutePath(), "/plugins/" + pluginJar.getName());
}

Expand Down

0 comments on commit 1820243

Please sign in to comment.