summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ci/api/builds.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb
index 2d3d6c75f00..f37a96da93c 100644
--- a/lib/ci/api/builds.rb
+++ b/lib/ci/api/builds.rb
@@ -38,6 +38,8 @@ module Ci
authenticate_runner!
update_runner_last_contact
build = Ci::Build.where(runner_id: current_runner.id).running.find(params[:id])
+ forbidden!('Build has been erased!') if build.erased?
+
build.update_attributes(trace: params[:trace]) if params[:trace]
case params[:state].to_s
@@ -99,6 +101,7 @@ module Ci
not_found! unless build
authenticate_build_token!(build)
forbidden!('Build is not running!') unless build.running?
+ forbidden!('Build has been erased!') if build.erased?
artifacts_upload_path = ArtifactUploader.artifacts_upload_path
artifacts = uploaded_file(:file, artifacts_upload_path)