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
7eafe90b
Commit
7eafe90b
authored
Jun 01, 2019
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix port validations in .gitlab-webide.yml
parent
2ad5b30b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
lib/gitlab/ci/config/entry/image.rb
lib/gitlab/ci/config/entry/image.rb
+1
-1
lib/gitlab/ci/config/entry/service.rb
lib/gitlab/ci/config/entry/service.rb
+3
-0
spec/lib/gitlab/ci/config/entry/service_spec.rb
spec/lib/gitlab/ci/config/entry/service_spec.rb
+10
-0
No files found.
lib/gitlab/ci/config/entry/image.rb
View file @
7eafe90b
...
...
@@ -24,7 +24,7 @@ module Gitlab
end
entry
:ports
,
Entry
::
Ports
,
description:
'Ports used expose the image'
description:
'Ports used
to
expose the image'
attributes
:ports
...
...
lib/gitlab/ci/config/entry/service.rb
View file @
7eafe90b
...
...
@@ -24,6 +24,9 @@ module Gitlab
validates
:alias
,
type:
String
,
presence:
true
,
unless:
->
(
record
)
{
record
.
ports
.
blank?
}
end
entry
:ports
,
Entry
::
Ports
,
description:
'Ports used to expose the service'
def
alias
value
[
:alias
]
end
...
...
spec/lib/gitlab/ci/config/entry/service_spec.rb
View file @
7eafe90b
...
...
@@ -112,6 +112,16 @@ describe Gitlab::Ci::Config::Entry::Service do
it
'is valid'
do
expect
(
entry
).
to
be_valid
end
context
'when unknown port keys detected'
do
let
(
:ports
)
{
[{
number:
80
,
invalid_key:
'foo'
}]
}
it
'is not valid'
do
expect
(
entry
).
not_to
be_valid
expect
(
entry
.
errors
.
first
)
.
to
match
/port config contains unknown keys: invalid_key/
end
end
end
describe
'#ports'
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