Skip to content

Commit

Permalink
Merge pull request #788 from KedneckInc/master
Browse files Browse the repository at this point in the history
Don't fail build if volume-clean fails.
  • Loading branch information
rhuss authored Nov 4, 2017
2 parents f24e6ac + 4f50479 commit 170d7d5
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 2 deletions.
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

0 comments on commit 170d7d5

Please sign in to comment.