Generated AWS CodeArtifact 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.codeartifact.authorizationToken.password} ${bamboo.custom.aws.codeartifact.expirationDate}

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

${bamboo.custom.aws.codeartifact.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_codeartifact_authorizationToken_password export EXPIRATION_DATE=$bamboo_custom_aws_codeartifact_expirationDate
PowerShell
$AUTHORIZATION_TOKEN = $Env:bamboo_custom_aws_codeartifact_authorizationToken_password $EXPIRATION_DATE = $Env:bamboo_custom_aws_codeartifact_expirationDate
Windows Command Prompt (cmd)
set AUTHORIZATION_TOKEN=%bamboo_custom_aws_codeartifact_authorizationToken_password% set EXPIRATION_DATE=%bamboo_custom_aws_codeartifact_expirationDate%