builds.html.haml 2.28 KB
Newer Older
Kamil Trzcinski's avatar
Kamil Trzcinski committed
1
- page_title "Builds", "#{@commit.title} (#{@commit.short_id})", "Commits"
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
= render "projects/commits/header_title"
= render "commit_box"
= render "ci_menu"


- if @ci_commit.yaml_errors.present?
  .bs-callout.bs-callout-danger
    %h4 Found errors in your .gitlab-ci.yml:
    %ul
      - @ci_commit.yaml_errors.split(",").each do |error|
        %li= error

- unless @ci_commit.ci_yaml_file
  .bs-callout.bs-callout-warning
    \.gitlab-ci.yml not found in this commit

Kamil Trzcinski's avatar
Kamil Trzcinski committed
18
.gray-content-block.second-block
Kamil Trzcinski's avatar
Kamil Trzcinski committed
19
  Latest builds
20
21
22

  .pull-right
    - if @ci_commit.duration > 0
Kamil Trzcinski's avatar
Kamil Trzcinski committed
23
24
25
      %i.fa.fa-time
      #{time_interval_in_words @ci_commit.duration}

26
27
28
     

    - if @ci_project && current_user && can?(current_user, :manage_builds, @project)
Kamil Trzcinski's avatar
Kamil Trzcinski committed
29
30
31
      - if @ci_commit.builds.latest.failed.any?(&:retryable?)
        = link_to "Retry failed", retry_builds_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-xs btn-primary', method: :post

32
      - if @ci_commit.builds.running_or_pending.any?
Kamil Trzcinski's avatar
Kamil Trzcinski committed
33
        = link_to "Cancel running", cancel_builds_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-xs btn-danger', method: :post
34

Douwe Maan's avatar
Douwe Maan committed
35
.table-holder
36
37
38
39
40
41
42
43
44
45
46
47
48
  %table.table.builds
    %thead
      %tr
        %th Status
        %th Build ID
        %th Ref
        %th Stage
        %th Name
        %th Duration
        %th Finished at
        - if @ci_project && @ci_project.coverage_enabled?
          %th Coverage
        %th
Douwe Maan's avatar
Douwe Maan committed
49
50
    - @ci_commit.refs.each do |ref|
      = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.for_ref(ref).latest.ordered,
Kamil Trzcinski's avatar
Kamil Trzcinski committed
51
               locals: { coverage: @ci_project.try(:coverage_enabled?), stage: true, allow_retry: true }
Douwe Maan's avatar
Douwe Maan committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

- if @ci_commit.retried.any?
  .gray-content-block.second-block
    Retried builds

  .table-holder
    %table.table.builds
      %thead
        %tr
          %th Status
          %th Build ID
          %th Ref
          %th Stage
          %th Name
          %th Duration
          %th Finished at
          - if @ci_project && @ci_project.coverage_enabled?
            %th Coverage
          %th
      = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.retried,
72
               locals: { coverage: @ci_project.try(:coverage_enabled?), stage: true }