Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

AWS Pipeline: Cannot upload a file to S3 eventhough file is present

rcpp
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 1, 2020

Hi, folks!

 

I'm trying to do a very simple deploy process with Pipelines and CodeDeploy. However, after I create the zip file and I try to upload it to S3, the pipeline fails saying the file is not present.

 

To be sure the file was present, I added a find command right before the upload command. The find command does result in a hit, but the deploy still fails saying it could not find it. I'm guessing the file is lost because it is not present on the same Docker. Do I have to do everything on the same script and use the Python integration script?


I have attached screenshots to illustrate this situation and my bitbucket-pipeline.yml.

 

Thank you in advance!

 

===================

 

Pipeline Configuration:

script: # Modify the commands below to build your repository. 
- apt-get update && apt-get install zip
[...]
- cat build/include.txt | zip build.zip -@
- find . -name build.zip

- step:
#name: Deploy
name: Upload
deployment: Production - Labs Dynaton

script:
- pipe: atlassian/aws-code-deploy:0.5.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION # Optional if already defined in the context.
APPLICATION_NAME: $APPLICATION_NAME
COMMAND: $COMMAND
S3_BUCKET: $S3_BUCKET
ZIP_FILE: 'build.zip' # Trying to pass it hardcoded

 

(pasting here unformatted the YML. Pretend everything is well formatted)

 

 

Screenshots:
Screenshot_20200331_225935.png

 

 

bb-deploy-error.png

1 answer

1 accepted

0 votes
Answer accepted
rcpp
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 3, 2020

Solved using Artifacts.

 

https://confluence.atlassian.com/bitbucket/using-artifacts-in-steps-935389074.html

 

I found a little confusing and misleading the documentation - it did not look like I would need to create an artifact.  Nonetheless, it is solved.

 

Cheers!

stoem
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 17, 2022

I agree, the docs are not very clear and there is no comprehensive latest and up to date reference available. I had to piece everything together from various places.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events