title: Access artifacts from previous run of same job
body: <p>I want to use Gitlab CI/CD for deployment. The same codebase is used to deploy to different environments and requires a <em>statefile</em> (state of environment) for deployment, which need to be updated after the deployment, and fetched before deployment. As it is a critical piece of information I want it to be a build artifact.</p>
  
  <p>Consider my <em>deployment</em> pipeline and different jobs <code>deploy-env1</code> and <code>deploy-env2</code>. Is it possible to define the jobs in a way they</p>
  
  <ul>
  <li>add the file <code>state.dat</code> as a build artifact (easy using the <code>artifacts</code> option)</li>
  <li>start with the latest version of the statefile (last successful run of same job on the current branch)</li>
  <li>start with an empty file if no previous successful run is present</li>
  </ul>
  
  <p>As it seems I currently cannot configure a job to <em>depend</em> on itself, do you know if there is a way to realize this?</p>