Skip to content

Commit

Permalink
Add comment describing the aws cli query
Browse files Browse the repository at this point in the history
Co-authored-by: Paula <[email protected]>
  • Loading branch information
keithduncan and pzeballos committed Aug 24, 2021
1 parent ddbcfca commit b9b81e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hooks/environment
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,13 @@ function login() {
}

function assume_role_for_ecr_login() {
local export_credentials; export_credentials="$(aws sts assume-role \
local export_credentials

# This query creates an outer array, then multiple inner arrays of [key,value]
# pairs. Then it projects the outer array, and joins each inner array to form
# a key=value string. Printing the final array with --output text results in a
# string of the key=value pairs joined by space characters.
export_credentials="$(aws sts assume-role \
--role-arn "${BUILDKITE_PLUGIN_ECR_ASSUME_ROLE_ROLE_ARN}" \
--role-session-name "ecr-login-buildkite-plugin" \
--duration-seconds "${BUILDKITE_PLUGIN_ECR_ASSUME_ROLE_DURATION_SECONDS:-3600}" \
Expand Down

0 comments on commit b9b81e9

Please sign in to comment.