Skip to content
Permalink
Browse files
[FIXED JENKINS-23733] Allow user to save global config even if Docker…
… URL is empty
  • Loading branch information
vjuranek committed Jul 10, 2014
1 parent 02231b3 commit a8b40740b6729682cf765b5e4209cfda2cafb144
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/main/java/org/jenkinsci/plugins/dockerbuildstep/DockerBuilder.java
@@ -124,8 +124,11 @@ public String getDisplayName() {
@Override
public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {
dockerUrl = formData.getString("dockerUrl");
if (dockerUrl == null || dockerUrl.isEmpty())
throw new FormException("Docker REST URL cannot be empty", "dockerUrl");
if (dockerUrl == null || dockerUrl.isEmpty()) {
LOGGER.severe("Docker URL is empty, Docker build test plugin cannot work without Docker URL being set up properly");
//JENKINS-23733 doen't block user to save the config if admin decides so
return true;
}

save();
try {
@@ -147,7 +150,7 @@ public DockerClient getDockerClient() {
public DescriptorExtensionList<DockerCommand, DockerCommandDescriptor> getCmdDescriptors() {
return DockerCommand.all();
}

}

private static Logger LOGGER = Logger.getLogger(DockerBuilder.class.getName());

0 comments on commit a8b4074

Please sign in to comment.