summaryrefslogtreecommitdiff
path: root/app/models/commit_status.rb
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-08-19 18:35:07 +0000
committerRobert Speicher <robert@gitlab.com>2016-08-19 18:35:07 +0000
commitc711fe15dd2409161702f20a1ccffd861ae798ab (patch)
tree0d95446ad0e85c69fc04084cb7423a0d37b0620b /app/models/commit_status.rb
parent82a39e3e698b6332c44f036b735ae98926767057 (diff)
parenta395b76286280d2b5e75ef25fca92dfffe691f71 (diff)
downloadgitlab-ce-c711fe15dd2409161702f20a1ccffd861ae798ab.tar.gz
Merge branch 'mark-as-processable' into 'master'
Make all future skipped builds as processable when retrying a build ## What does this MR do? Makes a builds that are marked as skipped when a pipeline is processed to be reprocessed by changing their's state to created. ## Why was this MR needed? Currently retry is broken. When you retry a build of pipeline it will succeed and be marked as succeeded, when the next stages should be triggered. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/21066 See merge request !5879
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r--app/models/commit_status.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb
index 7542399169f..84ceeac7d3e 100644
--- a/app/models/commit_status.rb
+++ b/app/models/commit_status.rb
@@ -31,6 +31,10 @@ class CommitStatus < ActiveRecord::Base
transition [:created, :skipped] => :pending
end
+ event :process do
+ transition skipped: :created
+ end
+
event :run do
transition pending: :running
end