ingenieux / awseb-deployment-plugin

Jenkins Plugin for AWS Elastic Beanstalk
Apache License 2.0
29 stars 53 forks source link

why is jenkins removing empty directories from downloaded git repo? #83

Closed leabdalla closed 6 years ago

leabdalla commented 6 years ago

I'm deploying a Laravel application to Elastic Beanstalk AWS service.

Its working fine but for some reason the zip file that is being created by Jenkins doesn't contains directories which has only .gitignore file inside. Example:

/bootstrap
    app.php
    /cache
        .gitignore
/storage
    /app
        .gitignore
    /framework
        .gitignore
    /logs
        .gitignore

None of these directories with ONLY .gitignore are present in zip file generated by Jenkins and this is causing errors in AWS. If I create a dummy file inside it, then the directory isn't ignored.

Maybe should I set some configuration on git clone command in Jenkins?

aldrinleal commented 6 years ago

Sorry, who creates this zip file?

leabdalla commented 6 years ago

This plugin I guess, according this file:

https://github.com/ingenieux/awseb-deployment-plugin/blob/ba45203b01440a46eb0ef9fc71fb403e41a136da/src/main/java/br/com/ingenieux/jenkins/plugins/awsebdeployment/cmd/BuildAndUploadArchive.java

aldrinleal commented 6 years ago

Thats the problem: If you left rootObject pointing to a directory, it should zip it. However, its zip is a bit lacking in some details, so I'd advise you manually zip it (hint: zip -r FILE PATHS...) and pass it to the plugin instead.

Espero ter ajudado. Eh nois na fita.