Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
02bc8998
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
02bc8998
编写于
3月 13, 2018
作者:
M
Mayra Cabrera
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Build ci/lint page
- Includes new image from gitlab-svgs - Updates dependency for svgs
上级
80f9aff3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
56 addition
and
43 deletion
+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
未找到文件。
app/assets/stylesheets/pages/lint.scss
浏览文件 @
02bc8998
.ci-body
{
.incorrect-syntax
{
font-size
:
18px
;
color
:
$lint-incorrect-color
;
}
.correct-syntax
{
font-size
:
18px
;
color
:
$lint-correct-color
;
}
.ci-linter-container
{
align-items
:
center
;
display
:
flex
;
height
:
calc
(
100vh
-
#{
$header-height
+
$performance-bar-height
}
);
justify-content
:
center
;
text-align
:
center
;
}
.ci-linter
{
.ci-editor
{
height
:
400px
;
}
.ci-linter-inner
{
width
:
auto
;
}
.ci-template
pre
{
white-space
:
pre-wrap
;
}
.ci-linter-description
{
color
:
$common-gray-light
;
width
:
500px
;
}
app/assets/stylesheets/pages/projects.scss
浏览文件 @
02bc8998
...
...
@@ -1121,3 +1121,25 @@ pre.light-well {
padding-top
:
$gl-padding
;
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
浏览文件 @
02bc8998
...
...
@@ -29,12 +29,12 @@ module Projects
@project_runners
=
@project
.
runners
.
ordered
@assignable_runners
=
current_user
.
ci_authorized_runners
.
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
)
end
def
define_secret_variables
@variable
=
Ci
::
Variable
.
new
(
project:
project
)
@variable
=
::
Ci
::
Variable
.
new
(
project:
project
)
.
present
(
current_user:
current_user
)
@variables
=
project
.
variables
.
order_key_asc
.
map
{
|
variable
|
variable
.
present
(
current_user:
current_user
)
}
...
...
@@ -42,7 +42,7 @@ module Projects
def
define_triggers_variables
@triggers
=
@project
.
triggers
@trigger
=
Ci
::
Trigger
.
new
@trigger
=
::
Ci
::
Trigger
.
new
end
def
define_badges_variables
...
...
app/views/ci/lints/show.html.haml
浏览文件 @
02bc8998
-
page_title
"CI Lint"
.center
=
image_tag
'illustrations/feature_moved.svg'
%h3
GitLab CI Linter has been moved
%p
To validate your GitLab CI configurations, go to 'CI/CD → Pipelines' inside your project, and click on the "CI Lint" button.
.ci-linter-container
.ci-linter-inner
=
image_tag
'illustrations/feature_moved.svg'
%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.
app/views/projects/ci/lints/show.html.haml
浏览文件 @
02bc8998
...
...
@@ -5,7 +5,7 @@
%h2
Check your .gitlab-ci.yml
.ci-linter
.
project-
ci-linter
.row
=
form_tag
project_ci_lint_path
(
@project
),
method: :post
do
.form-group
...
...
@@ -23,5 +23,5 @@
.row.prepend-top-20
.col-sm-12
.results.ci-template
.results.
project-
ci-template
=
render
partial:
'create'
if
defined?
(
@status
)
spec/views/projects/ci/lints/show.html.haml_spec.rb
浏览文件 @
02bc8998
...
...
@@ -3,10 +3,9 @@ require 'spec_helper'
describe
'projects/ci/lints/show'
do
include
Devise
::
Test
::
ControllerHelpers
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:config_processor
)
{
Gitlab
::
Ci
::
YamlProcessor
.
new
(
YAML
.
dump
(
content
))
}
describe
'XSS protection'
do
let
(
:config_processor
)
{
Gitlab
::
Ci
::
YamlProcessor
.
new
(
YAML
.
dump
(
content
))
}
before
do
assign
(
:project
,
project
)
assign
(
:status
,
true
)
...
...
@@ -50,21 +49,19 @@ describe 'projects/ci/lints/show' do
end
end
let
(
:content
)
do
{
build_template:
{
script:
'./build.sh'
,
tags:
[
'dotnet'
],
only:
[
'test@dude/repo'
],
except:
[
'deploy'
],
environment:
'testing'
context
'when the content is valid'
do
let
(
:content
)
do
{
build_template:
{
script:
'./build.sh'
,
tags:
[
'dotnet'
],
only:
[
'test@dude/repo'
],
except:
[
'deploy'
],
environment:
'testing'
}
}
}
end
let
(
:config_processor
)
{
Gitlab
::
Ci
::
YamlProcessor
.
new
(
YAML
.
dump
(
content
))
}
end
context
'when the content is valid'
do
before
do
assign
(
:project
,
project
)
assign
(
:status
,
true
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录