BigW Consortium Gitlab

Commit d57faaa0 by Regis

Merge branch 'master' into auto-pipelines-vue

parents e56254d3 645412b5
......@@ -15,10 +15,10 @@ To see how GitLab looks please see the [features page on our website](https://ab
- Manage Git repositories with fine grained access controls that keep your code secure
- Perform code reviews and enhance collaboration with merge requests
- Each project can also have an issue tracker and a wiki
- Complete continuous integration (CI) and CD pipelines to builds, test, and deploy your applications
- Each project can also have an issue tracker, issue board, and a wiki
- Used by more than 100,000 organizations, GitLab is the most popular solution to manage Git repositories on-premises
- Completely free and open source (MIT Expat license)
- Powered by [Ruby on Rails](https://github.com/rails/rails)
## Hiring
......@@ -74,11 +74,11 @@ Instructions on how to start GitLab and how to run the tests can be found in the
GitLab is a Ruby on Rails application that runs on the following software:
- Ubuntu/Debian/CentOS/RHEL
- Ubuntu/Debian/CentOS/RHEL/OpenSUSE
- Ruby (MRI) 2.3
- Git 2.8.4+
- Redis 2.8+
- MySQL or PostgreSQL
- PostgreSQL (preferred) or MySQL
For more information please see the [architecture documentation](https://docs.gitlab.com/ce/development/architecture.html).
......
......@@ -23,12 +23,12 @@
}
.stage-header {
width: 28%;
width: 26%;
padding-left: $gl-padding;
}
.median-header {
width: 12%;
width: 14%;
}
.event-header {
......@@ -141,7 +141,7 @@
.dismiss-icon {
position: absolute;
right: $cycle-analytics-dismiss-icon-color;
right: $cycle-analytics-box-padding;
cursor: pointer;
color: $cycle-analytics-dismiss-icon-color;
}
......@@ -215,7 +215,6 @@
border-bottom: 1px solid transparent;
border-right: 1px solid $border-color;
background-color: $gray-light;
cursor: default;
&.active {
background-color: transparent;
......@@ -247,11 +246,11 @@
float: left;
&.stage-name {
width: 70%;
width: 65%;
}
&.stage-median {
width: 30%;
width: 35%;
}
}
......
......@@ -93,8 +93,11 @@ module Ci
.select("max(#{quoted_table_name}.id)")
.group(:ref, :sha)
relation = ref ? where(ref: ref) : self
relation.where(id: max_id).order(id: :desc)
if ref
where(id: max_id, ref: ref)
else
where(id: max_id)
end
end
def self.latest_status(ref = nil)
......
......@@ -418,7 +418,7 @@ class Project < ActiveRecord::Base
repository.commit(ref)
end
# ref can't be HEAD or SHA, can only be branch/tag name
# ref can't be HEAD, can only be branch/tag name or SHA
def latest_successful_builds_for(ref = default_branch)
latest_pipeline = pipelines.latest_successful_for(ref)
......
---
title: Fix finding the latest pipeline
merge_request: 8286
author:
......@@ -134,7 +134,6 @@ This behaviour is caused by Git LFS using HTTPS connections by default when a
To prevent this from happening, set the lfs url in project Git config:
```bash
git config --add lfs.url "http://gitlab.example.com/group/project.git/info/lfs"
```
......
......@@ -424,18 +424,20 @@ describe Ci::Pipeline, models: true do
context 'when no ref is specified' do
let(:pipelines) { described_class.latest.all }
it 'gives the latest pipelines for the same ref and different sha in reverse chronological order' do
expect(pipelines.map(&:sha)).to eq(%w[C B A])
expect(pipelines.map(&:status)).to eq(%w[skipped failed success])
it 'returns the latest pipeline for the same ref and different sha' do
expect(pipelines.map(&:sha)).to contain_exactly('A', 'B', 'C')
expect(pipelines.map(&:status)).
to contain_exactly('success', 'failed', 'skipped')
end
end
context 'when ref is specified' do
let(:pipelines) { described_class.latest('ref').all }
it 'gives the latest pipelines for ref and different sha in reverse chronological order' do
expect(pipelines.map(&:sha)).to eq(%w[B A])
expect(pipelines.map(&:status)).to eq(%w[failed success])
it 'returns the latest pipeline for ref and different sha' do
expect(pipelines.map(&:sha)).to contain_exactly('A', 'B')
expect(pipelines.map(&:status)).
to contain_exactly('success', 'failed')
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment