Skip to content

Commit

Permalink
[FIXED JENKINS-23200] Upgrade to the lates docker-java
Browse files Browse the repository at this point in the history
To cover latest Docker 1.11 REST API
  • Loading branch information
vjuranek committed May 28, 2014
1 parent e7c792b commit 34080f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -27,7 +27,7 @@
</scm>

<properties>
<version.docker.java>0.8.1</version.docker.java>
<version.docker.java>0.8.2-SNAPSHOT</version.docker.java>
</properties>

<dependencies>
Expand Down
Expand Up @@ -77,7 +77,11 @@ public static final class DescriptorImpl extends BuildStepDescriptor<Builder> {

public DescriptorImpl() {
load();
dockerClient = new DockerClient(dockerUrl);
try {
dockerClient = new DockerClient(dockerUrl);
} catch(DockerException e) {
LOGGER.warning("Cannot create Docker client: " + e.getCause());
}
}

public FormValidation doCheckName(@QueryParameter String dockerURL) throws IOException, ServletException {
Expand All @@ -97,7 +101,11 @@ public String getDisplayName() {
public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {
dockerUrl = formData.getString("dockerUrl");
save();
dockerClient = new DockerClient(dockerUrl);
try {
dockerClient = new DockerClient(dockerUrl);
} catch(DockerException e) {
LOGGER.warning("Cannot create Docker client: " + e.getCause());
}
return super.configure(req, formData);
}

Expand Down

0 comments on commit 34080f9

Please sign in to comment.