aboutsummaryrefslogtreecommitdiffstats
path: root/docker-api
diff options
context:
space:
mode:
authorfreva <valerijf@yahoo-inc.com>2017-02-09 12:53:32 +0100
committerfreva <valerijf@yahoo-inc.com>2017-02-09 12:53:32 +0100
commit700eaac7ca450fef317526682116fac975135e04 (patch)
tree1e723e275634c5e0716f7d9b052b4a10c17ec798 /docker-api
parent78deb795a433de81f1209df3e8dc4a1ea186308e (diff)
Simplify rsync
Diffstat (limited to 'docker-api')
-rw-r--r--docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java b/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java
index 26a5ffae0b1..fdf0fc78c28 100644
--- a/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java
+++ b/docker-api/src/test/java/com/yahoo/vespa/hosted/dockerapi/RunSystemTests.java
@@ -25,7 +25,6 @@ import java.util.concurrent.ExecutionException;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import java.util.stream.Collectors;
import static org.junit.Assert.assertEquals;
@@ -115,12 +114,10 @@ public class RunSystemTests {
void updateContainerMavenLocalRepository(ContainerName containerName) throws InterruptedException, IOException, ExecutionException {
startSystemTestNodeIfNeeded(containerName);
- String sources = Files.list(pathToVespaRepoInHost)
- .filter(module -> Files.exists(module.resolve("target")))
- .map(module -> pathToVespaRepoInContainer.resolve(module.getFileName()).resolve("target").toString() + "/")
- .collect(Collectors.joining(" "));
- docker.executeInContainerAsRoot(containerName, "/bin/sh", "-c", "rsync --archive --existing --update " +
- sources + " " + pathToLibJars.toString() + "/");
+ String sources = pathToVespaRepoInContainer.toString() + "/*/target/";
+ String destination = pathToLibJars.toString() + "/";
+ executeInContainer(containerName, "root","/bin/sh", "-c",
+ "rsync --existing --update --recursive --times " + sources + " " + destination);
executeInContainer(containerName, username, "/bin/sh", "-c", "cd " + pathToVespaRepoInContainer + ";" +
"mvn jar:jar install:install");
@@ -251,7 +248,7 @@ public class RunSystemTests {
}
private Integer executeInContainer(ContainerName containerName, String runAsUser, String... args) throws InterruptedException {
- logger.info("Executing in container: " + String.join(" ", args));
+ logger.info("Executing as '" + runAsUser + "' in '" + containerName.asString() + "': " + String.join(" ", args));
ExecCreateCmdResponse response = docker.dockerClient.execCreateCmd(containerName.asString())
.withCmd(args)
.withAttachStdout(true)