title: yarn command not found in gitlab ci
body: <p>I am trying to configure my gitlab-ci to use <code>yarn install</code> instead of <code>npm install</code></p>
  
  <p>My current gitlab-ci.yml looks like:</p>
  
  <pre><code>image: node:6.9.4
  
  cache:
    paths:
    - node_modules/
    - .yarn
  
  before_script:
    - apt-get update -qq &amp;&amp; apt-get install -qy libelf1
  
  stages:
    - test
  
  test_core:
    stage: test
    script:
    - yarn config set cache-folder .yarn
    - yarn install
    - npm run build
    - npm run test
    tags:
      - 2gb
  </code></pre>
  
  <p>But the build fails with the error: 
  <code>/bin/bash: line 48: yarn: command not found</code></p>
  
  <p>is there something I am missing?
  I tried installing yarn with:</p>
  
  <p><code>curl -o- -L https://yarnpkg.com/install.sh | bash</code></p>
  
  <p>this gave me same error, probably because I need to reload the bash environment for the yarn command to become available.</p>
  
  <p>The above config works perfect with <code>npm install</code>.</p>
  
  <p>Please help me resolve this. If there is something missing in my config file or there is something wrong with the gitlab-ci.
  Thanks.</p>