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
5b296f81
Unverified
Commit
5b296f81
authored
Sep 06, 2017
by
Maxim Rydkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move `lib/ci/mask_secret.rb` into `lib/gitlab/ci/mask_secret.rb`
parent
c45ace89
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
build.rb
app/models/ci/build.rb
+2
-2
.gitkeep
lib/ci/assets/.gitkeep
+0
-0
mask_secret.rb
lib/gitlab/ci/mask_secret.rb
+8
-6
mask_secret_spec.rb
spec/lib/gitlab/ci/mask_secret_spec.rb
+1
-1
No files found.
app/models/ci/build.rb
View file @
5b296f81
...
...
@@ -446,8 +446,8 @@ module Ci
return
unless
trace
trace
=
trace
.
dup
Ci
::
MaskSecret
.
mask!
(
trace
,
project
.
runners_token
)
if
project
Ci
::
MaskSecret
.
mask!
(
trace
,
token
)
Gitlab
::
Ci
::
MaskSecret
.
mask!
(
trace
,
project
.
runners_token
)
if
project
Gitlab
::
Ci
::
MaskSecret
.
mask!
(
trace
,
token
)
trace
end
...
...
lib/ci/assets/.gitkeep
deleted
100644 → 0
View file @
c45ace89
lib/ci/mask_secret.rb
→
lib/
gitlab/
ci/mask_secret.rb
View file @
5b296f81
module
Ci::MaskSecret
class
<<
self
def
mask!
(
value
,
token
)
return
value
unless
value
.
present?
&&
token
.
present?
module
Gitlab
module
Ci::MaskSecret
class
<<
self
def
mask!
(
value
,
token
)
return
value
unless
value
.
present?
&&
token
.
present?
value
.
gsub!
(
token
,
'x'
*
token
.
length
)
value
value
.
gsub!
(
token
,
'x'
*
token
.
length
)
value
end
end
end
end
spec/lib/ci/mask_secret_spec.rb
→
spec/lib/
gitlab/
ci/mask_secret_spec.rb
View file @
5b296f81
require
'spec_helper'
describe
Ci
::
MaskSecret
do
describe
Gitlab
::
Ci
::
MaskSecret
do
subject
{
described_class
}
describe
'#mask'
do
...
...
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