debian-mirror-gitlab/app/views/projects/builds/show.html.haml

193 lines
6.5 KiB
Text
Raw Normal View History

2015-12-23 02:04:40 +05:30
- page_title "#{@build.name} (##{@build.id})", "Builds"
2015-11-26 14:37:03 +05:30
= render "header_title"
2015-10-24 18:46:33 +05:30
.build-page
2015-12-23 02:04:40 +05:30
.gray-content-block.top-block
2015-11-26 14:37:03 +05:30
Build ##{@build.id} for commit
2015-12-23 02:04:40 +05:30
%strong.monospace= link_to @build.commit.short_sha, ci_status_path(@build.commit)
2015-10-24 18:46:33 +05:30
from
2015-11-26 14:37:03 +05:30
= link_to @build.ref, namespace_project_commits_path(@project.namespace, @project, @build.ref)
- merge_request = @build.merge_request
- if merge_request
via
= link_to "merge request ##{merge_request.iid}", merge_request_path(merge_request)
2015-10-24 18:46:33 +05:30
#up-build-trace
- if @commit.matrix_for_ref?(@build.ref)
%ul.nav-links.no-top.no-bottom
2015-10-24 18:46:33 +05:30
- @commit.latest_builds_for_ref(@build.ref).each do |build|
%li{class: ('active' if build == @build) }
= link_to namespace_project_build_path(@project.namespace, @project, build) do
= ci_icon_for_status(build.status)
%span
- if build.name
= build.name
- else
= build.id
2015-11-26 14:37:03 +05:30
- if @build.retried?
2015-10-24 18:46:33 +05:30
%li.active
%a
Build ##{@build.id}
·
%i.fa.fa-warning
This build was retried.
2015-12-23 02:04:40 +05:30
.gray-content-block.middle-block
2015-10-24 18:46:33 +05:30
.build-head
.clearfix
= ci_status_with_icon(@build.status)
- if @build.duration
%span
%i.fa.fa-time
#{duration_in_words(@build.finished_at, @build.started_at)}
.pull-right
2015-11-26 14:37:03 +05:30
#{time_ago_with_tooltip(@build.finished_at) if @build.finished_at}
2015-10-24 18:46:33 +05:30
- if @build.show_warning?
- unless @build.any_runners_online?
.bs-callout.bs-callout-warning
%p
- if no_runners_for_project?(@build.project)
This build is stuck, because the project doesn't have any runners online assigned to it.
- elsif @build.tags.any?
This build is stuck, because you don't have any active runners online with any of these tags assigned to them:
- @build.tags.each do |tag|
%span.label.label-primary
= tag
- else
This build is stuck, because you don't have any active runners that can run this build.
%br
Go to
2015-12-23 02:04:40 +05:30
= link_to namespace_project_runners_path(@build.project.namespace, @build.project) do
2015-10-24 18:46:33 +05:30
Runners page
.row.prepend-top-default
.col-md-9
.clearfix
- if @build.active?
.autoscroll-container
%button.btn.btn-success.btn-sm#autoscroll-button{:type => "button", :data => {:state => 'disabled'}} enable autoscroll
.clearfix
.scroll-controls
= link_to '#up-build-trace', class: 'btn' do
%i.fa.fa-angle-up
= link_to '#down-build-trace', class: 'btn' do
%i.fa.fa-angle-down
%pre.trace#build-trace
%code.bash
= preserve do
= raw @build.trace_html
%div#down-build-trace
.col-md-3
- if @build.coverage
.build-widget
%h4.title
Test coverage
%h1 #{@build.coverage}%
- if current_user && can?(current_user, :read_build_artifacts, @project) && @build.artifacts?
.build-widget.artifacts
%h4.title Build artifacts
.center
.btn-group{ role: :group }
= link_to "Download", @build.artifacts_download_url, class: 'btn btn-sm btn-primary'
2016-01-29 22:53:50 +05:30
- if @build.artifacts_metadata?
= link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary'
2015-10-24 18:46:33 +05:30
.build-widget
%h4.title
2015-11-26 14:37:03 +05:30
Build ##{@build.id}
2015-10-24 18:46:33 +05:30
- if current_user && can?(current_user, :manage_builds, @project)
.pull-right
2015-11-26 14:37:03 +05:30
- if @build.cancel_url
= link_to "Cancel", @build.cancel_url, class: 'btn btn-sm btn-danger', method: :post
- elsif @build.retry_url
= link_to "Retry", @build.retry_url, class: 'btn btn-sm btn-primary', method: :post
2015-10-24 18:46:33 +05:30
- if @build.duration
%p
%span.attr-name Duration:
#{duration_in_words(@build.finished_at, @build.started_at)}
%p
%span.attr-name Created:
2015-11-26 14:37:03 +05:30
#{time_ago_with_tooltip(@build.created_at)}
2015-10-24 18:46:33 +05:30
- if @build.finished_at
%p
%span.attr-name Finished:
2015-11-26 14:37:03 +05:30
#{time_ago_with_tooltip(@build.finished_at)}
2015-10-24 18:46:33 +05:30
%p
%span.attr-name Runner:
- if @build.runner && current_user && current_user.admin
2015-12-23 02:04:40 +05:30
= link_to "##{@build.runner.id}", admin_runner_path(@build.runner.id)
2015-10-24 18:46:33 +05:30
- elsif @build.runner
\##{@build.runner.id}
- if @build.trigger_request
.build-widget
%h4.title
Trigger
%p
%span.attr-name Token:
#{@build.trigger_request.trigger.short_token}
- if @build.trigger_request.variables
%p
%span.attr-name Variables:
%code
- @build.trigger_request.variables.each do |key, value|
#{key}=#{value}
.build-widget
%h4.title
Commit
.pull-right
2015-12-23 02:04:40 +05:30
%small
2015-11-26 14:37:03 +05:30
= link_to @build.commit.short_sha, ci_status_path(@build.commit), class: "monospace"
2015-10-24 18:46:33 +05:30
%p
%span.attr-name Branch:
2015-11-26 14:37:03 +05:30
= link_to @build.ref, namespace_project_commits_path(@project.namespace, @project, @build.ref)
2015-10-24 18:46:33 +05:30
%p
%span.attr-name Author:
#{@build.commit.git_author_name}
%p
%span.attr-name Message:
#{@build.commit.git_commit_message}
- if @build.tags.any?
.build-widget
%h4.title
Tags
- @build.tag_list.each do |tag|
%span.label.label-primary
= tag
- if @builds.present?
.build-widget
2015-12-23 02:04:40 +05:30
%h4.title #{pluralize(@builds.count(:id), "other build")} for
2015-11-26 14:37:03 +05:30
= succeed ":" do
= link_to @build.commit.short_sha, ci_status_path(@build.commit), class: "monospace"
2015-10-24 18:46:33 +05:30
%table.table.builds
- @builds.each_with_index do |build, i|
%tr.build
%td
= ci_icon_for_status(build.status)
%td
2015-11-26 14:37:03 +05:30
= link_to namespace_project_build_path(@project.namespace, @project, build) do
2015-10-24 18:46:33 +05:30
- if build.name
= build.name
- else
%span ##{build.id}
%td.status= build.status
:javascript
new CiBuild("#{namespace_project_build_url(@project.namespace, @project, @build)}", "#{@build.status}")