Not pulling Storage folder from git to artifact
Asked by Jeff Pittelkow:

So, I have 6.6 installed, and I'm working with a Laravel 5.6 repo from Github. The problem I'm having is that [Laravel has a 'storage' folder](https://laravel.com/docs/5.6/structure) in root with sub folders, and Bamboo is not grabbing that folder and putting it into my artifacts.

I have confirmed this folder is not in gitignore, and it pulls fine when I do a git pull locally. It's only not pulling inside bamboo to artifacts.

Has anyone experienced this or know how to solve it? This is a fresh install of 6.6.


Answers:
author: Gabriel Ribeiro
body: Hi Jeff,

I did some tests here and I was able to reproduce the same behavior, happens that the /storage folder (and its subfolders) from Loravel framework is empty by default and Bamboo is not capable of publishing empty folder structures as artifacts (see [BAM-14358](https://jira.atlassian.com/browse/BAM-14358) for details).

As a workaround, you can archive the whole project (using a script task right after the source code checkout) and publish as artifact only the resultant compressed file (which can be uncompressed during the deployment phase).

Let us know if this is a feasible solution for you.

thanks

comments: author: Gabriel Ribeiro
body: Just an addendum,

This is the specs code of my test plan:

```
 public Plan plan() {
    final Plan plan = new Plan(new Project()
             .oid(new BambooOid("y0p9kjlynugx"))
             .key(new BambooKey("PROJ"))
             .name("PROJECT"),
        "Laravel_test",
         new BambooKey("LAR"))
         .oid(new BambooOid("p1pdfs7r7aip"))
         .pluginConfigurations(new ConcurrentBuilds()
                  .useSystemWideDefault(false))
         .stages(new Stage("Default Stage")
                  .jobs(new Job("Default Job",
                          new BambooKey("JOB1"))
                          .artifacts(new Artifact()
                                    .name("Tar")
                                    .copyPattern("*.tar.gz"))
                          .tasks(new VcsCheckoutTask()
                                   .description("Checkout Default Repository")
                                   .checkoutItems(new CheckoutItem().defaultRepository()),
                              new ScriptTask()
                                   .description("Compress project")
                                   .inlineBody("tar -zcvf laravel.tar.gz ./*"))))
         .linkedRepositories("Laravel")
 
         .triggers(new RepositoryPollingTrigger())
         .planBranchManagement(new PlanBranchManagement()
                  .delete(new BranchCleanup())
                  .notificationForCommitters());
    return plan;
 }
```

It's working like a charm ;)


author: Jeff Pittelkow
body: I'll take a look at doing this. Is this a change? I'm upgrading from a Bamboo 5.13 server to 6.6 and the 5.13 server did not experience this issue.


author: Gabriel Ribeiro
body: Hi Jeff,

Apparently yes. I didn't perform this same test in old versions but, according to the bug report, this was working on versions below 5.14.1.

Please let us know if the proposed workaround worked for you.


author: Jeff Pittelkow
body: That seemed to work. I archived on the build, unarchived on the deploy and things seem to be working.

Thanks for the help! That bug really needs to be fixed!


Tags: github

laravel