show.html.haml 4.7 KB
Newer Older
1
- @no_container = true
2
- page_title "#{@build.name} (##{@build.id})", "Jobs"
3
= render "projects/pipelines/head"
K
Kamil Trzcinski 已提交
4

5
%div{ class: container_class }
6 7
  .build-page.js-build-page
    #js-build-header-vue
8 9
    - if @build.stuck?
      - unless @build.any_runners_online?
F
Filipa Lacerda 已提交
10
        .bs-callout.bs-callout-warning.js-build-stuck
11 12
          %p
            - if no_runners_for_project?(@build.project)
F
Filipa Lacerda 已提交
13
              This job is stuck, because the project doesn't have any runners online assigned to it.
14
            - elsif @build.tags.any?
F
Filipa Lacerda 已提交
15
              This job is stuck, because you don't have any active runners online with any of these tags assigned to them:
16 17 18 19
              - @build.tags.each do |tag|
                %span.label.label-primary
                  = tag
            - else
F
Filipa Lacerda 已提交
20
              This job is stuck, because you don't have any active runners that can run this job.
21

22 23 24 25
            %br
            Go to
            = link_to namespace_project_runners_path(@build.project.namespace, @build.project) do
              Runners page
26

27
    - if @build.starts_environment?
F
Filipa Lacerda 已提交
28
      .prepend-top-default.js-environment-container
29
        .environment-information
30
          - if @build.outdated_deployment?
A
Annabel Dunstone Gray 已提交
31 32 33
            = ci_icon_for_status('success_with_warnings')
          - else
            = ci_icon_for_status(@build.status)
34

35 36 37
          - environment = environment_for_build(@build.project, @build)
          - if @build.success? && @build.last_deployment.present?
            - if @build.last_deployment.last?
38
              This job is the most recent deployment to #{environment_link_for_build(@build.project, @build)}.
39
            - else
40
              This job is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}.
K
Kamil Trzcinski 已提交
41
              View the most recent deployment #{deployment_link(environment.last_deployment)}.
42
          - elsif @build.complete? && !@build.success?
43
            The deployment of this job to #{environment_link_for_build(@build.project, @build)} did not succeed.
44
          - else
45
            This job is creating a deployment to #{environment_link_for_build(@build.project, @build)}
46
            - if environment.try(:last_deployment)
F
Filipa Lacerda 已提交
47
              and will overwrite the #{deployment_link(environment.last_deployment, text: 'latest deployment')}
48

49 50
    - if @build.erased?
      .prepend-top-default.js-build-erased
51
        .erased.alert.alert-warning
R
Rémy Coutable 已提交
52
          - if @build.erased_by_user?
53
            Job has been erased by #{link_to(@build.erased_by_name, user_path(@build.erased_by))} #{time_ago_with_tooltip(@build.erased_at)}
R
Rémy Coutable 已提交
54
          - else
55
            Job has been erased #{time_ago_with_tooltip(@build.erased_at)}
F
Filipa Lacerda 已提交
56

57 58 59 60 61 62 63 64 65 66 67 68 69 70
    .build-trace-container#build-trace
      .top-bar.sticky
        .js-truncated-info.truncated-info.hidden<
          Showing last
          %span.js-truncated-info-size.truncated-info-size><
          KiB of log -
          %a.js-raw-link.raw-link{ href: raw_namespace_project_job_path(@project.namespace, @project, @build) }>< Complete Raw
        .controllers
          - if @build.has_trace?
            = link_to raw_namespace_project_job_path(@project.namespace, @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')
F
Filipa Lacerda 已提交
71

72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
          - if can?(current_user, :update_build, @project) && @build.erasable?
            = link_to erase_namespace_project_job_path(@project.namespace, @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')
      .bash.sticky.js-scroll-container
        %code.js-build-output
        .build-loader-animation.js-build-refresh
88

89
  = render "sidebar"
90

91
.js-build-options{ data: javascript_build_options }
92 93 94 95 96 97

#js-job-details-vue{ data: { endpoint: namespace_project_job_path(@project.namespace, @project, @build, format: :json) } }

- content_for :page_specific_javascripts do
  = webpack_bundle_tag('common_vue')
  = webpack_bundle_tag('job_details')