title: gitlab-CI pipeline: lftp error 550 when trying to delete files
body: <p>I am using the free shared runners on the gitlab.com environment. I have a gitlab-CI pipeline that runs the following lftp commands one after the other: </p>
  
  <ul>
  <li><code>lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; glob -a rm -r ./httpdocs/*"</code></li>
  <li><code>lftp -c "set ftp:ssl-allow no; open -u $USERNAME,$PASSWORD $HOST; mirror -R public/ httpdocs  --ignore-time --parallel=50 --exclude-glob .git* --exclude .git/"
  </code></li>
  </ul>
  
  <p>The purpose of these commands is to delete the content of the httpdocs folder (previous files) and then upload new build artifact.</p>
  
  <p>The CI pipeline is triggered from a CMS. It sometimes happen that the content editors update the content in parallel, resulting in a lot of triggers that run in parallel (the pipeline takes about 3 minutes to finish).</p>
  
  <p>The pipeline will then start failing with the following error:</p>
  
  <blockquote>
    <p>rm: Access failed: 550 /httpdocs/build-html-styles.css: No such file
    or directory</p>
  </blockquote>
  
  <p>This happens because a file deleted by another pipeline is queued for deletion. A very similar error happens when the httpdocs folder is completely empty. This results in my whole pipeline failing (the second upload lftp command does not get executed at all).</p>
  
  <p>Examples of failing pipelines and their output:</p>
  
  <ul>
  <li><a href="https://gitlab.com/Sustersic/bit/-/jobs/375793957" rel="nofollow noreferrer">#375793957</a></li>
  <li><a href="https://gitlab.com/Sustersic/bit/-/jobs/375793968" rel="nofollow noreferrer">#375793968</a></li>
  <li><a href="https://gitlab.com/Sustersic/bit/-/jobs/375793932" rel="nofollow noreferrer">#375793932</a></li>
  <li><a href="https://gitlab.com/Sustersic/bit/-/jobs/375793930" rel="nofollow noreferrer">#375793930</a></li>
  <li><a href="https://gitlab.com/Sustersic/bit/-/jobs/375793926" rel="nofollow noreferrer">#375793926</a></li>
  <li><a href="https://gitlab.com/Sustersic/bit/-/jobs/375793924" rel="nofollow noreferrer">#375793924</a></li>
  </ul>
  
  <p>How do I prevent this from happening? Using lftp to upload the artifact is not a must - I am running the <code>node:8.10.0</code> docker image. <a href="https://gitlab.com/Sustersic/bit/blob/master/.gitlab-ci.yml" rel="nofollow noreferrer">Gitlab-ci.yml</a> file in question.</p>