Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c94a6a07
Commit
c94a6a07
authored
Feb 26, 2018
by
Micaël Bergeron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the Ci::Build `*_store` columns
parent
a68b0014
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/ci/build.rb
app/models/ci/build.rb
+3
-0
ee/app/models/ee/ci/build.rb
ee/app/models/ee/ci/build.rb
+0
-3
No files found.
app/models/ci/build.rb
View file @
c94a6a07
...
...
@@ -3,6 +3,7 @@ module Ci
prepend
ArtifactMigratable
include
TokenAuthenticatable
include
AfterCommitQueue
include
ObjectStorage
::
BackgroundMove
include
Presentable
include
Importable
prepend
EE
::
Ci
::
Build
...
...
@@ -48,6 +49,8 @@ module Ci
where
(
'(artifacts_file IS NOT NULL AND artifacts_file <> ?) OR EXISTS (?)'
,
''
,
Ci
::
JobArtifact
.
select
(
1
).
where
(
'ci_builds.id = ci_job_artifacts.job_id'
))
end
scope
:with_artifacts_stored_locally
,
->
{
with_artifacts
.
where
(
artifacts_file_store:
[
nil
,
LegacyArtifactUploader
::
Store
::
LOCAL
])
}
scope
:with_artifacts_not_expired
,
->
()
{
with_artifacts
.
where
(
'artifacts_expire_at IS NULL OR artifacts_expire_at > ?'
,
Time
.
now
)
}
scope
:with_expired_artifacts
,
->
()
{
with_artifacts
.
where
(
'artifacts_expire_at < ?'
,
Time
.
now
)
}
scope
:last_month
,
->
()
{
where
(
'created_at > ?'
,
Date
.
today
-
1
.
month
)
}
...
...
ee/app/models/ee/ci/build.rb
View file @
c94a6a07
...
...
@@ -14,14 +14,11 @@ module EE
DAST_FILE
=
'gl-dast-report.json'
.
freeze
included
do
include
ObjectStorage
::
BackgroundMove
scope
:codequality
,
->
{
where
(
name:
%w[codequality codeclimate]
)
}
scope
:performance
,
->
{
where
(
name:
%w[performance deploy]
)
}
scope
:sast
,
->
{
where
(
name:
'sast'
)
}
scope
:sast_container
,
->
{
where
(
name:
'sast:container'
)
}
scope
:dast
,
->
{
where
(
name:
'dast'
)
}
scope
:with_artifacts_stored_locally
,
->
{
with_artifacts
.
where
(
artifacts_file_store:
[
nil
,
LegacyArtifactUploader
::
Store
::
LOCAL
])
}
after_save
:stick_build_if_status_changed
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment