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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
ee7c5539
Commit
ee7c5539
authored
Jun 10, 2016
by
Kamil Trzcinski
Committed by
Phil Hughes
Jun 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add artifacts_expire_in method for Ci::Build
parent
4e9e4e22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
app/models/ci/build.rb
app/models/ci/build.rb
+12
-0
No files found.
app/models/ci/build.rb
View file @
ee7c5539
...
...
@@ -355,6 +355,18 @@ module Ci
!
artifacts?
&&
artifacts_expire_at
&&
artifacts_expire_at
<
Time
.
now
end
def
artifacts_expire_in
artifacts_expire_at
-
Time
.
now
if
artifacts_expire_at
end
def
artifacts_expire_in
=
(
value
)
if
value
self
.
artifacts_expire_at
=
Time
.
now
+
ChronicDuration
.
parse
(
value
)
else
self
.
artifacts_expire_at
=
nil
end
end
def
keep_artifacts!
self
.
update
(
artifacts_expire_at:
nil
)
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