summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2015-08-05 10:09:07 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2015-08-05 10:09:07 +0000
commitcaf4c0dd87ff8c803ed3ed49cda85b29d144668f (patch)
tree33a9c844bbeeef902a11d38a31cba3154f45c29a
parent764124c38096ff29a00a0fefbc1a279a32f1bca7 (diff)
parent427b5df260cffdfcae5caa4662c7fc38631b48a3 (diff)
downloadgitlab-ce-caf4c0dd87ff8c803ed3ed49cda85b29d144668f.tar.gz
Merge branch 'ci-skipped-status' into 'master'
Added support for CI skipped status This is required to support: https://gitlab.com/gitlab-org/gitlab-ci/merge_requests/216 See merge request !1073
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/javascripts/merge_request_widget.js.coffee2
-rw-r--r--app/assets/stylesheets/pages/merge_requests.scss5
-rw-r--r--app/models/project_services/ci_service.rb2
-rw-r--r--app/views/projects/merge_requests/widget/_heading.html.haml6
5 files changed, 14 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 258759193ad..ffff476be50 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -31,6 +31,7 @@ v 7.14.0 (unreleased)
- Disabled autocapitalize and autocorrect on login field (Daryl Chan)
- Mention group and project name in creation, update and deletion notices (Achilleas Pipinellis)
- Remove redis-store TTL monkey patch
+ - Add support for CI skipped status
v 7.13.2
- Fix randomly failed spec
diff --git a/app/assets/javascripts/merge_request_widget.js.coffee b/app/assets/javascripts/merge_request_widget.js.coffee
index e4d815bb4e4..762eec63dee 100644
--- a/app/assets/javascripts/merge_request_widget.js.coffee
+++ b/app/assets/javascripts/merge_request_widget.js.coffee
@@ -36,7 +36,7 @@ class @MergeRequestWidget
showCiState: (state) ->
$('.ci_widget').hide()
- allowed_states = ["failed", "canceled", "running", "pending", "success", "not_found"]
+ allowed_states = ["failed", "canceled", "running", "pending", "success", "skipped", "not_found"]
if state in allowed_states
$('.ci_widget.ci-' + state).show()
switch state
diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss
index 61071320973..6185dabd39b 100644
--- a/app/assets/stylesheets/pages/merge_requests.scss
+++ b/app/assets/stylesheets/pages/merge_requests.scss
@@ -139,6 +139,11 @@
color: $gl-success;
}
+ &.ci-skipped {
+ background-color: #eee;
+ color: #888;
+ }
+
&.ci-pending,
&.ci-running {
color: $gl-warning;
diff --git a/app/models/project_services/ci_service.rb b/app/models/project_services/ci_service.rb
index 77d48d4af5e..803402c83ee 100644
--- a/app/models/project_services/ci_service.rb
+++ b/app/models/project_services/ci_service.rb
@@ -41,7 +41,7 @@ class CiService < Service
# Return string with build status or :error symbol
#
- # Allowed states: 'success', 'failed', 'running', 'pending'
+ # Allowed states: 'success', 'failed', 'running', 'pending', 'skipped'
#
#
# Ex.
diff --git a/app/views/projects/merge_requests/widget/_heading.html.haml b/app/views/projects/merge_requests/widget/_heading.html.haml
index 4cc9c652b61..f04eac0e3bb 100644
--- a/app/views/projects/merge_requests/widget/_heading.html.haml
+++ b/app/views/projects/merge_requests/widget/_heading.html.haml
@@ -6,6 +6,12 @@
for #{@merge_request.last_commit_short_sha}.
= link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
+ .ci_widget.ci-skipped{style: "display:none"}
+ = icon("check")
+ %span CI build skipped
+ for #{@merge_request.last_commit_short_sha}.
+ = link_to "View build page", ci_build_details_path(@merge_request), :"data-no-turbolink" => "data-no-turbolink"
+
.ci_widget.ci-failed{style: "display:none"}
= icon("times")
%span CI build failed