new WaitForEnvironmentCommand(this).execute(new WaitForEnvironmentContextBuilder().withStatusToWaitFor("Ready").withApplicationName(applicationName).withEnvironmentRef(otherEnvId).build());
getLog().info(format("(Blue) Updating environmentId to version %s", versionLabel));
new UpdateEnvironmentCommand(this).execute(new UpdateEnvironmentContextBuilder().withEnvironmentId(otherEnvId).withVersionLabel(versionLabel).build());
getLog().info(format("(Blue) Waiting for environmentId['%s'] to get ready and green prior to switching", otherEnvId));
new WaitForEnvironmentCommand(this).execute(new WaitForEnvironmentContextBuilder().withStatusToWaitFor("Ready").withApplicationName(applicationName).withHealth("Green").withEnvironmentRef(otherEnvId).build());