Continuous Integration: Codeship + Gulp (Jasmine)

时间:2015-06-15 15:06:52

标签: codeship gulp-jasmine

My Continuous Integration works pretty great using Codeship except one thing: stop deploying and alert us when unit tests are failing.

Here is our current commands:

  1. npm install
  2. npm install bower
  3. bower install
  4. gulp test
  5. gulp build

The problem is whether gulp test end with success or fail, the gulp build builds.

I succeed to console.log() my gulp test exit status but I have no idea about how to make Codeship listen to this exit status.

3 个答案:

答案 0 :(得分:2)

如果任何命令退出并且退出代码不是零,则Codeship上的构建将失败。

请确保运行gulp test

的情况

(如果出现任何其他问题,您也可以通过support@codeship.com与我们联系!)

答案 1 :(得分:1)

使用@mlocker回答和this discussion on Github,我找到了一个适合我的解决方法:

gulp test

这里的诀窍是,如果exitStatus与0不同,那么你会在&#34上得到一个formatError;有失败的单元测试"这将使1退出failed,使代码停止并将构建视为# Name the components on this agent agent.sources = r1 agent.sinks = k1 agent.channels = c1 # Describe the source agent.sources.r1.type = org.apache.flume.source.AvroSource agent.sources.r1.bind = 192.168.1.31 agent.sources.r1.port = 43999 # Describe the sink agent.sinks.k1.type = com.zaloni.bedrock.collection.flume.sink.BedrockAvroHDFSEventSink agent.sinks.k1.hdfs.path = /user/bedrock/sentimentAnalysis/TweetData agent.sinks.k1.hdfs.rollInterval = 300 agent.sinks.k1.hdfs.rollSize = 1000 agent.sinks.k1.hdfs.rollCount = 100 agent.sinks.k1.hdfs.fileType = DataStream agent.sinks.k1.hdfs.writeFormat = Text # Describe the channel agent.channels.c1.type = org.apache.flume.channel.MemoryChannel # bind the source and sink to the channel agent.sources.r1.channels = c1 agent.sinks.k1.channel = c1

答案 2 :(得分:0)

也许您可以尝试链接测试并构建任务?

TOTAL | 2 | 8 | 2