diff --git a/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/AWSClientFactory.java b/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/AWSClientFactory.java index 2d744a3..f5faa7c 100644 --- a/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/AWSClientFactory.java +++ b/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/AWSClientFactory.java @@ -152,7 +152,14 @@ public T getService(Class serviceClazz) } protected String getEndpointFor(ServiceEndpointFormatter formatter) { - return String.format(formatter.serviceMask, region); + String endpointStr = String.format(formatter.serviceMask, region); + + // Extra Handling for CN_Beijing Region + if (region.equalsIgnoreCase("cn-north-1")) { + endpointStr += ".cn"; + } + + return endpointStr; } public String getEndpointFor(T client) { diff --git a/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/cmd/DeployerCommand.java b/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/cmd/DeployerCommand.java index ee57802..a43add0 100644 --- a/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/cmd/DeployerCommand.java +++ b/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/cmd/DeployerCommand.java @@ -29,6 +29,7 @@ import com.amazonaws.services.elasticbeanstalk.model.S3Location; import com.amazonaws.services.elasticbeanstalk.model.UpdateEnvironmentRequest; import com.amazonaws.services.s3.AmazonS3Client; +import com.amazonaws.util.VersionInfoUtils; import com.google.common.collect.Lists; import org.apache.commons.lang.Validate; @@ -100,7 +101,7 @@ public boolean perform() throws Exception { if (null == getLogger()) setLogger(getListener().getLogger()); - log("AWSEB Deployment Plugin Version %s", Utils.getVersion()); + log("AWSEB Deployment Plugin Version %s (aws-java-sdk version: %s)", Utils.getVersion(), VersionInfoUtils.getVersion()); return false; } @@ -145,6 +146,8 @@ public boolean perform() throws Exception { factory = AWSClientFactory.getClientFactory("", getDeployerConfig().getAwsRegion()); } + log ("Using region: '%s'", getDeployerConfig().getAwsRegion()); + setS3(factory.getService(AmazonS3Client.class)); setAwseb(factory.getService(AWSElasticBeanstalkClient.class));