Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The eb cli should ignore the .git folder by default #315

Open
sonic1981 opened this issue Feb 20, 2023 · 1 comment
Open

The eb cli should ignore the .git folder by default #315

sonic1981 opened this issue Feb 20, 2023 · 1 comment

Comments

@sonic1981
Copy link

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Tell us about your request

The eb cli currently uploads the .git folder of local repositories. This seems like strange behaviour.

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?

When I run eb deploy I would not expect it to upload the .git folder of my application. Not least of which it makes the .zip file extremely large.

Are you currently working around this issue?

You can work around it by adding .git to the .ebignore file but I'd suggest that you shouldn't need to do this for every repo?

@NihalM99
Copy link
Contributor

Hi @sonic1981 , are you still facing the issue ? . I initialized a git repo and was able to deploy an Elastic Beanstalk environment and the folder uploaded did not include .git folder , seems to work as expected .
My Application directory looks like :

testapp1]$ ls -la
total 28
drwxr-xr-x 4 nihamukt amazon 4096 Oct 20 04:50 .
drwxr-xr-x 4 nihamukt amazon 4096 Oct 20 04:48 ..
-rw-r--r-- 1 nihamukt amazon 1492 Oct 20 04:49 data.txt
drwxr-xr-x 2 nihamukt amazon 4096 Oct 20 04:55 .elasticbeanstalk
drwxr-xr-x 8 nihamukt amazon 4096 Oct 20 04:49 .git
-rw-r--r-- 1 nihamukt amazon  108 Oct 20 04:50 .gitignore
-rw-r--r-- 1 nihamukt amazon   12 Oct 20 04:48 index.html

After running eb create , we see my-eb-app12/app-c4c1-231020_045054032887.zip is uploaded .

testapp1]$ eb init -p "PHP" my-eb-app12 --profile my-profile 
Application my-eb-app12 has been created.
(venv) [testapp1]$ eb create my-eb-app-env
Creating application version archive "app-c4c1-231020_045054032887".
Uploading my-eb-app12/app-c4c1-231020_045054032887.zip to S3. This may take a while.
Upload Complete.

On running the command zipinfo on the file , we see the files uploaded are data.txt and index.html . The .git folder is not included .

 zipinfo app-c4c1-231020_045054032887.zip 
Archive:  app-c4c1-231020_045054032887.zip
Zip file size: 519 bytes, number of entries: 2
-rw----     0.0 fat     1492 tx defN 23-Oct-19 21:49 data.txt
-rw----     0.0 fat       12 tx stor 23-Oct-19 21:49 index.html
2 files, 1504 bytes uncompressed, 233 bytes compressed:  84.5%

OS : Amazon Linux 2
EB-CLI Version : 3.20.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants