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
Léo-Paul Géneau
gitlab-ce
Commits
500b61e1
Commit
500b61e1
authored
Jul 10, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move after script CI job confg to new processor
parent
489e9be4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
lib/gitlab/ci/config/node/job.rb
lib/gitlab/ci/config/node/job.rb
+6
-2
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+1
-1
spec/lib/gitlab/ci/config/node/job_spec.rb
spec/lib/gitlab/ci/config/node/job_spec.rb
+4
-2
No files found.
lib/gitlab/ci/config/node/job.rb
View file @
500b61e1
...
...
@@ -24,7 +24,10 @@ module Gitlab
node
:type
,
Stage
,
description:
'Deprecated: stage this job will be executed into.'
helpers
:before_script
,
:script
,
:stage
,
:type
node
:after_script
,
Script
,
description:
'Commands that will be executed when finishing job.'
helpers
:before_script
,
:script
,
:stage
,
:type
,
:after_script
def
value
raise
InvalidError
unless
valid?
...
...
@@ -41,7 +44,8 @@ module Gitlab
def
to_hash
{
before_script:
before_script_value
,
script:
script_value
,
stage:
stage_value
}
stage:
stage_value
,
after_script:
after_script_value
}
end
def
compose!
...
...
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
500b61e1
...
...
@@ -984,7 +984,7 @@ EOT
config
=
YAML
.
dump
({
rspec:
{
script:
"test"
,
after_script:
[
10
,
"test"
]
}
})
expect
do
GitlabCiYamlProcessor
.
new
(
config
,
path
)
end
.
to
raise_error
(
GitlabCiYamlProcessor
::
ValidationError
,
"
rspec job: after_script
should be an array of strings"
)
end
.
to
raise_error
(
GitlabCiYamlProcessor
::
ValidationError
,
"
jobs:rspec:after_script config
should be an array of strings"
)
end
it
"returns errors if image parameter is invalid"
do
...
...
spec/lib/gitlab/ci/config/node/job_spec.rb
View file @
500b61e1
...
...
@@ -48,14 +48,16 @@ describe Gitlab::Ci::Config::Node::Job do
context
'when entry is correct'
do
let
(
:config
)
do
{
before_script:
%w[ls pwd]
,
script:
'rspec'
}
script:
'rspec'
,
after_script:
%w[cleanup]
}
end
it
'returns correct value'
do
expect
(
entry
.
value
)
.
to
eq
(
before_script:
%w[ls pwd]
,
script:
%w[rspec]
,
stage:
'test'
)
stage:
'test'
,
after_script:
%w[cleanup]
)
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