2016-11-03 12:29:30 +05:30
|
|
|
- builds = @build.pipeline.builds.to_a
|
2016-09-29 09:46:39 +05:30
|
|
|
|
2016-06-16 23:09:34 +05:30
|
|
|
%aside.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar
|
|
|
|
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
|
|
|
|
Build
|
|
|
|
%strong ##{@build.id}
|
|
|
|
%a.gutter-toggle.pull-right.js-sidebar-build-toggle{ href: "#" }
|
|
|
|
= icon('angle-double-right')
|
|
|
|
- if @build.coverage
|
2016-11-03 12:29:30 +05:30
|
|
|
.block.coverage
|
2016-06-16 23:09:34 +05:30
|
|
|
.title
|
|
|
|
Test coverage
|
|
|
|
%p.build-detail-row
|
|
|
|
#{@build.coverage}%
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
.blocks-container
|
|
|
|
- if can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?)
|
|
|
|
.block{ class: ("block-first" if !@build.coverage) }
|
|
|
|
.title
|
|
|
|
Build artifacts
|
|
|
|
- if @build.artifacts_expired?
|
|
|
|
%p.build-detail-row
|
|
|
|
The artifacts were removed
|
|
|
|
#{time_ago_with_tooltip(@build.artifacts_expire_at)}
|
|
|
|
- elsif @build.artifacts_expire_at
|
|
|
|
%p.build-detail-row
|
|
|
|
The artifacts will be removed in
|
|
|
|
%span.js-artifacts-remove= @build.artifacts_expire_at
|
2016-06-16 23:09:34 +05:30
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
- if @build.artifacts?
|
|
|
|
.btn-group.btn-group-justified{ role: :group }
|
|
|
|
- if @build.artifacts_expire_at
|
|
|
|
= link_to keep_namespace_project_build_artifacts_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-default', method: :post do
|
|
|
|
Keep
|
2016-06-16 23:09:34 +05:30
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
= link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-default' do
|
|
|
|
Download
|
2016-06-16 23:09:34 +05:30
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
- if @build.artifacts_metadata?
|
|
|
|
= link_to browse_namespace_project_build_artifacts_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-default' do
|
|
|
|
Browse
|
|
|
|
|
|
|
|
.block{ class: ("block-first" if !@build.coverage && !(can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?))) }
|
|
|
|
.title
|
|
|
|
Build details
|
|
|
|
- if can?(current_user, :update_build, @build) && @build.retryable?
|
2016-09-29 09:46:39 +05:30
|
|
|
= link_to "Retry", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'pull-right retry-link', method: :post
|
2016-09-13 17:45:13 +05:30
|
|
|
- if @build.merge_request
|
|
|
|
%p.build-detail-row
|
|
|
|
%span.build-light-text Merge Request:
|
|
|
|
= link_to "#{@build.merge_request.to_reference}", merge_request_path(@build.merge_request)
|
|
|
|
- if @build.duration
|
|
|
|
%p.build-detail-row
|
|
|
|
%span.build-light-text Duration:
|
|
|
|
= time_interval_in_words(@build.duration)
|
|
|
|
- if @build.finished_at
|
|
|
|
%p.build-detail-row
|
|
|
|
%span.build-light-text Finished:
|
|
|
|
#{time_ago_with_tooltip(@build.finished_at)}
|
|
|
|
- if @build.erased_at
|
|
|
|
%p.build-detail-row
|
|
|
|
%span.build-light-text Erased:
|
|
|
|
#{time_ago_with_tooltip(@build.erased_at)}
|
|
|
|
%p.build-detail-row
|
|
|
|
%span.build-light-text Runner:
|
|
|
|
- if @build.runner && current_user && current_user.admin
|
|
|
|
= link_to "##{@build.runner.id}", admin_runner_path(@build.runner.id)
|
|
|
|
- elsif @build.runner
|
|
|
|
\##{@build.runner.id}
|
|
|
|
.btn-group.btn-group-justified{ role: :group }
|
2016-09-29 09:46:39 +05:30
|
|
|
- if @build.has_trace_file?
|
2016-09-13 17:45:13 +05:30
|
|
|
= link_to 'Raw', raw_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-default'
|
|
|
|
- if @build.active?
|
|
|
|
= link_to "Cancel", cancel_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-default', method: :post
|
|
|
|
- if can?(current_user, :update_build, @project) && @build.erasable?
|
|
|
|
= link_to erase_namespace_project_build_path(@project.namespace, @project, @build),
|
|
|
|
class: "btn btn-sm btn-default", method: :post,
|
|
|
|
data: { confirm: "Are you sure you want to erase this build?" } do
|
|
|
|
Erase
|
|
|
|
|
|
|
|
- if @build.trigger_request
|
|
|
|
.build-widget
|
|
|
|
%h4.title
|
|
|
|
Trigger
|
2016-06-16 23:09:34 +05:30
|
|
|
|
|
|
|
%p
|
2016-09-13 17:45:13 +05:30
|
|
|
%span.build-light-text Token:
|
|
|
|
#{@build.trigger_request.trigger.short_token}
|
|
|
|
|
|
|
|
- if @build.trigger_request.variables
|
|
|
|
%p
|
2016-09-29 09:46:39 +05:30
|
|
|
%button.btn.group.btn-group-justified.reveal-variables Reveal Variables
|
2016-06-16 23:09:34 +05:30
|
|
|
|
|
|
|
|
2016-09-13 17:45:13 +05:30
|
|
|
- @build.trigger_request.variables.each do |key, value|
|
2016-09-29 09:46:39 +05:30
|
|
|
.hide.js-build
|
2016-11-03 12:29:30 +05:30
|
|
|
.js-build-variable= key
|
2016-09-29 09:46:39 +05:30
|
|
|
.js-build-value= value
|
2016-06-16 23:09:34 +05:30
|
|
|
|
|
|
|
.block
|
|
|
|
.title
|
2016-09-13 17:45:13 +05:30
|
|
|
Commit title
|
|
|
|
%p.build-light-text.append-bottom-0
|
|
|
|
#{@build.pipeline.git_commit_title}
|
|
|
|
|
|
|
|
- if @build.tags.any?
|
|
|
|
.block
|
|
|
|
.title
|
|
|
|
Tags
|
|
|
|
- @build.tag_list.each do |tag|
|
|
|
|
%span.label.label-primary
|
|
|
|
= tag
|
2016-09-29 09:46:39 +05:30
|
|
|
|
|
|
|
- if @build.pipeline.stages.many?
|
|
|
|
.dropdown.build-dropdown
|
|
|
|
.title Stage
|
|
|
|
%button.dropdown-menu-toggle{type: 'button', 'data-toggle' => 'dropdown'}
|
|
|
|
%span.stage-selection More
|
|
|
|
= icon('caret-down')
|
|
|
|
%ul.dropdown-menu
|
|
|
|
- @build.pipeline.stages.each do |stage|
|
|
|
|
%li
|
|
|
|
%a.stage-item= stage
|
|
|
|
|
|
|
|
.builds-container
|
2016-11-03 12:29:30 +05:30
|
|
|
- HasStatus::ORDERED_STATUSES.each do |build_status|
|
2016-09-29 09:46:39 +05:30
|
|
|
- builds.select{|build| build.status == build_status}.each do |build|
|
2016-11-03 12:29:30 +05:30
|
|
|
.build-job{class: sidebar_build_class(build, @build), data: {stage: build.stage}}
|
2016-09-29 09:46:39 +05:30
|
|
|
= link_to namespace_project_build_path(@project.namespace, @project, build) do
|
2016-11-03 12:29:30 +05:30
|
|
|
= icon('arrow-right')
|
2016-09-29 09:46:39 +05:30
|
|
|
= ci_icon_for_status(build.status)
|
|
|
|
%span
|
|
|
|
- if build.name
|
|
|
|
= build.name
|
|
|
|
- else
|
|
|
|
= build.id
|
2016-11-03 12:29:30 +05:30
|
|
|
- if build.retried?
|
|
|
|
%i.fa.fa-refresh.has-tooltip{data: { container: 'body', placement: 'bottom' }, title: 'Build was retried'}
|