See https://gitlab.com/gitlab-org/gitlab-ci-yml/merge_requests/184 Thanks to @kinolaev for this contribution.