Closed ramapalani closed 4 years ago
@nikhil-dabhade Can you review this PR?
@ramapalani Sorry for the delay. I was OOO. Taking a look now.
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 !
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:
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.