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
00bb9b60
Commit
00bb9b60
authored
Feb 08, 2020
by
Cédric Tabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes 'tags' support in 'default'
parent
ad890526
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
lib/gitlab/ci/config/entry/job.rb
lib/gitlab/ci/config/entry/job.rb
+2
-1
spec/lib/gitlab/ci/yaml_processor_spec.rb
spec/lib/gitlab/ci/yaml_processor_spec.rb
+22
-0
No files found.
lib/gitlab/ci/config/entry/job.rb
View file @
00bb9b60
...
...
@@ -165,7 +165,7 @@ module Gitlab
helpers
:before_script
,
:script
,
:stage
,
:type
,
:after_script
,
:cache
,
:image
,
:services
,
:only
,
:except
,
:variables
,
:artifacts
,
:environment
,
:coverage
,
:retry
,
:rules
,
:parallel
,
:needs
,
:interruptible
,
:release
:parallel
,
:needs
,
:interruptible
,
:release
,
:tags
attributes
:script
,
:tags
,
:allow_failure
,
:when
,
:dependencies
,
:needs
,
:retry
,
:parallel
,
:extends
,
:start_in
,
:rules
,
...
...
@@ -242,6 +242,7 @@ module Gitlab
services:
services_value
,
stage:
stage_value
,
cache:
cache_value
,
tags:
tags_value
,
only:
only_value
,
except:
except_value
,
rules:
has_rules?
?
rules_value
:
nil
,
...
...
spec/lib/gitlab/ci/yaml_processor_spec.rb
View file @
00bb9b60
...
...
@@ -85,6 +85,28 @@ module Gitlab
end
end
describe
'tags entry with default values'
do
it
'applies default values'
do
config
=
YAML
.
dump
({
default:
{
tags:
%w[A B]
},
rspec:
{
script:
"rspec"
}
})
config_processor
=
Gitlab
::
Ci
::
YamlProcessor
.
new
(
config
)
expect
(
config_processor
.
stage_builds_attributes
(
"test"
).
size
).
to
eq
(
1
)
expect
(
config_processor
.
stage_builds_attributes
(
"test"
).
first
).
to
eq
({
stage:
"test"
,
stage_idx:
2
,
name:
"rspec"
,
only:
{
refs:
%w[branches tags]
},
options:
{
script:
[
"rspec"
]
},
tag_list:
%w[A B]
,
allow_failure:
false
,
when:
"on_success"
,
yaml_variables:
[]
})
end
end
describe
'interruptible entry'
do
describe
'interruptible job'
do
let
(
:config
)
do
...
...
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