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
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
job.rb
lib/gitlab/ci/config/node/job.rb
+6
-2
gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+1
-1
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