Kyaak / danger-cobertura

Danger plugin to report cobertura coverage
MIT License
5 stars 1 forks source link

`bundle install` fails on Docker #8

Open orkenstein opened 5 years ago

orkenstein commented 5 years ago

When installed on clean ruby-dev image:

Fetching danger 5.11.1
Installing danger 5.11.1
Fetching danger-plugin-api 1.0.0
Installing danger-plugin-api 1.0.0
Fetching ruby-ll 2.1.2
Installing ruby-ll 2.1.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.3.0/gems/ruby-ll-2.1.2/ext/c
/usr/bin/ruby2.3 -r ./siteconf20190121-6-1qfnbyl.rb extconf.rb
creating Makefile

current directory: /var/lib/gems/2.3.0/gems/ruby-ll-2.1.2/ext/c
make "DESTDIR=" clean
sh: 1: make: not found

current directory: /var/lib/gems/2.3.0/gems/ruby-ll-2.1.2/ext/c
make "DESTDIR="
sh: 1: make: not found

make failed, exit code 127

Gem files will remain installed in /var/lib/gems/2.3.0/gems/ruby-ll-2.1.2 for
inspection.
Results logged to
/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ruby-ll-2.1.2/gem_make.out

An error occurred while installing ruby-ll (2.1.2), and Bundler cannot continue.
Make sure that `gem install ruby-ll -v '2.1.2' --source 'https://rubygems.org/'`
succeeds before bundling.

In Gemfile:
  danger-cobertura was resolved to 1.2.0, which depends on
    oga was resolved to 2.15, which depends on
      ruby-ll
The command '/bin/sh -c bundle install' returned a non-zero code: 5

Requires additional:

RUN apt-get install make
RUN apt-get install -y gcc

Is it Danger-pluigin issue or danger-cobertura-specific?

Kyaak commented 5 years ago

I would say this is more a ruby / dependency issue. oga ~> 2.15 was already required in the previous version. I also did not know that make is required for one of the dependencies.

orkenstein commented 5 years ago

Yeah, because of that, I have to make a custom Docker image for CircleCI to run Danger with plugin. Not a big deal, but might be useful for some strangers... BTW, the Dockerfile:

# Pull base image.
FROM microsoft/dotnet:2.1.503-sdk

COPY Gemfile* ./

# Install Ruby.
RUN \
  apt-get update && \
  apt-get install -y ruby2.3-dev

# Other Dependencies
RUN apt-get install make
RUN apt-get install -y gcc

# Bundler
RUN gem install bundler --no-ri --no-rdoc

# Danger & other
RUN bundle install

# Check
RUN ruby --version
RUN bundler --version
RUN danger --version