show.html.haml 3.59 KB
Newer Older
1
- @no_container = true
Douwe Maan's avatar
Douwe Maan committed
2
- page_title "#{@build.name} (##{@build.id})", "Builds"
3
- trace_with_state = @build.trace_with_state
4
= render "projects/pipelines/head", build_subnav: true
Kamil Trzcinski's avatar
Kamil Trzcinski committed
5

6 7 8
%div{ class: container_class }
  .build-page
    = render "header"
9

10 11 12 13 14 15 16 17 18 19 20 21 22
    - if @build.stuck?
      - 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.
23

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

29
    - if @build.starts_environment?
30 31
      .prepend-top-default
        .environment-information
32
          - if @build.outdated_deployment?
33 34 35
            = ci_icon_for_status('success_with_warnings')
          - else
            = ci_icon_for_status(@build.status)
36

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

51 52 53 54 55 56 57
    .prepend-top-default
      - if @build.erased?
        .erased.alert.alert-warning
          - erased_by = "by #{link_to @build.erased_by.name, user_path(@build.erased_by)}" if @build.erased_by
          Build has been erased #{erased_by.html_safe} #{time_ago_with_tooltip(@build.erased_at)}
      - else
        #js-build-scroll.scroll-controls
58
          .scroll-step
59 60 61 62 63 64
            %a{ href: '#up-build-trace', id: 'scroll-top', class: 'scroll-link scroll-top', title: 'Scroll to top' }
              = custom_icon('scroll_up')
              = custom_icon('scroll_up_hover_active')
            %a{ href: '#down-build-trace', id: 'scroll-bottom', class: 'scroll-link scroll-bottom', title: 'Scroll to bottom' }
              = custom_icon('scroll_down')
              = custom_icon('scroll_down_hover_active')
65 66
          - if @build.active?
            .autoscroll-container
67 68
              %span.status-message#autoscroll-status{ data: { state: 'disabled' } }
                %span.status-text Autoscroll active
69
                %i.status-icon
70
                  = custom_icon('scroll_down_hover_active')
71
        #up-build-trace
72 73
        %pre.build-trace#build-trace
          %code.bash.js-build-output
74
          .build-loader-animation.js-build-refresh
75

76
        #down-build-trace
77

78
  = render "sidebar"
79

80
.js-build-options{ data: javascript_build_options }