title: Gitlabs artifact of one project used in further projects
body: <h1>Question</h1>
  
  <ul>
  <li>What is the best way to carry artifacts (jar, class, war) among projects when using docker containers in CI phase.</li>
  </ul>
  
  <p>Let me explain my issue in details, please don't stop the reading... =)</p>
  
  <h2>Gitlabs project1</h2>
  
  <ul>
  <li>unit tests</li>
  <li>etc...</li>
  <li>package</li>
  </ul>
  
  <h2>Gitlabs project2</h2>
  
  <ul>
  <li>unit test</li>
  <li>etc...</li>
  <li>build (failing)
  
  <ul>
  <li>here I need one artifact (jar) generated in project1</li>
  </ul></li>
  </ul>
  
  <h2>Current scenario / comments</h2>
  
  <ul>
  <li>I'm using dockers so in each .gitlab-ci.yml I'll have independent containers</li>
  <li>All is working fine in project1</li>
  <li>If I use "shell" instead of dockers in my .gitlab-ci.yml I can keep the jar file from the project1 in the disk and use when project2 kicks the build</li>
  <li>Today my trigger on call project2 when project1 finish is working nicely</li>
  <li>My artifact is not an RPM so I'll not add into my repo</li>
  </ul>
  
  <h2>Possible solutions</h2>
  
  <ul>
  <li>I can commit the artifact of project1 and checkout when need to build project2</li>
  <li>I need to study if cache feature from gitlabs is designed for this purpose (<a href="https://stackoverflow.com/questions/33940384/gitlab-8-2-1-how-to-use-cache-in-gitlab-ci-yml">gitlab 8.2.1, How to use cache in .gitlab-ci.yml</a>)</li>
  </ul>