From 2641fe8f26604a5127322efb9be8a1b9a3def68d Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Tue, 16 Feb 2016 21:15:24 +0100 Subject: [PATCH] Tag Docker images created by launch script integration tests Closes gh-5168 --- .../spring-boot-launch-script-tests/README.adoc | 7 ++++--- .../boot/launchscript/SysVinitLaunchScriptIT.java | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/spring-boot-integration-tests/spring-boot-launch-script-tests/README.adoc b/spring-boot-integration-tests/spring-boot-launch-script-tests/README.adoc index 3a4739015e2..c6d37f8da3a 100644 --- a/spring-boot-integration-tests/spring-boot-launch-script-tests/README.adoc +++ b/spring-boot-integration-tests/spring-boot-launch-script-tests/README.adoc @@ -65,11 +65,12 @@ $ mvn -Pdocker clean verify The first time the tests are run, Docker will create the container images that are used to run the tests. This can take several minutes, particularly if you have a slow network connection. Subsequent runs will be faster as the images are cached locally. You can run -`docker images` to see a list of the cached images. +`docker images` to see a list of the cached images. Images created by these tests will be +tagged with `spring-boot-it` prefix to easily distinguish them. == Cleaning up If you want to reclaim the disk space used by the cached images (at the expense of having to wait for them to be downloaded and rebuilt the next time you run the tests), you can -use `docker images` to list the images and `docker rmi ` to delete them. See -`docker rmi --help` for further details. \ No newline at end of file +use `docker images` to list the images and `docker rmi ` to delete them (look for +`spring-boot-it` tag). See `docker rmi --help` for further details. diff --git a/spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java b/spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java index 3adef38ba5f..0a6e8b5dcc8 100644 --- a/spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java +++ b/spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java @@ -243,7 +243,8 @@ public class SysVinitLaunchScriptIT { BuildImageResultCallback resultCallback = new BuildImageResultCallback(); String dockerfile = "src/test/resources/conf/" + this.os + "/" + this.version + "/Dockerfile"; - docker.buildImageCmd(new File(dockerfile)).exec(resultCallback); + String tag = "spring-boot-it/" + this.os.toLowerCase() + ":" + this.version; + docker.buildImageCmd(new File(dockerfile)).withTag(tag).exec(resultCallback); String imageId = resultCallback.awaitImageId(); return imageId; }