Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Unable to deploy a Vue app to s3 butcket Edited

Hello,

I have enabled pipeline in our frontend repo to sync to S3 bucket, the upload works fine when using the root path as you can see below but when using the folder that I need to sync don't find it.

image: node:10.15.3
pipelines:
default:
-
step:
caches:
-
node
script: # Modify the commands below to build your repository.
-
npm install
-
npm run build
artifacts: # defining the artifacts to be passed to each future step.
- dist/**

-
step:
name: Push to S3
trigger: manual
deployment: Production
script:
-
pipe: atlassian/aws-s3-deploy:0.3.2
variables: AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
S3_BUCKET: "S3-bucket"
LOCAL_PATH: "./dist/*"

- pipe: atlassian/aws-cloudfront-invalidate:0.3.2
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
DISTRIBUTION_ID: "DIST-ID"

Using LOCAL_PATH: "./" -> work but copy the whole repo and I need the content inside the build "dist" folder.

...

--env=LOCAL_PATH="./" \
--env=S3_BUCKET="S3-bucket" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
bitbucketpipelines/aws-s3-deploy:0.3.2

...
upload: dist/android-chrome-192x192.png to s3://S3-bucket/dist/android-chrome-192x192.png
Completed 1.2 MiB/~7.4 MiB (2.2 MiB/s) with ~93 file(s) remaining (calculating...)
Completed 1.5 MiB/~7.5 MiB (2.6 MiB/s) with ~94 file(s) remaining (calculating...)
Completed 1.5 MiB/~7.7 MiB (2.6 MiB/s) with ~97 file(s) remaining (calculating...)
Completed 1.5 MiB/~7.7 MiB (2.6 MiB/s) with ~97 file(s) remaining (calculating...)
upload: dist/android-icon-144x144.png to s3://S3-bucket/dist/android-icon-144x144.png
Completed 1.5 MiB/~7.7 MiB (2.6 MiB/s) with ~96 file(s) remaining (calculating...)
upload: dist/android-chrome-512x512.png to s3://S3-bucket/dist/android-chrome-512x512.png
Completed 1.5 MiB/~7.7 MiB (2.6 MiB/s) with ~96 file(s) remaining (calculating...)
Completed 1.6 MiB/~7.7 MiB (2.6 MiB/s) with ~96 file(s) remaining (calculating...)
upload: dist/android-icon-192x192.png to s3://S3-bucket/dist/android-icon-192x192.png
Completed 1.6 MiB/~7.7 MiB (2.6 MiB/s) with ~95 file(s) remaining (calculating...)
Completed 1.6 MiB/~7.8 MiB (2.5 MiB/s) with ~97 file(s) remaining (calculating...)
Completed 1.6 MiB/~7.8 MiB (2.5 MiB/s) with ~98 file(s) remaining (calculating...)
...
✔ Deployment successful.

but since I only need to upload the content inside the dist/* folder since is a vuejs spa and when I update the local_path to that specific folder doesn't found it as you can see below.

...
--env=LOCAL_PATH="./dist/*" \
--env=S3_BUCKET="S3-bucket" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
bitbucketpipelines/aws-s3-deploy:0.3.2

...
✖ ./dist/* directory doesn't exist.

OR

...
--env=LOCAL_PATH="dist/*" \
--env=S3_BUCKET="S3-bucket" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
bitbucketpipelines/aws-s3-deploy:0.3.2

...
✖ dist/* directory doesn't exist.

 

Any help will be appreciated that can guide me in the right direction?

1 answer

Check this out from the aws s3 sync help page:

Capture.PNG

"from the source directory".

This tool is not designed to act on files. 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

485 views 5 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you