Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 21:07:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 21:07:55 +0300
commit603c7d4cac5e28bc1c75e50c23ed2cbe56f1aafc (patch)
tree907f5b8ee1b6f5aad396e95e3327a08400b9e8ea /app/models/ci
parent120f4aaedc8fe830a3f572491d240d8ee6addefb (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/ci')
-rw-r--r--app/models/ci/build.rb2
-rw-r--r--app/models/ci/job_artifact.rb10
2 files changed, 9 insertions, 3 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index b555b78cda6..d0ea7439556 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -33,6 +33,8 @@ module Ci
scheduler_failure: 2
}.freeze
+ CODE_NAVIGATION_JOB_NAME = 'code_navigation'
+
has_one :deployment, as: :deployable, class_name: 'Deployment'
has_one :resource, class_name: 'Ci::Resource', inverse_of: :build
has_many :trace_sections, class_name: 'Ci::BuildTraceSection'
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb
index ae57da9c546..ef0701b3874 100644
--- a/app/models/ci/job_artifact.rb
+++ b/app/models/ci/job_artifact.rb
@@ -31,7 +31,8 @@ module Ci
metrics: 'metrics.txt',
lsif: 'lsif.json',
dotenv: '.env',
- cobertura: 'cobertura-coverage.xml'
+ cobertura: 'cobertura-coverage.xml',
+ terraform: 'tfplan.json'
}.freeze
INTERNAL_TYPES = {
@@ -59,7 +60,8 @@ module Ci
dast: :raw,
license_management: :raw,
license_scanning: :raw,
- performance: :raw
+ performance: :raw,
+ terraform: :raw
}.freeze
TYPE_AND_FORMAT_PAIRS = INTERNAL_TYPES.merge(REPORT_TYPES).freeze
@@ -80,6 +82,7 @@ module Ci
scope :with_files_stored_locally, -> { where(file_store: [nil, ::JobArtifactUploader::Store::LOCAL]) }
scope :with_files_stored_remotely, -> { where(file_store: ::JobArtifactUploader::Store::REMOTE) }
scope :for_sha, ->(sha, project_id) { joins(job: :pipeline).where(ci_pipelines: { sha: sha, project_id: project_id }) }
+ scope :for_job_name, ->(name) { joins(:job).where(ci_builds: { name: name }) }
scope :with_file_types, -> (file_types) do
types = self.file_types.select { |file_type| file_types.include?(file_type) }.values
@@ -129,7 +132,8 @@ module Ci
network_referee: 14, ## runner referees
lsif: 15, # LSIF data for code navigation
dotenv: 16,
- cobertura: 17
+ cobertura: 17,
+ terraform: 18 # Transformed json
}
enum file_format: {