diff options
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/cycle_analytics.scss | 11 | ||||
-rw-r--r-- | app/models/ci/pipeline.rb | 7 | ||||
-rw-r--r-- | app/models/project.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/fix-latest-pipeine-ordering.yml | 4 | ||||
-rw-r--r-- | doc/workflow/lfs/manage_large_binaries_with_git_lfs.md | 1 | ||||
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 14 |
7 files changed, 23 insertions, 24 deletions
diff --git a/README.md b/README.md index 68b709b85d5..4e28f3aacfd 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/app/assets/stylesheets/pages/cycle_analytics.scss b/app/assets/stylesheets/pages/cycle_analytics.scss index 5aef31724e1..9ce261eafef 100644 --- a/app/assets/stylesheets/pages/cycle_analytics.scss +++ b/app/assets/stylesheets/pages/cycle_analytics.scss @@ -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%; } } diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 4f50587a067..1814469f6ce 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -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) diff --git a/app/models/project.rb b/app/models/project.rb index 72fdd4514c4..26fa20f856d 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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) diff --git a/changelogs/unreleased/fix-latest-pipeine-ordering.yml b/changelogs/unreleased/fix-latest-pipeine-ordering.yml deleted file mode 100644 index 3dbd1ba036a..00000000000 --- a/changelogs/unreleased/fix-latest-pipeine-ordering.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Fix finding the latest pipeline -merge_request: 8286 -author: diff --git a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md index 6a7098e79d0..8c5020bee37 100644 --- a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md +++ b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md @@ -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" ``` diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index b28da6daabf..dc377d15f15 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -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 |