English 中文(简体)
怎么能使我 task忙地让Jenkins知道建筑失败?
原标题:How can get my rake task to let Jenkins know that the build has failed?

我们刚刚设立了Jenkins CI服务器,供我们使用,

一切都运转良好,一旦将法典检查到我们的Githubpo,就自动进行建筑。

问题在于发现建筑失败。 我的任务如下,由Jenkins领导。

rake test:browser

页: 1

desc "Run browser tests."
task :browser => :environment do
    start = Time.now()
    puts "Stopping apache if running"
    system  sudo apache2ctl stop 
    puts "Running selenium tests"
    Dir.glob( ./test/browser/*.rb ).each { |r|
        puts r
        system  rvmsudo ruby   +  r
    }
    system  echo -e "a" 
    puts "All browser tests, elapsed: " + (Time.now() - start).to_s + " seconds"
end

I ve证实,这些测试是正常进行的(使用头盔与Xvfb)。 问题是,Jenkins没有发现浏览器测试中的任何建筑故障。 似乎为通常的铁路单位、功能和一体化测试工作(在这项任务之前,I在Jenkins进行“铁路测试”)。

就我所知,上述文字没有把废墟的撤离法传给Jenkins,也没有说明原因。 现在,我想到的唯一工作是将所有试验产出转向缓冲,并利用灰色来寻找失败的关键词,并在发现失败的撤离代码时通过,但这对我感到 ha。

我需要做些什么来让Jenkins在“系统快车道+”指挥系统返回失败的撤离法时发现?

附录

robertodecurnex是正确的,系统总是在恢复成功。 然而, r式指挥机允许你掌握准确的编码。 因此,我改变了这一点:

system  rvmsudo ruby   +  r

为此:

 sh  rvmsudo ruby   +  r do |ok, res|
     raise "Failed test." if !ok
 end

那些似乎正在通过失败的法典退出Rake,提醒Jenkins说,该建筑没有成功。

最佳回答

即便是“<系统编码><>>>系统”的电话未能完成任务,也恢复了正常的执行状态。

为了让 you服务机告知存在一些错误,程序应当归还一个错误执行法。

Note that, as an example, cucumber and rspec will blow if there s an error in any of the cases.

页: 1 电话回馈价值,使您的工作得以在同一废墟中进行,而不是作为<编码> 系统<<>代码>。 引申另一封。

问题回答

暂无回答




相关问题
rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Auth-code with A-Za-z0-9 to use in an URL parameter

As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

activerecord has_many :through find with one sql call

I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签