BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
56011f9f
Unverified
Commit
56011f9f
authored
Aug 25, 2016
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactorize CI::Build model
parent
cc365e98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
build.rb
app/models/ci/build.rb
+10
-2
No files found.
app/models/ci/build.rb
View file @
56011f9f
...
@@ -209,7 +209,7 @@ module Ci
...
@@ -209,7 +209,7 @@ module Ci
end
end
def
has_trace_file?
def
has_trace_file?
File
.
exist?
(
path_to_trace
)
||
(
project
.
ci_id
&&
File
.
exist?
(
old_path_to_trace
))
File
.
exist?
(
path_to_trace
)
||
has_old_trace_file?
end
end
def
has_trace?
def
has_trace?
...
@@ -219,7 +219,7 @@ module Ci
...
@@ -219,7 +219,7 @@ module Ci
def
raw_trace
def
raw_trace
if
File
.
file?
(
path_to_trace
)
if
File
.
file?
(
path_to_trace
)
File
.
read
(
path_to_trace
)
File
.
read
(
path_to_trace
)
elsif
project
.
ci_id
&&
File
.
file?
(
old_path_to_trace
)
elsif
has_old_trace_file?
# Temporary fix for build trace data integrity
# Temporary fix for build trace data integrity
File
.
read
(
old_path_to_trace
)
File
.
read
(
old_path_to_trace
)
else
else
...
@@ -228,6 +228,14 @@ module Ci
...
@@ -228,6 +228,14 @@ module Ci
end
end
end
end
##
# Deprecated
#
# This is a hotfix for CI build data integrity, see #4246
def
has_old_trace_file?
project
.
ci_id
&&
File
.
exist?
(
old_path_to_trace
)
end
def
trace
def
trace
trace
=
raw_trace
trace
=
raw_trace
if
project
&&
trace
.
present?
&&
project
.
runners_token
.
present?
if
project
&&
trace
.
present?
&&
project
.
runners_token
.
present?
...
...
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