Merge code from: https://github.com/gitlabhq/gitlab-ci/commit/1949079b4845d624c60a4f3e8a127999c6eb6b0a