Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
64b2423de4e2
Commit
42592201
authored
Dec 28, 2015
by
Grzegorz Bizon
Browse files
Hotfix for builds trace data integrity
Issue #4246
parent
517d885b38bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/ci/build.rb
View file @
64b2423d
...
@@ -194,8 +194,11 @@ def extract_coverage(text, regex)
...
@@ -194,8 +194,11 @@ def extract_coverage(text, regex)
end
end
def
raw_trace
def
raw_trace
if
File
.
exist
?
(
path_to_trace
)
if
File
.
file
?
(
path_to_trace
)
File
.
read
(
path_to_trace
)
File
.
read
(
path_to_trace
)
elsif
File
.
file?
(
old_path_to_trace
)
# Temporary fix for build trace data integrity
File
.
read
(
old_path_to_trace
)
else
else
# backward compatibility
# backward compatibility
read_attribute
:trace
read_attribute
:trace
...
@@ -231,6 +234,24 @@ def path_to_trace
...
@@ -231,6 +234,24 @@ def path_to_trace
"
#{
dir_to_trace
}
/
#{
id
}
.log"
"
#{
dir_to_trace
}
/
#{
id
}
.log"
end
end
##
# Deprecated
#
def
old_dir_to_trace
File
.
join
(
Settings
.
gitlab_ci
.
builds_path
,
created_at
.
utc
.
strftime
(
"%Y_%m"
),
project
.
ci_id
.
to_s
)
end
##
# Deprecated
#
def
old_path_to_trace
"
#{
old_dir_to_trace
}
/
#{
id
}
.log"
end
def
token
def
token
project
.
runners_token
project
.
runners_token
end
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