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
5923741f
Commit
5923741f
authored
Jul 14, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove references to global entry in new CI config
parent
3e16b015
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
15 deletions
+5
-15
entry.rb
lib/gitlab/ci/config/node/entry.rb
+1
-1
factory.rb
lib/gitlab/ci/config/node/factory.rb
+0
-1
factory_spec.rb
spec/lib/gitlab/ci/config/node/factory_spec.rb
+1
-7
job_spec.rb
spec/lib/gitlab/ci/config/node/job_spec.rb
+2
-4
jobs_spec.rb
spec/lib/gitlab/ci/config/node/jobs_spec.rb
+1
-2
No files found.
lib/gitlab/ci/config/node/entry.rb
View file @
5923741f
...
...
@@ -9,7 +9,7 @@ module Gitlab
class
InvalidError
<
StandardError
;
end
attr_reader
:config
,
:attributes
attr_accessor
:key
,
:parent
,
:
global
,
:
description
attr_accessor
:key
,
:parent
,
:description
def
initialize
(
config
,
**
attributes
)
@config
=
config
...
...
lib/gitlab/ci/config/node/factory.rb
View file @
5923741f
...
...
@@ -63,7 +63,6 @@ module Gitlab
node
.
new
(
value
).
tap
do
|
entry
|
entry
.
key
=
@attributes
[
:key
]
entry
.
parent
=
@attributes
[
:parent
]
||
@parent
entry
.
global
=
@attributes
[
:global
]
||
@parent
.
global
entry
.
description
=
@attributes
[
:description
]
end
end
...
...
spec/lib/gitlab/ci/config/node/factory_spec.rb
View file @
5923741f
...
...
@@ -5,11 +5,6 @@ describe Gitlab::Ci::Config::Node::Factory do
let
(
:factory
)
{
described_class
.
new
(
node
)
}
let
(
:node
)
{
Gitlab
::
Ci
::
Config
::
Node
::
Script
}
let
(
:parent
)
{
double
(
'parent'
)
}
let
(
:global
)
{
double
(
'global'
)
}
before
do
allow
(
parent
).
to
receive
(
:global
).
and_return
(
global
)
end
context
'when setting a concrete value'
do
it
'creates entry with valid value'
do
...
...
@@ -21,13 +16,12 @@ describe Gitlab::Ci::Config::Node::Factory do
expect
(
entry
.
value
).
to
eq
[
'ls'
,
'pwd'
]
end
it
'sets parent
and global
attributes'
do
it
'sets parent attributes'
do
entry
=
factory
.
value
(
'ls'
)
.
parent
(
parent
)
.
create!
expect
(
entry
.
global
).
to
eq
global
expect
(
entry
.
parent
).
to
eq
parent
end
...
...
spec/lib/gitlab/ci/config/node/job_spec.rb
View file @
5923741f
require
'spec_helper'
describe
Gitlab
::
Ci
::
Config
::
Node
::
Job
do
let
(
:entry
)
{
described_class
.
new
(
config
,
attributes
)
}
let
(
:attributes
)
{
{
key: :rspec
,
global:
global
}
}
let
(
:global
)
{
double
(
'global'
,
stages:
%w[test]
)
}
let
(
:entry
)
{
described_class
.
new
(
config
,
key: :rspec
)
}
before
do
entry
.
process!
...
...
@@ -21,7 +19,7 @@ describe Gitlab::Ci::Config::Node::Job do
end
context
'when job name is empty'
do
let
(
:
attributes
)
{
{
key:
''
,
global:
global
}
}
let
(
:
entry
)
{
described_class
.
new
(
config
,
key:
''
.
to_sym
)
}
it
'reports error'
do
expect
(
entry
.
errors
)
...
...
spec/lib/gitlab/ci/config/node/jobs_spec.rb
View file @
5923741f
require
'spec_helper'
describe
Gitlab
::
Ci
::
Config
::
Node
::
Jobs
do
let
(
:entry
)
{
described_class
.
new
(
config
,
global:
global
)
}
let
(
:global
)
{
double
(
'global'
,
before_script:
nil
,
stages:
%w[test]
)
}
let
(
:entry
)
{
described_class
.
new
(
config
)
}
describe
'validations'
do
before
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