summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-15 15:15:35 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-11-15 15:15:35 +0200
commit06a5402bd1a9f556d94eafc2a93ab7cd63306e73 (patch)
treec751a61e84ed7e3fdfc39ba56908c51537623edd /lib
parent341eb082349cfa575a60842ca0a0203c05e45805 (diff)
downloadgitlab-ci-06a5402bd1a9f556d94eafc2a93ab7cd63306e73.tar.gz
Ability to cancel build
Diffstat (limited to 'lib')
-rw-r--r--lib/runner.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/runner.rb b/lib/runner.rb
index c0ec09c..924a1c7 100644
--- a/lib/runner.rb
+++ b/lib/runner.rb
@@ -24,6 +24,8 @@ class Runner
path = project.path
commands = project.scripts
+ return if build.canceled?
+
build.run!
prepare_project(path, build.ref)
@@ -33,6 +35,8 @@ class Runner
status = command(line, path)
build.write_trace(@output)
+ return if build.canceled?
+
unless status
build.drop!
return