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

Create the zip file artifact

joel-ewg-org June 11, 2019

I have added a elasticbeanstalk pipe to a bitbucket pipeline but I cannot find any documentation on how the zip file should be created or more details on whether the rest of the steps in my current deployment process(eb cli) will happen. Currently when I deploy using the eb cli this happens automatically.  Is there a way to run the eb deploy script or something?

1 answer

1 accepted

1 vote
Answer accepted
Raul Gomis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2019

Hi @joel-ewg-org ,

You can see this example: https://bitbucket.org/bitbucketpipelines/example-aws-elasticbeanstalk-deploy/src/master/bitbucket-pipelines.yml to know how to create the zip file to pass it to the pipe. It's pretty simple! 

This example is using multiple environments, that's why it's split into 'upload-only' and 'deploy-only' commands. 

Regards,

Raul

joel-ewg-org June 12, 2019

Thanks! I see that there is a line that zips the file in the Build and Test step, which for some reason I didn't notice before. It would be helpful if there was some mention of this on the README here.

joel-ewg-org June 12, 2019

zip is not installed in the image i am using(ruby:2.6.1) for my test step. Can I use a different image for the deploy step or should I install in the deploy step script? If the later, any idea which pkg manager to use (yum, apt, etc)?

Raul Gomis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 12, 2019

Hi @joel-ewg-org ,

You can totally use different images per step. You can find more details here: https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html

Regards,

Raul

joel-ewg-org June 13, 2019

I am successfully creating the zip file but receive this error:

 An error occurred (SignatureDoesNotMatch) when calling the CreateMultipartUpload operation: The request signature we calculated does not match the signature you provided. Check your key and signing method.

 

Any idea exactly what this refers to and how to fix it?

my pipline  step is as follows:

 

 - step: 
image: atlassian/default-image:2
name: Deployment to Production
deployment: production
trigger: manual
script:
- zip xxx.zip -r * .[^.]*
- pipe: atlassian/aws-elasticbeanstalk-deploy:0.3.0
variables:
AWS_ACCESS_KEY_ID: $BB_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $BB_AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: "us-east-1"
APPLICATION_NAME: "xxx"
ENVIRONMENT_NAME: "yyy-vpc"
ZIP_FILE: "xxx.zip"
VERSION_LABEL: "deploy-$BITBUCKET_BUILD_NUMBER"
WAIT: "true" 
Like Abraham Armas Cordero likes this
Raul Gomis
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 24, 2019

Hey @joel-ewg-org ,


Weird! is it failing consistently? can you try regenerating your credentials and see if it is still happening? 

Btw, Just a note: this command 

zip xxx.zip -r * .[^.]* 

would also zip the contents of your .git folder, which I wouldn't recommend it unless you need it. 

 

Regards,

Raul

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events