Skip to content

Commit

Permalink
[FIXED JENKINS-23733] Allow user to save global config even if Docker…
Browse files Browse the repository at this point in the history
… URL is empty
  • Loading branch information
vjuranek committed Jul 10, 2014
1 parent 02231b3 commit a8b4074
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -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 {
Expand All @@ -147,7 +150,7 @@ public DockerClient getDockerClient() {
public DescriptorExtensionList<DockerCommand, DockerCommandDescriptor> getCmdDescriptors() {
return DockerCommand.all();
}

}

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

0 comments on commit a8b4074

Please sign in to comment.