Skip to content

Commit

Permalink
Use versions from BOM (#262)
Browse files Browse the repository at this point in the history
Only use accessKey and secretKey if they are not blank

fix formatting
  • Loading branch information
basil authored and samholton committed Jan 9, 2025
1 parent 6d844a6 commit 47e2ec6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
13 changes: 1 addition & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,10 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-${jenkins.baseline}.x</artifactId>
<version>3761.vd922730f0fd2</version>
<version>3850.vb_c5319efa_e29</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- TODO until in BOM -->
<dependency>
<groupId>io.jenkins.plugins.aws-java-sdk2</groupId>
<artifactId>aws-java-sdk2-core</artifactId>
<version>2.29.34-9.v117ff2a_65538</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins.aws-java-sdk2</groupId>
<artifactId>aws-java-sdk2-ec2</artifactId>
<version>2.29.34-9.v117ff2a_65538</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ public boolean requiresToken() {
@Override
public AwsCredentials resolveCredentials() {

if (StringUtils.isBlank(iamRoleArn)) {
if (StringUtils.isBlank(iamRoleArn)
&& !StringUtils.isBlank(accessKey)
&& !StringUtils.isBlank(secretKey.getPlainText())) {
return AwsBasicCredentials.create(accessKey, secretKey.getPlainText());
} else {
AwsCredentialsProvider baseProvider;
Expand Down

0 comments on commit 47e2ec6

Please sign in to comment.