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:
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.
答案 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