summaryrefslogtreecommitdiff
path: root/app/views/projects/builds/show.html.haml
blob: 7cb2ec83cc78203c28a7901a58514bb42ab94959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
- @no_container = true
- page_title "#{@build.name} (##{@build.id})", "Jobs"
= render "projects/pipelines/head"

%div{ class: container_class }
  .build-page
    = render "header"

    - if @build.stuck?
      - unless @build.any_runners_online?
        .bs-callout.bs-callout-warning
          %p
            - if no_runners_for_project?(@build.project)
              This job is stuck, because the project doesn't have any runners online assigned to it.
            - elsif @build.tags.any?
              This job 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 job is stuck, because you don't have any active runners that can run this job.

            %br
            Go to
            = link_to namespace_project_runners_path(@build.project.namespace, @build.project) do
              Runners page

    - if @build.starts_environment?
      .prepend-top-default
        .environment-information
          - if @build.outdated_deployment?
            = ci_icon_for_status('success_with_warnings')
          - else
            = ci_icon_for_status(@build.status)

          - environment = environment_for_build(@build.project, @build)
          - if @build.success? && @build.last_deployment.present?
            - if @build.last_deployment.last?
              This job is the most recent deployment to #{environment_link_for_build(@build.project, @build)}.
            - else
              This job is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}.
              View the most recent deployment #{deployment_link(environment.last_deployment)}.
          - elsif @build.complete? && !@build.success?
            The deployment of this job to #{environment_link_for_build(@build.project, @build)} did not succeed.
          - else
            This job is creating a deployment to #{environment_link_for_build(@build.project, @build)}
            - if environment.try(:last_deployment)
              and will overwrite the #{deployment_link(environment.last_deployment, text: 'latest deployment')}

    .prepend-top-default
      - if @build.erased?
        .erased.alert.alert-warning
          - if @build.erased_by_user?
            Job has been erased by #{link_to(@build.erased_by_name, user_path(@build.erased_by))} #{time_ago_with_tooltip(@build.erased_at)}
          - else
            Job has been erased #{time_ago_with_tooltip(@build.erased_at)}
      - else
        #js-build-scroll.scroll-controls
          .scroll-step
            %a.scroll-link.scroll-top{ href: '#up-build-trace', id: 'scroll-top', title: 'Scroll to top' }
              = custom_icon('scroll_up')
              = custom_icon('scroll_up_hover_active')
            %a.scroll-link.scroll-bottom{ href: '#down-build-trace', id: 'scroll-bottom', title: 'Scroll to bottom' }
              = custom_icon('scroll_down')
              = custom_icon('scroll_down_hover_active')
          - if @build.active?
            .autoscroll-container
              %span.status-message#autoscroll-status{ data: { state: 'disabled' } }
                %span.status-text Autoscroll active
                %i.status-icon
                  = custom_icon('scroll_down_hover_active')
        #up-build-trace
        %pre.build-trace#build-trace
          .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_build_path(@project.namespace, @project, @build) }>< Complete Raw
          %code.bash.js-build-output
          .build-loader-animation.js-build-refresh

        #down-build-trace

  = render "sidebar"

.js-build-options{ data: javascript_build_options }