Could not find the type of CI for Danger to run on.
Hey, I've set up danger through this guide here: https://danger.systems/guides/getting_started.html and got stopped by this error:
→ bundle exec danger
Could not find the type of CI for Danger to run on.
I'm using a privately hosted GitLab server and therefore I setup my env variables in my .bash_profile like this:
export DANGER_GITLAB_HOST=https://git.XXX.de/
export DANGER_GITLAB_API_BASE_URL=https://git.XXX.de/api/v4
and created an environment variable in GitLab for my project where the bot has access to.
I have also created a Dangerfile through the bundle exec danger init and installed danger-gitlab with bundler. Here are my bundle and Dangerfile:
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem 'danger-gitlab'
message("HEY")
System OS: Mac OS 10.14 Beta (18A371a) Ruby: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17] Bundler: Bundler version 1.16.4
Okay, it seems this is caused because there is no local bitbucket support yet... When will this happen?
I personally don't plan on building it (I only build things I need, or fix critical bugs for everyone) so there's no timeline unless you want to give it a shot?
I don't think I have time for this and really no knowledge or experience with ruby 😄
Hi @muuvmuuv, I see that you mention both Gitlab and Bitbucket in your comments. Which one is (was) it?
I'm trying to setup dangerbot using the danger-gitlab gem but cannot get it to work after setting up the environment variables, resulting in the same error message as you. Also, running bundle exec danger init asks me for Github-related information. Should I just run bundle exec danger-gitlab init?
It's the first time I use anything Ruby-related and am honestly kind of lost. Thanks in advance!
Hey @tbarusseau I use both. I develop with GitLab in one company and BitBucket in another 😆 (yes, it's pain).
We weren't able to implement it yet and it is not on our priority list so I can't give you any good answer on this, sorry. But by reading my initial issue I think I only meant GitLab because at this point I only had used BitBucket privately.
I guess BitBucket is not supported anyway but GitLab should, so bundle exec danger-gitlab init should be working I guess. I will add this thread to our ticket so if we plan to implement I can test again and give a more detailed answer ^^.
It actually works perfectly, I didn't realize the program had to run literally in the CI to work, for some reason I expected dangerbot to run as a system daemon, waiting for webhooks to execute.
Everything makes more sense now 😄