I've been trying the aws-s3-deploy pipeline (https://bitbucket.org/atlassian/aws-s3-deploy), with little success.
My goal is to exclude the .git folder from deployment. According to the pipelin documentation, I set the var
EXTRA_ARGS: "--exclude '.git/*'"
The pipeline runs correctly, but the .git folder is always uploaded to S3. If I use double quotes, it is also uploaded. If I remove the quotes, an error happens (because the shell tries to expand).
Whenever I don't use quotes, and I don't use wildcards, for example
EXTRA_ARGS: "--exclude README.md"
everything works as expected and the file is excluded. So the problem seems to be whenever I want to use wildcards.
Any ideas on how to exclude the .git folder from deployment?
Could you try this:
EXTRA_ARGS: '--exclude=.git/*'
We're currently looking at whether we can improve the way pipes handle parameters that contain special characters like * or " but for now I think this might work.
For me works too. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
tried few combinations to ignore multiple files and folders and this works for me.
EXTRA_ARGS: '--exclude=.git/* --exclude .gitignore --exclude bitbucket-pipelines.yml --exclude README.md'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, exchanging single for double quotes (or the opposite) does not work. This is the log from the pipeline console:
( ... )
Status: Downloaded newer image for bitbucketpipelines/aws-s3-deploy:0.2.2
INFO: Starting deployment to S3...
aws s3 sync . s3://<my-bucket-here>/ --cache-control=max-age=3600 --delete --exclude README.md --exclude ".git/*"
Completed 23 Bytes/~2.2 MiB (122 Bytes/s) with ~88 file(s) remaining (calculating...)
upload: .git/HEAD to s3://<my-bucket-here>/.git/HEAD
(... etc ...)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I haven't tried it, but .git has directories in it, so wouldn't you have to also exclude .git/*/* and maybe even .git/*/*/* - which sort of doesn't make sense. Have you tried just `--exclude .git`?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.