summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2019-09-12 08:50:17 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2019-09-12 08:50:17 +0000
commit11f5e7fe378d4c506e8485eadf90085fb3fab6e4 (patch)
tree7e2f6c7172857484c2f3ff0ab1f07658c9ba0d09
parentc8a11c34577d18c19cadd94be6a0406f20966eb2 (diff)
parent6be653208ae7feaf65b57fd267bea7e32fde4ba1 (diff)
downloadgitlab-ce-11f5e7fe378d4c506e8485eadf90085fb3fab6e4.tar.gz
Merge branch 'fix-interruptible-scope-name' into 'master'
Fixes non interruptible scope name See merge request gitlab-org/gitlab-ce!32940
-rw-r--r--app/models/ci/pipeline.rb2
-rw-r--r--app/services/ci/create_pipeline_service.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index 4aaabed6b7b..29317cd530d 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -231,7 +231,7 @@ module Ci
where('EXISTS (?)', ::Ci::Build.latest.with_reports(reports_scope).where('ci_pipelines.id=ci_builds.commit_id').select(1))
end
- scope :without_interruptible_builds, -> do
+ scope :with_only_interruptible_builds, -> do
where('NOT EXISTS (?)',
Ci::Build.where('ci_builds.commit_id = ci_pipelines.id')
.with_status(:running, :success, :failed)
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb
index 4a7f62de9e1..d34cafce563 100644
--- a/app/services/ci/create_pipeline_service.rb
+++ b/app/services/ci/create_pipeline_service.rb
@@ -101,7 +101,7 @@ module Ci
.where.not(id: pipeline.id)
.where.not(sha: project.commit(pipeline.ref).try(:id))
.alive_or_scheduled
- .without_interruptible_builds
+ .with_only_interruptible_builds
else
project.ci_pipelines
.where(ref: pipeline.ref)