Skip to content

Commit

Permalink
Merge pull request #2 from eyefodder/continuous_integration
Browse files Browse the repository at this point in the history
Continuous integration
  • Loading branch information
eyefodder committed Sep 23, 2014
2 parents b0b029a + 3ccbc52 commit 6c0d6a3
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ capybara-*.html
/tmp
/db/*.sqlite3
/public/system
/coverage/
/reports/
/spec/tmp
**.orig
rerun.txt
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,8 @@ group :development, :test do
# code_coverage
gem 'simplecov', :require => false
gem 'simplecov-rcov', :require => false

# continuous_integration
gem 'ci_reporter_rspec'
end

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Branch | Description
[guard_growl] (spex_branches/guard_growl.md) | Setting up Growl to get notifications from your Virtual Machine
[code_coverage] (spex_branches/code_coverage.md) | Getting code coverage setup on your app
[duplicating_repo] (spex_branches/duplicating_repo.md) | A way to duplicate a rails app (e.g. one of these examples) into a new repo
[continuous_integration] (spex_branches/continuous_integration.md) | Setting up rspec to output Ci friendly reports
[image_upload] (spex_branches/image_upload.md) | A simple example of uploading images to the server using [CarrierWave] (https://github.com/carrierwaveuploader/carrierwave)


## Before you begin
1. Install [Vagrant] (http://www.vagrantup.com/downloads.html)
Expand Down
5 changes: 5 additions & 0 deletions lib/tasks/ci_reporter.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if ENV['GENERATE_REPORTS'] == 'true'
puts "GENERATE_REPORTS"
require 'ci/reporter/rake/rspec'
task :spec => 'ci:setup:rspec'
end
17 changes: 17 additions & 0 deletions ops/dotfiles/jenkins_env_vars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Location for generated ci reporter style test reports
# this location is set to be somewhere that jenkins can find
export CI_REPORTS=reports/spec


# Location for generated simplecov test reports
export CI_COVERAGE_REPORTS=reports/coverage


# set to 'true' to output ci reporter style test reports
export GENERATE_REPORTS=true


# set to 'true' to output simplecov reports
export GENERATE_COVERAGE_REPORTS=true

export RAILS_ENV=test
2 changes: 2 additions & 0 deletions ops/setup_guest_bash_profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ echo "" >> $bash_file
add_comment_once "The following are variables set with sensible defaults"
add_comment_once "You can change them if you like, but make sure you know what they do..."
echo "" >> $bash_file
add_bash_entry CI_REPORTS ../reports/spec 'Location for generated ci reporter style test reports\n# this location is set to match the shared folder in the Vagrantfile' 'true'
add_bash_entry CI_COVERAGE_REPORTS ../reports/coverage 'Location for generated simplecov test reports' 'true'
add_bash_entry GENERATE_REPORTS true "set to 'true' to output ci reporter style test reports" 'true'
add_bash_entry GENERATE_COVERAGE_REPORTS true "set to 'true' to output simplecov reports." 'true'


Expand Down
6 changes: 6 additions & 0 deletions spex_branches/continuous_integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Spex: Continuous Integration
===========================

This example shows how to prepare your app for running on a [Jenkins] (http://jenkins-ci.org/) continuous integration server

For more details, read my post about the process [on my blog] (http://eyefodder.com/2014/10/rails-continuous-integration.html ‎)
6 changes: 6 additions & 0 deletions spex_branches/image_upload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Spex: Image Upload
===========================

This example shows how to upload images to the server using [CarrierWave] (https://github.com/carrierwaveuploader/carrierwave) and resize them with [ImageMagick] (http://www.imagemagick.org/).

For more details, read my post about the process [on my blog] (http://eyefodder.com/2014/10/file-uploading.html ‎)

0 comments on commit 6c0d6a3

Please sign in to comment.