title: .gitlab-ci.yml after_script section: how can I tell whether the task succeeded or failed?
body: <p>I'm using <a href="https://about.gitlab.com/features/gitlab-ci-cd/" rel="noreferrer">Gitlab CI</a>, and so have been working on a fairly complex <a href="https://docs.gitlab.com/ee/ci/yaml/" rel="noreferrer"><code>.gitlab-ci.yml</code></a> file. The file has an <code>after_script</code> section which runs when the main task is complete, or the main task has failed somehow. Problem: I need to do different cleanup based on whether the main task succeeded or failed, but I can't find any <a href="https://docs.gitlab.com/ee/ci/variables/" rel="noreferrer">Gitlab CI variable</a> that indicates the result of the main task.</p>
  
  <p>How can I tell, inside the <code>after_script</code> section, whether the main task has succeeded or failed?</p>