mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-13 22:59:19 +10:00
Merge branch 'build-status-on-commit-page' into 'master'
Build status on commit page Screenshot:  Part of #2594 See merge request !1418
This commit is contained in:
@@ -6,6 +6,7 @@ v 8.1.0 (unreleased)
|
||||
- Move CI charts to project graphs area
|
||||
- Fix cases where Markdown did not render links in activity feed (Stan Hu)
|
||||
- Add first and last to pagination (Zeger-Jan van de Weg)
|
||||
- Show CI status on commit page
|
||||
|
||||
v 8.0.2 (unreleased)
|
||||
- Skip check_initd_configured_correctly on omnibus installs
|
||||
|
||||
@@ -56,38 +56,4 @@
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.ci-status {
|
||||
padding: 2px 7px;
|
||||
margin-right: 5px;
|
||||
border: 1px solid #EEE;
|
||||
white-space: nowrap;
|
||||
@include border-radius(4px);
|
||||
|
||||
&.ci-failed {
|
||||
color: $gl-danger;
|
||||
border-color: $gl-danger;
|
||||
}
|
||||
|
||||
&.ci-success {
|
||||
color: $gl-success;
|
||||
border-color: $gl-success;
|
||||
}
|
||||
|
||||
&.ci-info {
|
||||
color: $gl-info;
|
||||
border-color: $gl-info;
|
||||
}
|
||||
|
||||
&.ci-disabled {
|
||||
color: $gl-gray;
|
||||
border-color: $gl-gray;
|
||||
}
|
||||
|
||||
&.ci-pending,
|
||||
&.ci-running {
|
||||
color: $gl-warning;
|
||||
border-color: $gl-warning;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
.ci-status {
|
||||
padding: 2px 7px;
|
||||
margin-right: 5px;
|
||||
border: 1px solid #EEE;
|
||||
white-space: nowrap;
|
||||
@include border-radius(4px);
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.ci-failed {
|
||||
color: $gl-danger;
|
||||
border-color: $gl-danger;
|
||||
}
|
||||
|
||||
&.ci-success {
|
||||
color: $gl-success;
|
||||
border-color: $gl-success;
|
||||
}
|
||||
|
||||
&.ci-info {
|
||||
color: $gl-info;
|
||||
border-color: $gl-info;
|
||||
}
|
||||
|
||||
&.ci-disabled {
|
||||
color: $gl-gray;
|
||||
border-color: $gl-gray;
|
||||
}
|
||||
|
||||
&.ci-pending,
|
||||
&.ci-running {
|
||||
color: $gl-warning;
|
||||
border-color: $gl-warning;
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,8 @@ class Projects::CommitController < Projects::ApplicationController
|
||||
commit_id: @commit.id
|
||||
}
|
||||
|
||||
@ci_commit = project.ci_commit(commit.sha)
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.diff { render text: @commit.to_diff }
|
||||
|
||||
@@ -38,6 +38,13 @@
|
||||
- @commit.parents.each do |parent|
|
||||
= link_to parent.short_id, namespace_project_commit_path(@project.namespace, @project, parent)
|
||||
|
||||
- if @ci_commit
|
||||
.pull-right
|
||||
= link_to ci_status_path(@ci_commit), class: "ci-status ci-#{@ci_commit.status}" do
|
||||
= ci_status_icon(@ci_commit)
|
||||
build:
|
||||
= @ci_commit.status
|
||||
|
||||
.commit-info-row.branches
|
||||
%i.fa.fa-spinner.fa-spin
|
||||
|
||||
|
||||
@@ -16,6 +16,11 @@ Feature: Project Commits
|
||||
Then I see commit info
|
||||
And I see side-by-side diff button
|
||||
|
||||
Scenario: I browse commit with ci from list
|
||||
Given commit has ci status
|
||||
And I click on commit link
|
||||
Then I see commit ci info
|
||||
|
||||
Scenario: I browse commit with side-by-side diff view
|
||||
Given I click on commit link
|
||||
And I click side-by-side diff button
|
||||
|
||||
@@ -101,4 +101,13 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
|
||||
step 'I click side-by-side diff button' do
|
||||
find('#parallel-diff-btn').click
|
||||
end
|
||||
|
||||
step 'commit has ci status' do
|
||||
@project.enable_ci(@user)
|
||||
create :ci_commit, project: @project.gitlab_ci_project, sha: sample_commit.id
|
||||
end
|
||||
|
||||
step 'I see commit ci info' do
|
||||
expect(page).to have_content "build: skipped"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user