зеркало из https://github.com/mozilla/labs-vcap.git
[staging] CI reports for staging and stager
- Adds ci_reporter to the test group of the two bundles - Removes leftover code for gemspec in staging Rakefile - Vendors ci_reporter and its dependencies - Shortens the env var names it detects Test plans: pass unit tests locally and in jenkins Next steps: coverage Change-Id: Ib75994ad4be766a69436116fd6f9fe86373d65ff
This commit is contained in:
Родитель
fd30f88268
Коммит
3c7b4c40af
|
@ -14,4 +14,5 @@ group :test do
|
|||
gem 'rspec'
|
||||
gem 'sinatra'
|
||||
gem 'webmock'
|
||||
gem 'ci_reporter'
|
||||
end
|
||||
|
|
|
@ -2,6 +2,9 @@ GEM
|
|||
remote: http://rubygems.org/
|
||||
specs:
|
||||
addressable (2.2.6)
|
||||
builder (3.0.0)
|
||||
ci_reporter (1.6.5)
|
||||
builder (>= 2.1.2)
|
||||
crack (0.1.8)
|
||||
daemons (1.1.8)
|
||||
diff-lcs (1.1.3)
|
||||
|
@ -59,6 +62,7 @@ PLATFORMS
|
|||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
ci_reporter
|
||||
eventmachine
|
||||
logging (= 1.5.2)
|
||||
nats
|
||||
|
|
|
@ -37,6 +37,11 @@ task :spec => ['bundler:install:test'] do
|
|||
sh('cd spec && rake spec')
|
||||
end
|
||||
|
||||
task 'ci:spec' do
|
||||
desc 'Run tests for CI'
|
||||
sh('cd spec && rake ci:spec')
|
||||
end
|
||||
|
||||
namespace 'bundler' do
|
||||
task 'install' do
|
||||
sh('bundle install')
|
||||
|
|
|
@ -7,6 +7,8 @@ require 'bundler'
|
|||
Bundler.setup(:default, :test)
|
||||
|
||||
require 'rspec/core/rake_task'
|
||||
require 'ci/reporter/rake/rspec'
|
||||
ENV['CI_REPORTS'] = File.expand_path('reports', File.dirname(__FILE__))
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||
t.pattern = '**/*_spec.rb'
|
||||
|
@ -15,3 +17,4 @@ end
|
|||
|
||||
task :default => [:spec]
|
||||
|
||||
task 'ci:spec' => ['ci:setup:rspec', :spec]
|
||||
|
|
|
@ -23,13 +23,13 @@ RSpec.configure do |config|
|
|||
config.before(:all) do
|
||||
begin
|
||||
VCAP::Subprocess.run("cp -a #{File.join(StagingPlugin::DEFAULT_MANIFEST_ROOT, 'sinatra.yml')} #{STAGING_TEMP}")
|
||||
if ENV["CI_VCAP_STAGER_RUBY18"] && ENV["CI_VCAP_STAGER_RUBY18_VER"] then
|
||||
if ENV["CI_VCAP_RUBY18"] && ENV["CI_VCAP_RUBY18_VER"] then
|
||||
sinatra_manifest = {
|
||||
'name' => "sinatra",
|
||||
'runtimes' => [
|
||||
'ruby18' => {
|
||||
'version' => ENV["CI_VCAP_STAGER_RUBY18_VER"],
|
||||
'executable' => ENV["CI_VCAP_STAGER_RUBY18"],
|
||||
'version' => ENV["CI_VCAP_RUBY18_VER"],
|
||||
'executable' => ENV["CI_VCAP_RUBY18"],
|
||||
},
|
||||
],
|
||||
'detection' => [
|
||||
|
@ -39,7 +39,6 @@ RSpec.configure do |config|
|
|||
File.open(File.join(STAGING_TEMP, "sinatra.yml"), "w") do |file|
|
||||
YAML.dump sinatra_manifest, file
|
||||
end
|
||||
puts File.join(STAGING_TEMP, "sinatra.yml")
|
||||
end
|
||||
rescue VCAP::SubprocessStatusError => e
|
||||
puts "Unable to copy staging manifests. Permissions problem?"
|
||||
|
|
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -1,3 +1,6 @@
|
|||
source :rubygems
|
||||
|
||||
gemspec
|
||||
group :test do
|
||||
gem 'ci_reporter'
|
||||
end
|
||||
|
|
|
@ -12,6 +12,9 @@ PATH
|
|||
GEM
|
||||
remote: http://rubygems.org/
|
||||
specs:
|
||||
builder (3.0.0)
|
||||
ci_reporter (1.7.0)
|
||||
builder (>= 2.1.2)
|
||||
daemons (1.1.8)
|
||||
diff-lcs (1.1.3)
|
||||
eventmachine (0.12.11.cloudfoundry.3)
|
||||
|
@ -50,4 +53,5 @@ PLATFORMS
|
|||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
ci_reporter
|
||||
vcap_staging!
|
||||
|
|
|
@ -3,9 +3,6 @@ require 'rake'
|
|||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
|
||||
require 'vcap/staging/version'
|
||||
|
||||
GEM_NAME = 'vcap_staging'
|
||||
GEM_VERSION = VCAP::Staging::VERSION
|
||||
|
||||
task :build do
|
||||
sh "gem build vcap_staging.gemspec"
|
||||
end
|
||||
|
@ -15,6 +12,11 @@ task :spec => ['bundler:install:test'] do
|
|||
sh('cd spec && rake spec')
|
||||
end
|
||||
|
||||
task 'ci:spec' do
|
||||
desc 'Run tests for CI'
|
||||
sh('cd spec && rake ci:spec')
|
||||
end
|
||||
|
||||
namespace 'bundler' do
|
||||
task 'install' do
|
||||
sh('bundle install')
|
||||
|
|
|
@ -7,6 +7,8 @@ require 'bundler'
|
|||
Bundler.setup(:default, :test)
|
||||
|
||||
require 'rspec/core/rake_task'
|
||||
require 'ci/reporter/rake/rspec'
|
||||
ENV['CI_REPORTS'] = File.expand_path('reports', File.dirname(__FILE__))
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec) do |t|
|
||||
t.pattern = '**/*_spec.rb'
|
||||
|
@ -15,3 +17,4 @@ end
|
|||
|
||||
task :default => [:spec]
|
||||
|
||||
task 'ci:spec' => ['ci:setup:rspec', :spec]
|
||||
|
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче