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
8f7c98ee
Commit
8f7c98ee
authored
Jul 10, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename CI config job script entry node to commands
parent
6aefb9e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
lib/gitlab/ci/config/node/commands.rb
lib/gitlab/ci/config/node/commands.rb
+6
-2
lib/gitlab/ci/config/node/job.rb
lib/gitlab/ci/config/node/job.rb
+1
-1
spec/lib/gitlab/ci/config/node/commands_spec.rb
spec/lib/gitlab/ci/config/node/commands_spec.rb
+2
-2
No files found.
lib/gitlab/ci/config/node/
job_script
.rb
→
lib/gitlab/ci/config/node/
commands
.rb
View file @
8f7c98ee
...
...
@@ -5,7 +5,7 @@ module Gitlab
##
# Entry that represents a job script.
#
class
JobScript
<
Entry
class
Commands
<
Entry
include
Validatable
validations
do
...
...
@@ -14,11 +14,15 @@ module Gitlab
validate
:string_or_array_of_strings
def
string_or_array_of_strings
unless
validate_string
(
config
)
||
validate_array_of_strings
(
config
)
unless
config_valid?
errors
.
add
(
:config
,
'should be a string or an array of strings'
)
end
end
def
config_valid?
validate_string
(
config
)
||
validate_array_of_strings
(
config
)
end
end
def
value
...
...
lib/gitlab/ci/config/node/job.rb
View file @
8f7c98ee
...
...
@@ -15,7 +15,7 @@ module Gitlab
node
:before_script
,
Script
,
description:
'Global before script overridden in this job.'
node
:script
,
JobScript
,
node
:script
,
Commands
,
description:
'Commands that will be executed in this job.'
node
:stage
,
Stage
,
...
...
spec/lib/gitlab/ci/config/node/
job_script
_spec.rb
→
spec/lib/gitlab/ci/config/node/
commands
_spec.rb
View file @
8f7c98ee
require
'spec_helper'
describe
Gitlab
::
Ci
::
Config
::
Node
::
JobScript
do
describe
Gitlab
::
Ci
::
Config
::
Node
::
Commands
do
let
(
:entry
)
{
described_class
.
new
(
config
)
}
context
'when entry config value is an array'
do
...
...
@@ -41,7 +41,7 @@ describe Gitlab::Ci::Config::Node::JobScript do
describe
'#errors'
do
it
'saves errors'
do
expect
(
entry
.
errors
)
.
to
include
'
job script
config should be a '
\
.
to
include
'
commands
config should be a '
\
'string or an array of strings'
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