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
a761d293
Commit
a761d293
authored
Nov 14, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change name of method for setting CI config entries
parent
c7014683
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
28 deletions
+28
-28
lib/gitlab/ci/config/entry/cache.rb
lib/gitlab/ci/config/entry/cache.rb
+3
-3
lib/gitlab/ci/config/entry/configurable.rb
lib/gitlab/ci/config/entry/configurable.rb
+2
-2
lib/gitlab/ci/config/entry/global.rb
lib/gitlab/ci/config/entry/global.rb
+8
-8
lib/gitlab/ci/config/entry/job.rb
lib/gitlab/ci/config/entry/job.rb
+13
-13
spec/lib/gitlab/ci/config/entry/configurable_spec.rb
spec/lib/gitlab/ci/config/entry/configurable_spec.rb
+2
-2
No files found.
lib/gitlab/ci/config/entry/cache.rb
View file @
a761d293
...
@@ -14,13 +14,13 @@ module Gitlab
...
@@ -14,13 +14,13 @@ module Gitlab
validates
:config
,
allowed_keys:
ALLOWED_KEYS
validates
:config
,
allowed_keys:
ALLOWED_KEYS
end
end
node
:key
,
Entry
::
Key
,
entry
:key
,
Entry
::
Key
,
description:
'Cache key used to define a cache affinity.'
description:
'Cache key used to define a cache affinity.'
node
:untracked
,
Entry
::
Boolean
,
entry
:untracked
,
Entry
::
Boolean
,
description:
'Cache all untracked files.'
description:
'Cache all untracked files.'
node
:paths
,
Entry
::
Paths
,
entry
:paths
,
Entry
::
Paths
,
description:
'Specify which paths should be cached across builds.'
description:
'Specify which paths should be cached across builds.'
end
end
end
end
...
...
lib/gitlab/ci/config/entry/configurable.rb
View file @
a761d293
...
@@ -48,8 +48,8 @@ module Gitlab
...
@@ -48,8 +48,8 @@ module Gitlab
private
# rubocop:disable Lint/UselessAccessModifier
private
# rubocop:disable Lint/UselessAccessModifier
def
node
(
key
,
node
,
metadata
)
def
entry
(
key
,
entry
,
metadata
)
factory
=
Entry
::
Factory
.
new
(
node
)
factory
=
Entry
::
Factory
.
new
(
entry
)
.
with
(
description:
metadata
[
:description
])
.
with
(
description:
metadata
[
:description
])
(
@nodes
||=
{}).
merge!
(
key
.
to_sym
=>
factory
)
(
@nodes
||=
{}).
merge!
(
key
.
to_sym
=>
factory
)
...
...
lib/gitlab/ci/config/entry/global.rb
View file @
a761d293
...
@@ -9,28 +9,28 @@ module Gitlab
...
@@ -9,28 +9,28 @@ module Gitlab
class
Global
<
Node
class
Global
<
Node
include
Configurable
include
Configurable
node
:before_script
,
Entry
::
Script
,
entry
:before_script
,
Entry
::
Script
,
description:
'Script that will be executed before each job.'
description:
'Script that will be executed before each job.'
node
:image
,
Entry
::
Image
,
entry
:image
,
Entry
::
Image
,
description:
'Docker image that will be used to execute jobs.'
description:
'Docker image that will be used to execute jobs.'
node
:services
,
Entry
::
Services
,
entry
:services
,
Entry
::
Services
,
description:
'Docker images that will be linked to the container.'
description:
'Docker images that will be linked to the container.'
node
:after_script
,
Entry
::
Script
,
entry
:after_script
,
Entry
::
Script
,
description:
'Script that will be executed after each job.'
description:
'Script that will be executed after each job.'
node
:variables
,
Entry
::
Variables
,
entry
:variables
,
Entry
::
Variables
,
description:
'Environment variables that will be used.'
description:
'Environment variables that will be used.'
node
:stages
,
Entry
::
Stages
,
entry
:stages
,
Entry
::
Stages
,
description:
'Configuration of stages for this pipeline.'
description:
'Configuration of stages for this pipeline.'
node
:types
,
Entry
::
Stages
,
entry
:types
,
Entry
::
Stages
,
description:
'Deprecated: stages for this pipeline.'
description:
'Deprecated: stages for this pipeline.'
node
:cache
,
Entry
::
Cache
,
entry
:cache
,
Entry
::
Cache
,
description:
'Configure caching between build jobs.'
description:
'Configure caching between build jobs.'
helpers
:before_script
,
:image
,
:services
,
:after_script
,
helpers
:before_script
,
:image
,
:services
,
:after_script
,
...
...
lib/gitlab/ci/config/entry/job.rb
View file @
a761d293
...
@@ -34,43 +34,43 @@ module Gitlab
...
@@ -34,43 +34,43 @@ module Gitlab
end
end
end
end
node
:before_script
,
Entry
::
Script
,
entry
:before_script
,
Entry
::
Script
,
description:
'Global before script overridden in this job.'
description:
'Global before script overridden in this job.'
node
:script
,
Entry
::
Commands
,
entry
:script
,
Entry
::
Commands
,
description:
'Commands that will be executed in this job.'
description:
'Commands that will be executed in this job.'
node
:stage
,
Entry
::
Stage
,
entry
:stage
,
Entry
::
Stage
,
description:
'Pipeline stage this job will be executed into.'
description:
'Pipeline stage this job will be executed into.'
node
:type
,
Entry
::
Stage
,
entry
:type
,
Entry
::
Stage
,
description:
'Deprecated: stage this job will be executed into.'
description:
'Deprecated: stage this job will be executed into.'
node
:after_script
,
Entry
::
Script
,
entry
:after_script
,
Entry
::
Script
,
description:
'Commands that will be executed when finishing job.'
description:
'Commands that will be executed when finishing job.'
node
:cache
,
Entry
::
Cache
,
entry
:cache
,
Entry
::
Cache
,
description:
'Cache definition for this job.'
description:
'Cache definition for this job.'
node
:image
,
Entry
::
Image
,
entry
:image
,
Entry
::
Image
,
description:
'Image that will be used to execute this job.'
description:
'Image that will be used to execute this job.'
node
:services
,
Entry
::
Services
,
entry
:services
,
Entry
::
Services
,
description:
'Services that will be used to execute this job.'
description:
'Services that will be used to execute this job.'
node
:only
,
Entry
::
Trigger
,
entry
:only
,
Entry
::
Trigger
,
description:
'Refs policy this job will be executed for.'
description:
'Refs policy this job will be executed for.'
node
:except
,
Entry
::
Trigger
,
entry
:except
,
Entry
::
Trigger
,
description:
'Refs policy this job will be executed for.'
description:
'Refs policy this job will be executed for.'
node
:variables
,
Entry
::
Variables
,
entry
:variables
,
Entry
::
Variables
,
description:
'Environment variables available for this job.'
description:
'Environment variables available for this job.'
node
:artifacts
,
Entry
::
Artifacts
,
entry
:artifacts
,
Entry
::
Artifacts
,
description:
'Artifacts configuration for this job.'
description:
'Artifacts configuration for this job.'
node
:environment
,
Entry
::
Environment
,
entry
:environment
,
Entry
::
Environment
,
description:
'Environment configuration for this job.'
description:
'Environment configuration for this job.'
helpers
:before_script
,
:script
,
:stage
,
:type
,
:after_script
,
helpers
:before_script
,
:script
,
:stage
,
:type
,
:after_script
,
...
...
spec/lib/gitlab/ci/config/entry/configurable_spec.rb
View file @
a761d293
...
@@ -39,10 +39,10 @@ describe Gitlab::Ci::Config::Entry::Configurable do
...
@@ -39,10 +39,10 @@ describe Gitlab::Ci::Config::Entry::Configurable do
end
end
end
end
describe
'configured
nod
es'
do
describe
'configured
entri
es'
do
before
do
before
do
entry
.
class_eval
do
entry
.
class_eval
do
node
:object
,
Object
,
description:
'test object'
entry
:object
,
Object
,
description:
'test object'
end
end
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