Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,382
Community Members
 
Community Events
176
Community Groups

aws-codedeploy integration

The BUNDLE_TYPE option is not working, I passed it tar, but when bitbucket calls codedeploy it pass it as zip

 

There is a bug in the pipe.py file, That if statement is wrong

 

 

if self.get_variable('BUNDLE_TYPE') in ['zip', 'tar', 'tgz']:
deploy_parameters.update({'fileExistsBehavior': self.get_variable('FILE_EXISTS_BEHAVIOR')})

https://bitbucket.org/atlassian/aws-code-deploy/src/master/

1 answer

0 votes

Hi @amrsalah944 

Thank you for your question!

It would be nice if you provide us your bitbucket-pipelines configuration to investigate the issue you reported.

 

Best regards,
Oleksandr Kyrdan

Thanks for your reply!
my pipeline file is as below
pipelines:
branches:
dev:
- step:
deployment: test
script:
- pipe: atlassian/slack-notify:2.0.0
variables:
WEBHOOK_URL: $SLACK_WEBHOOK_URL
MESSAGE: 'Deployment to CRM-DEV initiated. All others will be paused until deployment complete.'
- tar -cf application.tar .

- pipe: atlassian/aws-code-deploy:0.2.5
variables:
BUNDLE_TYPE: "tar"
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_DEV
S3_BUCKET: $S3_BUCKET_DEV
COMMAND: 'upload'
ZIP_FILE: 'application.tar'
region: us-east-2
DEBUG: 'true'
- pipe: atlassian/aws-code-deploy:0.2.5
variables:
BUNDLE_TYPE: "tar"
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_DEV
DEPLOYMENT_GROUP: $DEPLOYMENT_GROUP_DEV
S3_BUCKET: $S3_BUCKET_DEV
COMMAND: 'deploy'
WAIT: 'true'
region: us-east-2
IGNORE_APPLICATION_STOP_FAILURES: 'true'
FILE_EXISTS_BEHAVIOR: 'OVERWRITE'
DEBUG: 'true'
- pipe: atlassian/slack-notify:2.0.0
variables:
WEBHOOK_URL: $SLACK_WEBHOOK_URL
MESSAGE: 'Deployment to CRM-DEV is live.'
-------------
even the var is exported, but the aws command end like that
--env=BUNDLE_TYPE="tar" \

++ aws deploy create-deployment --application-name web-dev --deployment-group CodeDeploy1 --revision 'revisionType=S3,s3Location={bucket=xxx-web-dev,bundleType=zip,key=web-dev-xxx}' --ignore-application-stop-failures --file-exists-behavior OVERWRITE

Hi @amrsalah944 

Thank you for your question!

Looks like you try to use outdated (0.2.5) pipe's version with a new (1.1.1) parameters:

Currently the latest pipe's version is 1.1.1:

script:
  - pipe: atlassian/aws-code-deploy:1.1.1
    variables:
      COMMAND: 'upload'
      APPLICATION_NAME: 'my-application'
      ZIP_FILE: 'myapp.zip'

Support for variable BUNDLE_TYPE has started since version 0.3.0. And it's always good idea to update the pipe to the latest version that includes new features, fixes, upgrades.

Best regards,
Oleksandr

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events