From 2ad385341d5caccb2502d951a236e5df7043f2e2 Mon Sep 17 00:00:00 2001 From: David Hollinger Date: Mon, 9 Mar 2020 13:36:10 -0500 Subject: [PATCH] Some docker fixes --- Rakefile | 34 ++++++++++++++++++---------------- build/docker/Dockerfile | 4 +++- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Rakefile b/Rakefile index 11d6fb6..9ff96de 100644 --- a/Rakefile +++ b/Rakefile @@ -26,25 +26,27 @@ namespace :db do end end -require 'rubocop/rake_task' -RuboCop::RakeTask.new +if ENV['SINATRA_ENV'] != 'production' + require 'rubocop/rake_task' + RuboCop::RakeTask.new -require 'rspec/core/rake_task' -RSpec::Core::RakeTask.new(:spec) + require 'rspec/core/rake_task' + RSpec::Core::RakeTask.new(:spec) -desc 'Run all tests' -task test: %i[rubocop spec] + desc 'Run all tests' + task test: %i[rubocop spec] -require 'coveralls/rake/task' -desc 'Run all tests and report to coverage tools' -task test_and_report_coverage: [:test] do - Coveralls::RakeTask.new - Rake::Task['coveralls:push'].invoke -end + require 'coveralls/rake/task' + desc 'Run all tests and report to coverage tools' + task test_and_report_coverage: [:test] do + Coveralls::RakeTask.new + Rake::Task['coveralls:push'].invoke + end -GitHubChangelogGenerator::RakeTask.new :changelog do |config| - config.user = 'voxpupuli' - config.project = 'puppet_webhook' - config.future_release = PuppetWebhook::VERSION + GitHubChangelogGenerator::RakeTask.new :changelog do |config| + config.user = 'voxpupuli' + config.project = 'puppet_webhook' + config.future_release = PuppetWebhook::VERSION + end end # vim: syntax=ruby diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index a4767e7..5413cb8 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -2,10 +2,12 @@ FROM 'ruby:2.5' as rubybuilder ARG version=master # Replace with a pull from releases page +RUN gem install bundler:2.1.4 + RUN apt-get install git && \ git clone -b $version https://github.com/voxpupuli/puppet_webhook.git app/ && \ cd /app && \ - bundle install + bundle install --without development RUN mkdir /root/.ssh && echo "StrictHostKeyChecking no" >> /root/.ssh/config