Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
JENKINS-45964 : Assuming Role does not work in AWS-China
- Moved partition names to constants.
  • Loading branch information
indyaah committed Aug 13, 2017
1 parent 6918461 commit 5984b88
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/de/taimos/pipeline/aws/WithAWSStep.java
Expand Up @@ -58,6 +58,9 @@

public class WithAWSStep extends AbstractStepImpl {

static final String AWS_DEFAULT_PARTITION_NAME = "aws";
static final String AWS_CN_PARTITION_NAME = "aws-cn";

private String role = "";
private String roleAccount = "";
private String region = "";
Expand Down Expand Up @@ -251,9 +254,9 @@ private String createRoleSessionName() {

private String selectPartitionName() {
if (Regions.CN_NORTH_1.getName().equals(this.step.getRegion())) {
return "aws-cn";
return AWS_CN_PARTITION_NAME;
}
return "aws";
return AWS_DEFAULT_PARTITION_NAME;
}

@Override
Expand Down

0 comments on commit 5984b88

Please sign in to comment.