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
Jérome Perrin
gitlab-ce
Commits
5ce9e03f
Commit
5ce9e03f
authored
Aug 26, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new complex only/except policy internal scheme
parent
6a5097fd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
lib/ci/gitlab_ci_yaml_processor.rb
lib/ci/gitlab_ci_yaml_processor.rb
+1
-1
lib/gitlab/ci/config/entry/policy.rb
lib/gitlab/ci/config/entry/policy.rb
+4
-0
spec/lib/gitlab/ci/config/entry/policy_spec.rb
spec/lib/gitlab/ci/config/entry/policy_spec.rb
+2
-2
No files found.
lib/ci/gitlab_ci_yaml_processor.rb
View file @
5ce9e03f
...
...
@@ -22,7 +22,7 @@ module Ci
def
jobs_for_ref
(
ref
,
tag
=
false
,
source
=
nil
)
@jobs
.
select
do
|
_
,
job
|
process?
(
job
[
:only
],
job
[
:except
]
,
ref
,
tag
,
source
)
process?
(
job
.
dig
(
:only
,
:refs
),
job
.
dig
(
:except
,
:refs
)
,
ref
,
tag
,
source
)
end
end
...
...
lib/gitlab/ci/config/entry/policy.rb
View file @
5ce9e03f
...
...
@@ -15,6 +15,10 @@ module Gitlab
validations
do
validates
:config
,
array_of_strings_or_regexps:
true
end
def
value
{
refs:
@config
}
end
end
class
ExpressionsPolicy
<
Entry
::
Node
...
...
spec/lib/gitlab/ci/config/entry/policy_spec.rb
View file @
5ce9e03f
...
...
@@ -16,8 +16,8 @@ describe Gitlab::Ci::Config::Entry::Policy do
end
describe
'#value'
do
it
'returns
key value
'
do
expect
(
entry
.
value
).
to
eq
config
it
'returns
refs hash
'
do
expect
(
entry
.
value
).
to
eq
(
refs:
config
)
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