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'
I ended up with this setup.
VERSION_LABEL: $(date +%Y-%m-%d)_$BITBUCKET_BUILD_NUMBER.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.