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
02bc8998
Commit
02bc8998
authored
Mar 13, 2018
by
Mayra Cabrera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build ci/lint page
- Includes new image from gitlab-svgs - Updates dependency for svgs
parent
80f9aff3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
43 deletions
+56
-43
app/assets/stylesheets/pages/lint.scss
app/assets/stylesheets/pages/lint.scss
+12
-17
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+22
-0
app/controllers/projects/settings/ci_cd_controller.rb
app/controllers/projects/settings/ci_cd_controller.rb
+3
-3
app/views/ci/lints/show.html.haml
app/views/ci/lints/show.html.haml
+5
-6
app/views/projects/ci/lints/show.html.haml
app/views/projects/ci/lints/show.html.haml
+2
-2
spec/views/projects/ci/lints/show.html.haml_spec.rb
spec/views/projects/ci/lints/show.html.haml_spec.rb
+12
-15
No files found.
app/assets/stylesheets/pages/lint.scss
View file @
02bc8998
.ci-body
{
.ci-linter-container
{
.incorrect-syntax
{
align-items
:
center
;
font-size
:
18px
;
display
:
flex
;
color
:
$lint-incorrect-color
;
height
:
calc
(
100vh
-
#{
$header-height
+
$performance-bar-height
}
);
}
justify-content
:
center
;
text-align
:
center
;
.correct-syntax
{
font-size
:
18px
;
color
:
$lint-correct-color
;
}
}
}
.ci-linter
{
.ci-linter-inner
{
.ci-editor
{
width
:
auto
;
height
:
400px
;
}
}
.ci-template
pre
{
.ci-linter-description
{
white-space
:
pre-wrap
;
color
:
$common-gray-light
;
}
width
:
500px
;
}
}
app/assets/stylesheets/pages/projects.scss
View file @
02bc8998
...
@@ -1121,3 +1121,25 @@ pre.light-well {
...
@@ -1121,3 +1121,25 @@ pre.light-well {
padding-top
:
$gl-padding
;
padding-top
:
$gl-padding
;
padding-bottom
:
37px
;
padding-bottom
:
37px
;
}
}
.project-ci-body
{
.incorrect-syntax
{
font-size
:
18px
;
color
:
$lint-incorrect-color
;
}
.correct-syntax
{
font-size
:
18px
;
color
:
$lint-correct-color
;
}
}
.project-ci-linter
{
.ci-editor
{
height
:
400px
;
}
.ci-template
pre
{
white-space
:
pre-wrap
;
}
}
app/controllers/projects/settings/ci_cd_controller.rb
View file @
02bc8998
...
@@ -29,12 +29,12 @@ module Projects
...
@@ -29,12 +29,12 @@ module Projects
@project_runners
=
@project
.
runners
.
ordered
@project_runners
=
@project
.
runners
.
ordered
@assignable_runners
=
current_user
.
ci_authorized_runners
@assignable_runners
=
current_user
.
ci_authorized_runners
.
assignable_for
(
project
).
ordered
.
page
(
params
[
:page
]).
per
(
20
)
.
assignable_for
(
project
).
ordered
.
page
(
params
[
:page
]).
per
(
20
)
@shared_runners
=
Ci
::
Runner
.
shared
.
active
@shared_runners
=
::
Ci
::
Runner
.
shared
.
active
@shared_runners_count
=
@shared_runners
.
count
(
:all
)
@shared_runners_count
=
@shared_runners
.
count
(
:all
)
end
end
def
define_secret_variables
def
define_secret_variables
@variable
=
Ci
::
Variable
.
new
(
project:
project
)
@variable
=
::
Ci
::
Variable
.
new
(
project:
project
)
.
present
(
current_user:
current_user
)
.
present
(
current_user:
current_user
)
@variables
=
project
.
variables
.
order_key_asc
@variables
=
project
.
variables
.
order_key_asc
.
map
{
|
variable
|
variable
.
present
(
current_user:
current_user
)
}
.
map
{
|
variable
|
variable
.
present
(
current_user:
current_user
)
}
...
@@ -42,7 +42,7 @@ module Projects
...
@@ -42,7 +42,7 @@ module Projects
def
define_triggers_variables
def
define_triggers_variables
@triggers
=
@project
.
triggers
@triggers
=
@project
.
triggers
@trigger
=
Ci
::
Trigger
.
new
@trigger
=
::
Ci
::
Trigger
.
new
end
end
def
define_badges_variables
def
define_badges_variables
...
...
app/views/ci/lints/show.html.haml
View file @
02bc8998
-
page_title
"CI Lint"
.ci-linter-container
.ci-linter-inner
.center
=
image_tag
'illustrations/feature_moved.svg'
=
image_tag
'illustrations/feature_moved.svg'
%h3
GitLab CI Linter has been moved
%h3
GitLab CI Linter has been moved
%p
.ci-linter-description
To validate your GitLab CI configurations, go to 'CI/CD → Pipelines' inside your project, and click on the 'CI Lint' button.
%p
To validate your GitLab CI configurations, go to 'CI/CD → Pipelines' inside your project, and click on the "CI Lint" button.
app/views/projects/ci/lints/show.html.haml
View file @
02bc8998
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
%h2
Check your .gitlab-ci.yml
%h2
Check your .gitlab-ci.yml
.ci-linter
.
project-
ci-linter
.row
.row
=
form_tag
project_ci_lint_path
(
@project
),
method: :post
do
=
form_tag
project_ci_lint_path
(
@project
),
method: :post
do
.form-group
.form-group
...
@@ -23,5 +23,5 @@
...
@@ -23,5 +23,5 @@
.row.prepend-top-20
.row.prepend-top-20
.col-sm-12
.col-sm-12
.results.ci-template
.results.
project-
ci-template
=
render
partial:
'create'
if
defined?
(
@status
)
=
render
partial:
'create'
if
defined?
(
@status
)
spec/views/projects/ci/lints/show.html.haml_spec.rb
View file @
02bc8998
...
@@ -3,10 +3,9 @@ require 'spec_helper'
...
@@ -3,10 +3,9 @@ require 'spec_helper'
describe
'projects/ci/lints/show'
do
describe
'projects/ci/lints/show'
do
include
Devise
::
Test
::
ControllerHelpers
include
Devise
::
Test
::
ControllerHelpers
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:config_processor
)
{
Gitlab
::
Ci
::
YamlProcessor
.
new
(
YAML
.
dump
(
content
))
}
describe
'XSS protection'
do
describe
'XSS protection'
do
let
(
:config_processor
)
{
Gitlab
::
Ci
::
YamlProcessor
.
new
(
YAML
.
dump
(
content
))
}
before
do
before
do
assign
(
:project
,
project
)
assign
(
:project
,
project
)
assign
(
:status
,
true
)
assign
(
:status
,
true
)
...
@@ -50,21 +49,19 @@ describe 'projects/ci/lints/show' do
...
@@ -50,21 +49,19 @@ describe 'projects/ci/lints/show' do
end
end
end
end
let
(
:content
)
do
context
'when the content is valid'
do
{
let
(
:content
)
do
build_template:
{
{
script:
'./build.sh'
,
build_template:
{
tags:
[
'dotnet'
],
script:
'./build.sh'
,
only:
[
'test@dude/repo'
],
tags:
[
'dotnet'
],
except:
[
'deploy'
],
only:
[
'test@dude/repo'
],
environment:
'testing'
except:
[
'deploy'
],
environment:
'testing'
}
}
}
}
end
end
let
(
:config_processor
)
{
Gitlab
::
Ci
::
YamlProcessor
.
new
(
YAML
.
dump
(
content
))
}
context
'when the content is valid'
do
before
do
before
do
assign
(
:project
,
project
)
assign
(
:project
,
project
)
assign
(
:status
,
true
)
assign
(
:status
,
true
)
...
...
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