Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile.lock2
-rw-r--r--app/services/git_tag_push_service.rb13
-rw-r--r--app/views/admin/background_jobs/show.html.haml18
-rw-r--r--doc/update/patch_versions.md5
-rw-r--r--lib/tasks/gitlab/setup.rake8
-rw-r--r--lib/tasks/gitlab/test.rake5
-rw-r--r--lib/tasks/migrate/add_limits_mysql.rake1
7 files changed, 34 insertions, 18 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index 709f5711916..615ad62112a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -235,7 +235,7 @@ GEM
httparty
httparty
http_parser.rb (0.5.3)
- httparty (0.12.0)
+ httparty (0.13.0)
json (~> 1.8)
multi_xml (>= 0.5.2)
httpauth (0.2.0)
diff --git a/app/services/git_tag_push_service.rb b/app/services/git_tag_push_service.rb
index 3504479f33a..62eaf9b4f51 100644
--- a/app/services/git_tag_push_service.rb
+++ b/app/services/git_tag_push_service.rb
@@ -1,8 +1,12 @@
class GitTagPushService
attr_accessor :project, :user, :push_data
+
def execute(project, user, oldrev, newrev, ref)
@project, @user = project, user
@push_data = create_push_data(oldrev, newrev, ref)
+
+ create_push_event
+ project.repository.expire_cache
project.execute_hooks(@push_data.dup, :tag_push_hooks)
end
@@ -24,4 +28,13 @@ class GitTagPushService
}
}
end
+
+ def create_push_event
+ Event.create!(
+ project: project,
+ action: Event::PUSHED,
+ data: push_data,
+ author_id: push_data[:user_id]
+ )
+ end
end
diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml
index e5af56ffc5c..32f77cc1a70 100644
--- a/app/views/admin/background_jobs/show.html.haml
+++ b/app/views/admin/background_jobs/show.html.haml
@@ -14,27 +14,21 @@
%table.table
%thead
%th USER
- %th
%th PID
- %th
%th CPU
- %th
%th MEM
- %th
%th STATE
- %th
%th START
- %th
%th COMMAND
- %th
- - @sidekiq_processes.split("\n").each do |process|
+ %tbody
+ - @sidekiq_processes.each do |process|
- next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/)
- - data = process.gsub!(/\s+/m, '|').strip.split('|')
+ - data = process.strip.split(' ')
%tr
- - 6.times do
+ %td= Settings.gitlab.user
+ - 5.times do
%td= data.shift
- %td
- %td= data.join(" ")
+ %td= data.join(' ')
.clearfix
%p
diff --git a/doc/update/patch_versions.md b/doc/update/patch_versions.md
index 21b93c0b929..2b947adaa13 100644
--- a/doc/update/patch_versions.md
+++ b/doc/update/patch_versions.md
@@ -18,10 +18,11 @@ sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```bash
cd /home/git/gitlab
-sudo -u git -H git pull origin STABLE_BRANCH
+sudo -u git -H git fetch --all
+sudo -u git -H git checkout LATEST_TAG
```
-Replace STABLE_BRANCH with the minor version you want to upgrade to, for example `6-3-stable`.
+Replace LATEST_TAG with the latest GitLab tag you want to upgrade to, for example `v6.6.3`.
### 3. Update gitlab-shell if it is not the latest version
diff --git a/lib/tasks/gitlab/setup.rake b/lib/tasks/gitlab/setup.rake
index 2b730774e06..853994dd67d 100644
--- a/lib/tasks/gitlab/setup.rake
+++ b/lib/tasks/gitlab/setup.rake
@@ -15,6 +15,14 @@ namespace :gitlab do
end
Rake::Task["db:setup"].invoke
+
+ config = YAML.load_file(File.join(Rails.root,'config','database.yml'))[Rails.env]
+ success = case config["adapter"]
+ when /^mysql/ then
+ Rake::Task["add_limits_mysql"].invoke
+ when "postgresql" then
+ end
+
Rake::Task["db:seed_fu"].invoke
rescue Gitlab::TaskAbortedByUserError
puts "Quitting...".red
diff --git a/lib/tasks/gitlab/test.rake b/lib/tasks/gitlab/test.rake
index f52af0c3ded..83e794189d2 100644
--- a/lib/tasks/gitlab/test.rake
+++ b/lib/tasks/gitlab/test.rake
@@ -2,15 +2,14 @@ namespace :gitlab do
desc "GITLAB | Run all tests"
task :test do
cmds = [
- %W(rake db:setup),
- %W(rake db:seed_fu),
+ %W(rake gitlab:setup),
%W(rake spinach),
%W(rake spec),
%W(rake jasmine:ci)
]
cmds.each do |cmd|
- system({'RAILS_ENV' => 'test'}, *cmd)
+ system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
raise "#{cmd} failed!" unless $?.exitstatus.zero?
end
diff --git a/lib/tasks/migrate/add_limits_mysql.rake b/lib/tasks/migrate/add_limits_mysql.rake
index 163d6377cfb..46b6451752b 100644
--- a/lib/tasks/migrate/add_limits_mysql.rake
+++ b/lib/tasks/migrate/add_limits_mysql.rake
@@ -9,5 +9,6 @@ class LimitsToMysql < ActiveRecord::Migration
change_column :merge_request_diffs, :st_commits, :text, limit: 2147483647
change_column :merge_request_diffs, :st_diffs, :text, limit: 2147483647
change_column :snippets, :content, :text, limit: 2147483647
+ change_column :notes, :st_diff, :text, limit: 2147483647
end
end