Custom VERSION_LABEL in Codedeploy pipe?

Abryan Manalansang July 18, 2020

How can I upload/deploy custom VERSION_LABEL without changing it manually in the bitbucket-pipeline.yml? I wanted it to be like after you deploy "my-app-1.0.0", the next deployment will be something like "my-app-1.1.0" while retaining my previous deployments.

Hopefully, see you what I mean and give me some advice. Thanks.

my codedeploy pipe.

 - pipe: atlassian/aws-code-deploy:0.5.3
variables:
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
APPLICATION_NAME: $APPLICATION_NAME
S3_BUCKET: $S3_BUCKET
COMMAND: 'upload'
ZIP_FILE: 'application1.zip'
VERSION_LABEL: 'my-app-1.0.0'
FOLDER: 'sample-codedeploy'
- pipe: atlassian/aws-code-deploy:0.5.3
variables:
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
APPLICATION_NAME: $APPLICATION_NAME
DEPLOYMENT_GROUP: $DEPLOYMENT_GROUP
S3_BUCKET: $S3_BUCKET
COMMAND: 'deploy'
WAIT: 'true'
VERSION_LABEL: 'my-app-1.0.0'
IGNORE_APPLICATION_STOP_FAILURES: 'true'
FILE_EXISTS_BEHAVIOR: 'RETAIN'
FOLDER: 'sample-codedeploy'

 

1 answer

1 accepted

0 votes
Answer accepted
Abryan Manalansang July 20, 2020

I ended up with this setup.

VERSION_LABEL$(date +%Y-%m-%d)_$BITBUCKET_BUILD_NUMBER.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events