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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8fac12c5
Commit
8fac12c5
authored
Mar 22, 2016
by
Kamil Trzcinski
Committed by
Rémy Coutable
Mar 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix build dependencies, when the dependency is a string
parent
b6806d0c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
CHANGELOG
CHANGELOG
+1
-0
lib/ci/gitlab_ci_yaml_processor.rb
lib/ci/gitlab_ci_yaml_processor.rb
+2
-2
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+3
-3
No files found.
CHANGELOG
View file @
8fac12c5
...
@@ -16,6 +16,7 @@ v 8.6.0
...
@@ -16,6 +16,7 @@ v 8.6.0
- Fix diff image view modes (2-up, swipe, onion skin) not working (Stan Hu)
- Fix diff image view modes (2-up, swipe, onion skin) not working (Stan Hu)
- Support Golang subpackage fetching (Stan Hu)
- Support Golang subpackage fetching (Stan Hu)
- Bump Capybara gem to 2.6.2 (Stan Hu)
- Bump Capybara gem to 2.6.2 (Stan Hu)
- Fix build dependencies, when the dependency is a string
- New branch button appears on issues where applicable
- New branch button appears on issues where applicable
- Contributions to forked projects are included in calendar
- Contributions to forked projects are included in calendar
- Improve the formatting for the user page bio (Connor Shea)
- Improve the formatting for the user page bio (Connor Shea)
...
...
lib/ci/gitlab_ci_yaml_processor.rb
View file @
8fac12c5
...
@@ -242,9 +242,9 @@ module Ci
...
@@ -242,9 +242,9 @@ module Ci
stage_index
=
stages
.
index
(
job
[
:stage
])
stage_index
=
stages
.
index
(
job
[
:stage
])
job
[
:dependencies
].
each
do
|
dependency
|
job
[
:dependencies
].
each
do
|
dependency
|
raise
ValidationError
,
"
#{
name
}
job: undefined dependency:
#{
dependency
}
"
unless
@jobs
[
dependency
]
raise
ValidationError
,
"
#{
name
}
job: undefined dependency:
#{
dependency
}
"
unless
@jobs
[
dependency
.
to_sym
]
unless
stages
.
index
(
@jobs
[
dependency
][
:stage
])
<
stage_index
unless
stages
.
index
(
@jobs
[
dependency
.
to_sym
][
:stage
])
<
stage_index
raise
ValidationError
,
"
#{
name
}
job: dependency
#{
dependency
}
is not defined in prior stages"
raise
ValidationError
,
"
#{
name
}
job: dependency
#{
dependency
}
is not defined in prior stages"
end
end
end
end
...
...
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
8fac12c5
...
@@ -492,19 +492,19 @@ module Ci
...
@@ -492,19 +492,19 @@ module Ci
end
end
context
'dependencies to builds'
do
context
'dependencies to builds'
do
let
(
:dependencies
)
{
[
:build1
,
:build2
]
}
let
(
:dependencies
)
{
[
'build1'
,
'build2'
]
}
it
{
expect
{
subject
}.
to_not
raise_error
}
it
{
expect
{
subject
}.
to_not
raise_error
}
end
end
context
'undefined dependency'
do
context
'undefined dependency'
do
let
(
:dependencies
)
{
[
:undefined
]
}
let
(
:dependencies
)
{
[
'undefined'
]
}
it
{
expect
{
subject
}.
to
raise_error
(
GitlabCiYamlProcessor
::
ValidationError
,
'test1 job: undefined dependency: undefined'
)
}
it
{
expect
{
subject
}.
to
raise_error
(
GitlabCiYamlProcessor
::
ValidationError
,
'test1 job: undefined dependency: undefined'
)
}
end
end
context
'dependencies to deploy'
do
context
'dependencies to deploy'
do
let
(
:dependencies
)
{
[
:deploy
]
}
let
(
:dependencies
)
{
[
'deploy'
]
}
it
{
expect
{
subject
}.
to
raise_error
(
GitlabCiYamlProcessor
::
ValidationError
,
'test1 job: dependency deploy is not defined in prior stages'
)
}
it
{
expect
{
subject
}.
to
raise_error
(
GitlabCiYamlProcessor
::
ValidationError
,
'test1 job: dependency deploy is not defined in prior stages'
)
}
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