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
Boxiang Sun
gitlab-ce
Commits
1c4eedd5
Commit
1c4eedd5
authored
Oct 29, 2018
by
Takuya Noguchi
Committed by
Nick Thomas
Oct 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove all tables from Pipeline page when there is no job for the Pipeline
parent
43463869
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
52 deletions
+64
-52
app/assets/javascripts/ide/components/pipelines/list.vue
app/assets/javascripts/ide/components/pipelines/list.vue
+1
-1
app/views/projects/pipelines/_with_tabs.html.haml
app/views/projects/pipelines/_with_tabs.html.haml
+13
-20
app/views/projects/pipelines/show.html.haml
app/views/projects/pipelines/show.html.haml
+9
-1
changelogs/unreleased/45669-table-in-jobs-on-pipeline.yml
changelogs/unreleased/45669-table-in-jobs-on-pipeline.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-3
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+33
-27
No files found.
app/assets/javascripts/ide/components/pipelines/list.vue
View file @
1c4eedd5
...
@@ -25,7 +25,7 @@ export default {
...
@@ -25,7 +25,7 @@ export default {
...
mapState
(
'
pipelines
'
,
[
'
isLoadingPipeline
'
,
'
latestPipeline
'
,
'
stages
'
,
'
isLoadingJobs
'
]),
...
mapState
(
'
pipelines
'
,
[
'
isLoadingPipeline
'
,
'
latestPipeline
'
,
'
stages
'
,
'
isLoadingJobs
'
]),
ciLintText
()
{
ciLintText
()
{
return
sprintf
(
return
sprintf
(
__
(
'
You can
also test your .gitlab-ci.yml in the %{linkStart}Lint%{linkEnd}
'
),
__
(
'
You can
test your .gitlab-ci.yml in %{linkStart}CI Lint%{linkEnd}.
'
),
{
{
linkStart
:
`<a href="
${
_
.
escape
(
this
.
currentProject
.
web_url
)}
/-/ci/lint">`
,
linkStart
:
`<a href="
${
_
.
escape
(
this
.
currentProject
.
web_url
)}
/-/ci/lint">`
,
linkEnd
:
'
</a>
'
,
linkEnd
:
'
</a>
'
,
...
...
app/views/projects/pipelines/_with_tabs.html.haml
View file @
1c4eedd5
...
@@ -19,18 +19,7 @@
...
@@ -19,18 +19,7 @@
#js-pipeline-graph-vue
#js-pipeline-graph-vue
#js-tab-builds
.tab-pane
#js-tab-builds
.tab-pane
-
if
pipeline
.
yaml_errors
.
present?
-
if
pipeline
.
legacy_stages
.
present?
.bs-callout.bs-callout-danger
%h4
Found errors in your .gitlab-ci.yml:
%ul
-
pipeline
.
yaml_errors
.
split
(
","
).
each
do
|
error
|
%li
=
error
You can also test your .gitlab-ci.yml in the
#{
link_to
"Lint"
,
project_ci_lint_path
(
@project
)
}
-
if
pipeline
.
project
.
builds_enabled?
&&
!
pipeline
.
ci_yaml_file
.bs-callout.bs-callout-warning
\.gitlab-ci.yml not found in this commit
.table-holder.pipeline-holder
.table-holder.pipeline-holder
%table
.table.ci-table.pipeline
%table
.table.ci-table.pipeline
%thead
%thead
...
@@ -43,6 +32,10 @@
...
@@ -43,6 +32,10 @@
%th
%th
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
legacy_stages
,
as: :stage
=
render
partial:
"projects/stage/stage"
,
collection:
pipeline
.
legacy_stages
,
as: :stage
-
elsif
pipeline
.
project
.
builds_enabled?
&&
!
pipeline
.
ci_yaml_file
.bs-callout.bs-callout-warning
\.gitlab-ci.yml not found in this commit
-
if
@pipeline
.
failed_builds
.
present?
-
if
@pipeline
.
failed_builds
.
present?
#js-tab-failures
.build-failures.tab-pane.build-page
#js-tab-failures
.build-failures.tab-pane.build-page
%table
.table.responsive-table.ci-table.responsive-table-sm-rounded
%table
.table.responsive-table.ci-table.responsive-table-sm-rounded
...
...
app/views/projects/pipelines/show.html.haml
View file @
1c4eedd5
...
@@ -9,6 +9,14 @@
...
@@ -9,6 +9,14 @@
-
if
@pipeline
.
commit
.
present?
-
if
@pipeline
.
commit
.
present?
=
render
"projects/pipelines/info"
,
commit:
@pipeline
.
commit
=
render
"projects/pipelines/info"
,
commit:
@pipeline
.
commit
-
if
@pipeline
.
builds
.
empty?
&&
@pipeline
.
yaml_errors
.
present?
.bs-callout.bs-callout-danger
%h4
Found errors in your .gitlab-ci.yml:
%ul
-
@pipeline
.
yaml_errors
.
split
(
","
).
each
do
|
error
|
%li
=
error
You can test your .gitlab-ci.yml in
#{
link_to
"CI Lint"
,
project_ci_lint_path
(
@project
)
}
.
-
else
=
render
"projects/pipelines/with_tabs"
,
pipeline:
@pipeline
=
render
"projects/pipelines/with_tabs"
,
pipeline:
@pipeline
.js-pipeline-details-vue
{
data:
{
endpoint:
project_pipeline_path
(
@project
,
@pipeline
,
format: :json
)
}
}
.js-pipeline-details-vue
{
data:
{
endpoint:
project_pipeline_path
(
@project
,
@pipeline
,
format: :json
)
}
}
changelogs/unreleased/45669-table-in-jobs-on-pipeline.yml
0 → 100644
View file @
1c4eedd5
---
title
:
Hide all tables on Pipeline when no Jobs for the Pipeline
merge_request
:
18540
author
:
Takuya Noguchi
type
:
fixed
locale/gitlab.pot
View file @
1c4eedd5
...
@@ -7014,9 +7014,6 @@ msgstr ""
...
@@ -7014,9 +7014,6 @@ msgstr ""
msgid "You can also star a label to make it a priority label."
msgid "You can also star a label to make it a priority label."
msgstr ""
msgstr ""
msgid "You can also test your .gitlab-ci.yml in the %{linkStart}Lint%{linkEnd}"
msgstr ""
msgid "You can easily contribute to them by requesting to join these groups."
msgid "You can easily contribute to them by requesting to join these groups."
msgstr ""
msgstr ""
...
@@ -7038,6 +7035,9 @@ msgstr ""
...
@@ -7038,6 +7035,9 @@ msgstr ""
msgid "You can set up jobs to only use Runners with specific tags. Separate tags with commas."
msgid "You can set up jobs to only use Runners with specific tags. Separate tags with commas."
msgstr ""
msgstr ""
msgid "You can test your .gitlab-ci.yml in %{linkStart}CI Lint%{linkEnd}."
msgstr ""
msgid "You cannot write to this read-only GitLab instance."
msgid "You cannot write to this read-only GitLab instance."
msgstr ""
msgstr ""
...
...
spec/features/commits_spec.rb
View file @
1c4eedd5
...
@@ -114,33 +114,6 @@ describe 'Commits' do
...
@@ -114,33 +114,6 @@ describe 'Commits' do
expect
(
page
).
to
have_content
'canceled'
expect
(
page
).
to
have_content
'canceled'
end
end
end
end
describe
'.gitlab-ci.yml not found warning'
do
context
'ci builds enabled'
do
it
"does not show warning"
do
visit
pipeline_path
(
pipeline
)
expect
(
page
).
not_to
have_content
'.gitlab-ci.yml not found in this commit'
end
it
'shows warning'
do
stub_ci_pipeline_yaml_file
(
nil
)
visit
pipeline_path
(
pipeline
)
expect
(
page
).
to
have_content
'.gitlab-ci.yml not found in this commit'
end
end
context
'ci builds disabled'
do
before
do
stub_ci_builds_disabled
stub_ci_pipeline_yaml_file
(
nil
)
visit
pipeline_path
(
pipeline
)
end
it
'does not show warning'
do
expect
(
page
).
not_to
have_content
'.gitlab-ci.yml not found in this commit'
end
end
end
end
end
context
"when logged as reporter"
do
context
"when logged as reporter"
do
...
@@ -182,6 +155,39 @@ describe 'Commits' do
...
@@ -182,6 +155,39 @@ describe 'Commits' do
end
end
end
end
end
end
describe
'.gitlab-ci.yml not found warning'
do
before
do
project
.
add_reporter
(
user
)
end
context
'ci builds enabled'
do
it
'does not show warning'
do
visit
pipeline_path
(
pipeline
)
expect
(
page
).
not_to
have_content
'.gitlab-ci.yml not found in this commit'
end
it
'shows warning'
do
stub_ci_pipeline_yaml_file
(
nil
)
visit
pipeline_path
(
pipeline
)
expect
(
page
).
to
have_content
'.gitlab-ci.yml not found in this commit'
end
end
context
'ci builds disabled'
do
it
'does not show warning'
do
stub_ci_builds_disabled
stub_ci_pipeline_yaml_file
(
nil
)
visit
pipeline_path
(
pipeline
)
expect
(
page
).
not_to
have_content
'.gitlab-ci.yml not found in this commit'
end
end
end
end
end
context
'viewing commits for a branch'
do
context
'viewing commits for a branch'
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