@@ -77,7 +77,7 @@ public class AWSCodeDeployPublisher extends Publisher {
7777 public static final long DEFAULT_TIMEOUT_SECONDS = 900 ;
7878 public static final long DEFAULT_POLLING_FREQUENCY_SECONDS = 15 ;
7979 public static final String ROLE_SESSION_NAME = "jenkins-codedeploy-plugin" ;
80- public static final Regions [] AVAILABLE_REGIONS = {Regions .AP_SOUTHEAST_2 , Regions .EU_WEST_1 , Regions .US_EAST_1 , Regions .US_WEST_2 };
80+ public static final Regions [] AVAILABLE_REGIONS = {Regions .AP_NORTHEAST_1 , Regions . AP_SOUTHEAST_2 , Regions .EU_WEST_1 , Regions .US_EAST_1 , Regions .US_WEST_2 };
8181
8282 private final String s3bucket ;
8383 private final String s3prefix ;
@@ -236,14 +236,14 @@ public boolean perform(AbstractBuild build, Launcher launcher, BuildListener lis
236236 }
237237
238238 private FilePath getSourceDirectory (FilePath basePath ) throws IOException , InterruptedException {
239- String subdirectory = this . subdirectory . trim (). length () > 0 ? this .subdirectory . trim () : "" ;
239+ String subdirectory = StringUtils . trimToEmpty ( this .subdirectory ) ;
240240 if (!subdirectory .isEmpty () && !subdirectory .startsWith ("/" )) {
241241 subdirectory = "/" + subdirectory ;
242242 }
243243 FilePath sourcePath = basePath .withSuffix (subdirectory ).absolutize ();
244- File sourceDirectory = new File ( sourcePath .getRemote ());
245- if (! sourceDirectory . isDirectory () || ! isSubDirectory ( basePath , sourcePath )) {
246- throw new IllegalArgumentException ( "Provided path is not a subdirectory of the workspace: " + sourcePath );
244+ if (! sourcePath .isDirectory () || ! isSubDirectory ( basePath , sourcePath )) {
245+ throw new IllegalArgumentException ( "Provided path (resolved as '" + sourcePath
246+ + "') is not a subdirectory of the workspace (resolved as ' " + basePath + "')" );
247247 }
248248 return sourcePath ;
249249 }
@@ -408,7 +408,9 @@ private boolean waitForDeployment(AWSClients aws, String deploymentId) throws In
408408
409409 Thread .sleep (pollingFreqMillis );
410410 }
411-
411+
412+ logger .println ("Deployment status: " + deployStatus .getStatus () + "; instances: " + deployStatus .getDeploymentOverview ());
413+
412414 if (!deployStatus .getStatus ().equals (DeploymentStatus .Succeeded .toString ())) {
413415 this .logger .println ("Deployment did not succeed. Final status: " + deployStatus .getStatus ());
414416 success = false ;
0 commit comments