Generated Amazon ECR Credentials Variables

Variable names are using the default custom.aws namespace, which needs to be adjusted if overridden.

Bamboo variables

This task generates the following Bamboo variables:

${bamboo.custom.aws.ecr.authorizationToken.password} ${bamboo.custom.aws.ecr.expirationDate} ${bamboo.custom.aws.ecr.proxyEndpoint} ${bamboo.custom.aws.ecr.proxyEndpointDomain} ${bamboo.custom.aws.ecr.username} ${bamboo.custom.aws.ecr.password}

An alternative representation as a JSON object for automated processing with tools like jq is available too:

${bamboo.custom.aws.ecr.credentials.json.password}

Environment variables

Aforementioned variables will also be available as environment variables in Bamboo Script tasks. The syntax differs between shells, as illustrated in these examples for assigning them to the standardized variables used by tools like the AWS Command Line Interface (AWS CLI):

Bash (Unix shell)
export AUTHORIZATION_TOKEN=$bamboo_custom_aws_ecr_authorizationToken_password export EXPIRATION_DATE=$bamboo_custom_aws_ecr_expirationDate export PROXY_ENDPOINT=$bamboo_custom_aws_ecr_proxyEndpoint export PROXY_ENDPOINT_DOMAIN=$bamboo_custom_aws_ecr_proxyEndpointDomain export USERNAME=$bamboo_custom_aws_ecr_username export PASSWORD=$bamboo_custom_aws_ecr_password
PowerShell
$AUTHORIZATION_TOKEN = $Env:bamboo_custom_aws_ecr_authorizationToken_password $EXPIRATION_DATE = $Env:bamboo_custom_aws_ecr_expirationDate $PROXY_ENDPOINT = $Env:bamboo_custom_aws_ecr_proxyEndpoint $PROXY_ENDPOINT_DOMAIN = $Env:bamboo_custom_aws_ecr_proxyEndpointDomain $USERNAME = $Env:bamboo_custom_aws_ecr_username $PASSWORD = $Env:bamboo_custom_aws_ecr_password
Windows Command Prompt (cmd)
set AUTHORIZATION_TOKEN=%bamboo_custom_aws_ecr_authorizationToken_password% set EXPIRATION_DATE=%bamboo_custom_aws_ecr_expirationDate% set PROXY_ENDPOINT=%bamboo_custom_aws_ecr_proxyEndpoint% set PROXY_ENDPOINT_DOMAIN=%bamboo_custom_aws_ecr_proxyEndpointDomain% set USERNAME=%bamboo_custom_aws_ecr_username% set PASSWORD=%bamboo_custom_aws_ecr_password%