Skip to content
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

Don't fail build if volume-clean fails. #788

Merged
merged 4 commits into from
Nov 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Preserve leading whitespace in logs (#875)
- Maven property interpolation in Dockerfiles (#877)
- Allow parameters for the log prefix (#890)
- When removing a volume don't error if the volume does not exist (#788)
- Fix warning when COPY and/or ADD with parameters are used (#884)

* **0.22.1** (2017-08-28)
Expand Down
56 changes: 56 additions & 0 deletions samples/log/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!--
Sample project for demonstrating the custom network mode

Call it with 'mvn install'.
It will automatically create the custom network "test-network" and create two automatically named containers that can
talk to each other via their netAlias names.
-->

<groupId>io.fabric8</groupId>
<artifactId>dmp-log</artifactId>
<version>0.21-SNAPSHOT</version>

<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.21.0</version>
<configuration>
<verbose>true</verbose>
<autoPull>always</autoPull>
<startParallel>true</startParallel>
<images>
<image>
<alias>jetty1</alias>
<name>jetty</name>
<run>
<wait>
<log>.*Server:main: Started @\d+ms.*</log>
<time>60000</time>
</wait>
<log><enabled>true</enabled></log>
</run>
</image>
<image>
<alias>jetty2</alias>
<name>jetty</name>
<run>
<wait>
<log>.*Server:main: Started @\d+ms.*</log>
<time>60000</time>
</wait>
<log><enabled>true</enabled></log>
</run>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void copyArchive(String containerId, File archive, String targetPath)
String createVolume(VolumeCreateConfig configuration) throws DockerAccessException;

/**
* removes a volume
* Removes a volume. It is a no-op if the volume does not exist.
* @param name volume name to remove
* @throws DockerAccessException if the volume could not be removed
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ public String createVolume(VolumeCreateConfig containerConfig)
public void removeVolume(String name) throws DockerAccessException {
try {
String url = urlBuilder.removeVolume(name);
delegate.delete(url, HTTP_NO_CONTENT);
delegate.delete(url, HTTP_NO_CONTENT, HTTP_NOT_FOUND);
} catch (IOException e) {
throw new DockerAccessException(e, "Unable to remove volume [%s]", name);
}
Expand Down