2016-08-24 18:44:58 -04:00
|
|
|
- @no_container = true
|
2017-08-17 05:42:04 -04:00
|
|
|
- add_to_breadcrumbs "Jobs", project_jobs_path(@project)
|
|
|
|
- breadcrumb_title "##{@build.id}"
|
2017-01-25 10:51:11 -05:00
|
|
|
- page_title "#{@build.name} (##{@build.id})", "Jobs"
|
2015-11-03 05:44:07 -05:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
%div{ class: container_class }
|
2017-06-12 05:20:19 -04:00
|
|
|
.build-page.js-build-page
|
|
|
|
#js-build-header-vue
|
2016-08-24 18:44:58 -04:00
|
|
|
- if @build.stuck?
|
|
|
|
- unless @build.any_runners_online?
|
2017-05-30 04:43:13 -04:00
|
|
|
.bs-callout.bs-callout-warning.js-build-stuck
|
2016-08-24 18:44:58 -04:00
|
|
|
%p
|
|
|
|
- if no_runners_for_project?(@build.project)
|
2017-01-26 06:52:58 -05:00
|
|
|
This job is stuck, because the project doesn't have any runners online assigned to it.
|
2016-08-24 18:44:58 -04:00
|
|
|
- elsif @build.tags.any?
|
2017-01-26 06:52:58 -05:00
|
|
|
This job is stuck, because you don't have any active runners online with any of these tags assigned to them:
|
2016-08-24 18:44:58 -04:00
|
|
|
- @build.tags.each do |tag|
|
|
|
|
%span.label.label-primary
|
|
|
|
= tag
|
|
|
|
- else
|
2017-01-26 06:52:58 -05:00
|
|
|
This job is stuck, because you don't have any active runners that can run this job.
|
2015-10-12 15:12:31 -04:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
%br
|
|
|
|
Go to
|
2017-06-29 13:06:35 -04:00
|
|
|
= link_to project_runners_path(@build.project) do
|
2016-08-24 18:44:58 -04:00
|
|
|
Runners page
|
2015-10-12 15:12:31 -04:00
|
|
|
|
2016-11-17 06:08:28 -05:00
|
|
|
- if @build.starts_environment?
|
2017-05-30 04:43:13 -04:00
|
|
|
.prepend-top-default.js-environment-container
|
2016-11-01 16:38:44 -04:00
|
|
|
.environment-information
|
2016-11-16 18:23:05 -05:00
|
|
|
- if @build.outdated_deployment?
|
2016-11-08 17:29:55 -05:00
|
|
|
= ci_icon_for_status('success_with_warnings')
|
|
|
|
- else
|
|
|
|
= ci_icon_for_status(@build.status)
|
2016-11-02 18:25:19 -04:00
|
|
|
|
2016-11-16 18:23:05 -05:00
|
|
|
- environment = environment_for_build(@build.project, @build)
|
|
|
|
- if @build.success? && @build.last_deployment.present?
|
|
|
|
- if @build.last_deployment.last?
|
2017-01-25 10:51:11 -05:00
|
|
|
This job is the most recent deployment to #{environment_link_for_build(@build.project, @build)}.
|
2016-11-04 11:35:22 -04:00
|
|
|
- else
|
2017-01-25 10:51:11 -05:00
|
|
|
This job is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}.
|
2016-11-23 08:18:06 -05:00
|
|
|
View the most recent deployment #{deployment_link(environment.last_deployment)}.
|
2016-11-16 18:23:05 -05:00
|
|
|
- elsif @build.complete? && !@build.success?
|
2017-01-25 10:51:11 -05:00
|
|
|
The deployment of this job to #{environment_link_for_build(@build.project, @build)} did not succeed.
|
2016-11-04 11:35:22 -04:00
|
|
|
- else
|
2017-01-25 10:51:11 -05:00
|
|
|
This job is creating a deployment to #{environment_link_for_build(@build.project, @build)}
|
2016-11-22 11:43:26 -05:00
|
|
|
- if environment.try(:last_deployment)
|
2016-12-07 10:27:22 -05:00
|
|
|
and will overwrite the #{deployment_link(environment.last_deployment, text: 'latest deployment')}
|
2016-11-01 16:38:44 -04:00
|
|
|
|
2017-06-12 05:20:19 -04:00
|
|
|
- if @build.erased?
|
|
|
|
.prepend-top-default.js-build-erased
|
2016-08-24 18:44:58 -04:00
|
|
|
.erased.alert.alert-warning
|
2017-01-09 15:47:15 -05:00
|
|
|
- if @build.erased_by_user?
|
2017-01-25 10:51:11 -05:00
|
|
|
Job has been erased by #{link_to(@build.erased_by_name, user_path(@build.erased_by))} #{time_ago_with_tooltip(@build.erased_at)}
|
2017-01-09 15:47:15 -05:00
|
|
|
- else
|
2017-01-25 10:51:11 -05:00
|
|
|
Job has been erased #{time_ago_with_tooltip(@build.erased_at)}
|
2017-12-19 06:04:04 -05:00
|
|
|
- if @build.started?
|
|
|
|
.build-trace-container.prepend-top-default
|
|
|
|
.top-bar.js-top-bar
|
|
|
|
.js-truncated-info.truncated-info.hidden-xs.pull-left.hidden<
|
|
|
|
Showing last
|
|
|
|
%span.js-truncated-info-size.truncated-info-size><
|
2018-01-04 17:39:01 -05:00
|
|
|
of log -
|
2017-12-19 06:04:04 -05:00
|
|
|
%a.js-raw-link.raw-link{ href: raw_project_job_path(@project, @build) }>< Complete Raw
|
2017-05-30 04:43:13 -04:00
|
|
|
|
2017-12-19 06:04:04 -05:00
|
|
|
.controllers.pull-right
|
|
|
|
- if @build.has_trace?
|
|
|
|
= link_to raw_project_job_path(@project, @build),
|
|
|
|
title: 'Show complete raw',
|
|
|
|
data: { placement: 'top', container: 'body' },
|
|
|
|
class: 'js-raw-link-controller has-tooltip controllers-buttons' do
|
|
|
|
= icon('file-text-o')
|
2017-07-05 07:32:22 -04:00
|
|
|
|
2017-12-19 06:04:04 -05:00
|
|
|
- if @build.erasable? && can?(current_user, :erase_build, @build)
|
|
|
|
= link_to erase_project_job_path(@project, @build),
|
|
|
|
method: :post,
|
|
|
|
data: { confirm: 'Are you sure you want to erase this build?', placement: 'top', container: 'body' },
|
|
|
|
title: 'Erase job log',
|
|
|
|
class: 'has-tooltip js-erase-link controllers-buttons' do
|
|
|
|
= icon('trash')
|
|
|
|
.has-tooltip.controllers-buttons{ title: 'Scroll to top', data: { placement: 'top', container: 'body'} }
|
|
|
|
%button.js-scroll-up.btn-scroll.btn-transparent.btn-blank{ type: 'button', disabled: true }
|
|
|
|
= custom_icon('scroll_up')
|
|
|
|
.has-tooltip.controllers-buttons{ title: 'Scroll to bottom', data: { placement: 'top', container: 'body'} }
|
|
|
|
%button.js-scroll-down.btn-scroll.btn-transparent.btn-blank{ type: 'button', disabled: true }
|
|
|
|
= custom_icon('scroll_down')
|
2015-10-06 11:11:10 -04:00
|
|
|
|
2017-12-19 06:04:04 -05:00
|
|
|
%pre.build-trace#build-trace
|
|
|
|
%code.bash.js-build-output
|
|
|
|
.build-loader-animation.js-build-refresh
|
2018-01-05 11:18:01 -05:00
|
|
|
- elsif @build.playable?
|
|
|
|
= render 'empty_state',
|
|
|
|
illustration: 'illustrations/manual_action.svg',
|
|
|
|
illustration_size: 'svg-394',
|
|
|
|
title: _('This job requires a manual action'),
|
2018-01-12 06:45:33 -05:00
|
|
|
content: _('This job depends on a user to trigger its process. Often they are used to deploy code to production environments'),
|
|
|
|
action: ( link_to _('Trigger this manual action'), play_project_job_path(@project, @build), method: :post, class: 'btn btn-primary', title: _('Trigger this manual action') )
|
2018-01-19 09:39:40 -05:00
|
|
|
- elsif @build.created?
|
2018-01-05 11:18:01 -05:00
|
|
|
= render 'empty_state',
|
|
|
|
illustration: 'illustrations/job_not_triggered.svg',
|
|
|
|
illustration_size: 'svg-306',
|
2018-01-19 09:39:40 -05:00
|
|
|
title: _('This job has not been triggered yet'),
|
2018-01-22 05:10:57 -05:00
|
|
|
content: _('This job depends on upstream jobs that need to succeed in order for this job to be triggered')
|
|
|
|
- else
|
|
|
|
= render 'empty_state',
|
2018-01-23 06:29:00 -05:00
|
|
|
illustration: 'illustrations/pending_job_empty.svg',
|
|
|
|
illustration_size: 'svg-430',
|
2018-01-22 05:10:57 -05:00
|
|
|
title: _('This job has not started yet'),
|
2018-01-22 11:10:34 -05:00
|
|
|
content: _('This job is in pending state and is waiting to be picked by a runner')
|
2016-08-24 18:44:58 -04:00
|
|
|
= render "sidebar"
|
2015-10-06 11:11:10 -04:00
|
|
|
|
2016-09-08 11:50:36 -04:00
|
|
|
.js-build-options{ data: javascript_build_options }
|
2017-06-12 05:20:19 -04:00
|
|
|
|
2017-06-29 13:06:35 -04:00
|
|
|
#js-job-details-vue{ data: { endpoint: project_job_path(@project, @build, format: :json) } }
|
2017-06-12 05:20:19 -04:00
|
|
|
|
|
|
|
- content_for :page_specific_javascripts do
|
|
|
|
= webpack_bundle_tag('common_vue')
|
|
|
|
= webpack_bundle_tag('job_details')
|