awslabs / aws-device-farm-jenkins-plugin

Jenkins plugin for AWS Device Farm.
Apache License 2.0
89 stars 66 forks source link

ISSUE-108 Work with IAM role chaining #109

Closed ramapalani closed 4 years ago

ramapalani commented 4 years ago

Issue #, if available: https://github.com/awslabs/aws-device-farm-jenkins-plugin/issues/108

Description of changes: Role chaining allows max 1 hour of role assumption (sts assume role session duration) Device farm is asking for 8 hours, change that to 1 hour.

STSAssumeRoleSessionCredentialsProvider automatically refreshes the duration as long as the session is active. But for this AWS Device Farm Client(or API object) should directly use the provider instead of credentials from the provider.

I tested this out with a local installation of this plugin with a test running for more than an hour: Screenshot of the jenkins run: image run url: https://console.aws.amazon.com/devicefarm/home?#/projects/06e0134e-cb96-4714-a161-d5f5700bc558/runs/d67ef244-e02b-433f-b606-eab1582069bf

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ramapalani commented 4 years ago

@nikhil-dabhade Can you review this PR?

nikhil-dabhade commented 4 years ago

@ramapalani Sorry for the delay. I was OOO. Taking a look now.

nikhil-dabhade commented 4 years ago

Merged the PR in the official Jenkins plugin repo https://github.com/jenkinsci/aws-device-farm-plugin/commit/24bcc623cacd93974bc96c55c4262050604ad281#diff-0f203c0bdfaef4945aa21606b8f8fdef

Thank you very much for the contributions Rama !