diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/models/ci/build.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) | |
download | gitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r-- | app/models/ci/build.rb | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 9ff70ece947..84abd01786d 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -103,6 +103,10 @@ module Ci ) end + scope :in_pipelines, ->(pipelines) do + where(pipeline: pipelines) + end + scope :with_existing_job_artifacts, ->(query) do where('EXISTS (?)', ::Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id').merge(query)) end @@ -571,14 +575,6 @@ module Ci end end - def dependency_variables - return [] if all_dependencies.empty? - - Gitlab::Ci::Variables::Collection.new.concat( - Ci::JobVariable.where(job: all_dependencies).dotenv_source - ) - end - def features { trace_sections: true } end @@ -828,10 +824,6 @@ module Ci Gitlab::Ci::Build::Credentials::Factory.new(self).create! end - def all_dependencies - dependencies.all - end - def has_valid_build_dependencies? dependencies.valid? end @@ -994,12 +986,6 @@ module Ci end end - def dependencies - strong_memoize(:dependencies) do - Ci::BuildDependencies.new(self) - end - end - def build_data @build_data ||= Gitlab::DataBuilder::Build.build(self) end @@ -1059,7 +1045,7 @@ module Ci jwt = Gitlab::Ci::Jwt.for_build(self) variables.append(key: 'CI_JOB_JWT', value: jwt, public: false, masked: true) - rescue OpenSSL::PKey::RSAError => e + rescue OpenSSL::PKey::RSAError, Gitlab::Ci::Jwt::NoSigningKeyError => e Gitlab::ErrorTracking.track_exception(e) end end |