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
764fc0dd
Commit
764fc0dd
authored
Jan 12, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zj-unadressable-url-variables' into 'master'
Do not check for valid url for .gitlab-ci.yml Closes #22970 See merge request !8451
parents
6ebbecdd
9db19ae0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
18 deletions
+17
-18
zj-unadressable-url-variables.yml
changelogs/unreleased/zj-unadressable-url-variables.yml
+4
-0
environment.rb
lib/gitlab/ci/config/entry/environment.rb
+0
-1
gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+13
-0
environment_spec.rb
spec/lib/gitlab/ci/config/entry/environment_spec.rb
+0
-17
No files found.
changelogs/unreleased/zj-unadressable-url-variables.yml
0 → 100644
View file @
764fc0dd
---
title
:
Don't validate environment urls on .gitlab-ci.yml
merge_request
:
author
:
lib/gitlab/ci/config/entry/environment.rb
View file @
764fc0dd
...
...
@@ -33,7 +33,6 @@ module Gitlab
validates
:url
,
length:
{
maximum:
255
},
addressable_url:
true
,
allow_nil:
true
validates
:action
,
...
...
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
764fc0dd
...
...
@@ -769,6 +769,19 @@ module Ci
expect
(
builds
.
first
[
:environment
]).
to
eq
(
environment
[
:name
])
expect
(
builds
.
first
[
:options
]).
to
include
(
environment:
environment
)
end
context
'the url has a port as variable'
do
let
(
:environment
)
do
{
name:
'production'
,
url:
'http://production.gitlab.com:$PORT'
}
end
it
'allows a variable for the port'
do
expect
(
builds
.
size
).
to
eq
(
1
)
expect
(
builds
.
first
[
:environment
]).
to
eq
(
environment
[
:name
])
expect
(
builds
.
first
[
:options
]).
to
include
(
environment:
environment
)
end
end
end
context
'when no environment is specified'
do
...
...
spec/lib/gitlab/ci/config/entry/environment_spec.rb
View file @
764fc0dd
...
...
@@ -196,22 +196,5 @@ describe Gitlab::Ci::Config::Entry::Environment do
end
end
end
context
'when invalid URL is used'
do
let
(
:config
)
{
{
name:
'test'
,
url:
'invalid-example.gitlab.com'
}
}
describe
'#valid?'
do
it
'is not valid'
do
expect
(
entry
).
not_to
be_valid
end
end
describe
'#errors?'
do
it
'contains error about invalid URL'
do
expect
(
entry
.
errors
)
.
to
include
"environment url must be a valid url"
end
end
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