Build stuck on `running` when declaring an empty `variables` key in `.gitlab-ci.yml`
.gitlab-ci.yml passes the CI linter:
test: image: docker:latest services: - docker:dind stage: test variables: script: - echo "Test"
Because of the empty
variables key the following error is logged in the production.log:
NoMethodError (undefined method `map' for nil:NilClass): /opt/gitlab/embedded/service/gitlab-rails/app/models/ci/build.rb:373:in `job_yaml_variables' /opt/gitlab/embedded/service/gitlab-rails/app/models/ci/build.rb:358:in `yaml_variables' /opt/gitlab/embedded/service/gitlab-rails/app/models/ci/build.rb:112:in `variables'
Full stacktrace on http://pastebin.com/Wee4fubz
This error causes my build to switch to
running state but then nothing happens. There is no output and no docker container gets started by the runner.
The empty variables key should be caught by the linter or get handled correctly during the build.
GitLab 8.8.5 GitLab Shell 2.7.2 GitLab Runner 1.2.0