How to use Danger on GitLab CI/CD? #1441
-
Anyone have success using Danger on GitLab.com's CI/CD? I have this post on StackOverflow: How to use Danger on GitLab CI/CD?. GitLab CI/CD is already set up to run Danger, you have to add this to your include:
- project: 'gitlab-org/quality/pipeline-common'
file: '/ci/danger-review.yml' Reference: /ci/danger-review.yml I'm also overriding the ruby image via: danger-review:
image: ruby:3.2.2 My
You should be able to add a Ruby-flavored
However, in the bundler: failed to load command: danger (/usr/local/bundle/bin/danger)
/usr/local/bundle/gems/danger-9.3.0/lib/danger/danger_core/dangerfile.rb:73:in `method_missing': (Danger::DSLError)
[!] Invalid `Dangerfile` file: undefined local variable or method `gitlab' for #<Danger::Dangerfile:0x00007f2243d7dcc0 ... Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I would look at how GitLab uses danger, https://gitlab.com/gitlab-org/gitlab as I assume they use it - but I'm guessing that the env vars / url slug for detecting gitlab CI are not correctly marking it as such |
Beta Was this translation helpful? Give feedback.
I would look at how GitLab uses danger, https://gitlab.com/gitlab-org/gitlab as I assume they use it - but I'm guessing that the env vars / url slug for detecting gitlab CI are not correctly marking it as such