title: Gitlab CI/CD fails while "Cleaning up project directory and file based variables" with "ERROR: Job failed: exit code 1"
body: <p>My gitlab pipeline which has been running for nearly six months is now failing unexpectedly.</p>
  <p>Every line prior runs successfully and then this happens:</p>
  <pre><code>Setting up curl (7.52.1-5+deb9u16) ...
  $ curl -s https://deb.nodesource.com/setup_12.x | bash
  Cleaning up project directory and file based variables 
  ERROR: Job failed: exit code 1
  </code></pre>
  <p>I cannot for the life of me figure out what has changed. I thought it might be related <a href="https://gitlab.com/gitlab-com/gl-infra/production/-/issues/5590" rel="nofollow noreferrer">this issue</a> but I'm not having any network issues, timeouts, etc.</p>
  <p>Mildly obfuscated version of my .gitlab-ci.yml.
  Obviously I'm using .gitlab-ci.yml to configure my pipelines and I'm also using the shared GitLab runners.</p>
  <pre><code>
  image: python:3.6-stretch
  
  variables:
      ACCESS_KEY_ID: **********
      SECRET_ACCESS_KEY: **********
  
  before_script:
    - apt-get update
    - apt-get install -y curl
    - curl -s https://deb.nodesource.com/setup_12.x | bash
    - apt-get install -y nodejs
    - apt-get install -y npm
    - npm install -g serverless
    - pip install  --upgrade awscli
    - python --version
    - nodejs --version
  
  stages:
    - deploy
  
  deploy:
    stage: deploy
  
    only:
    - master   # We will run the CD only when something is going to change in master branch.
  
    script:
      - npm install   # Archive the code repository.
      - pip install -r requirements.txt
  
      - cd services/service1/
      - sls deploy -v --stage production
      - cd ../../
  
      - cd services/service2/
      - sls deploy -v --stage production
      - cd ../../
  
      - cd services/service3/
      - sls deploy -v --stage production
      - cd ../../
  
  
    environment:
      name: master
  </code></pre>