Skip to content

Commit

Permalink
Merge pull request fabric8io#238 from jgangemi/version-fix
Browse files Browse the repository at this point in the history
use correct api version
  • Loading branch information
rhuss committed Jul 27, 2015
2 parents 9a3694e + 90a6993 commit bcbd5d9
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public abstract class AbstractDockerMojo extends AbstractMojo implements Context
// docker installations.
public static final String DOCKER_HTTPS_PORT = "2376";

// don't forget to change 'apiVersion' default-value as well
public static final String API_VERSION = "v1.17";

// Current maven project
Expand Down Expand Up @@ -92,8 +91,7 @@ public abstract class AbstractDockerMojo extends AbstractMojo implements Context
*/
protected boolean removeVolumes;

// don't forget to change 'API_VERSION'
/** @parameter property = "docker.apiVersion" default-value = "v1.15" */
/** @parameter property = "docker.apiVersion" */
private String apiVersion;

// URL to docker daemon
Expand Down Expand Up @@ -230,10 +228,10 @@ protected boolean matchesConfiguredImages(String imageList, ImageConfiguration i
return imagesAllowed.contains(imageConfig.getName()) || imagesAllowed.contains(imageConfig.getAlias());
}

// visible for testing
private DockerAccess createDockerAccess(String baseUrl) throws MojoExecutionException {
try {
DockerAccess client = new DockerAccessWithHcClient(apiVersion, baseUrl,
String version = (apiVersion == null) ? API_VERSION : apiVersion;
DockerAccess client = new DockerAccessWithHcClient(version, baseUrl,
EnvUtil.getCertPath(certPath), log);
client.start();

Expand Down

0 comments on commit bcbd5d9

Please sign in to comment.