diff options
-rw-r--r-- | lib/tasks/gitlab/gitaly.rake | 2 | ||||
-rw-r--r-- | locale/it/gitlab.po | 30 | ||||
-rw-r--r-- | spec/support/test_env.rb | 33 | ||||
-rw-r--r-- | spec/tasks/gitlab/gitaly_rake_spec.rb | 10 |
4 files changed, 54 insertions, 21 deletions
diff --git a/lib/tasks/gitlab/gitaly.rake b/lib/tasks/gitlab/gitaly.rake index 7d35e0df53a..aaf00bd703a 100644 --- a/lib/tasks/gitlab/gitaly.rake +++ b/lib/tasks/gitlab/gitaly.rake @@ -21,7 +21,7 @@ namespace :gitlab do create_gitaly_configuration # In CI we run scripts/gitaly-test-build instead of this command unless ENV['CI'].present? - Bundler.with_original_env { run_command!([command]) } + Bundler.with_original_env { run_command!(%w[/usr/bin/env -u RUBYOPT] + [command]) } end end end diff --git a/locale/it/gitlab.po b/locale/it/gitlab.po index d4fac6ab34e..7ba23d84405 100644 --- a/locale/it/gitlab.po +++ b/locale/it/gitlab.po @@ -4,13 +4,13 @@ msgid "" msgstr "" "Project-Id-Version: gitlab 1.0.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-28 13:32+0200\n" +"POT-Creation-Date: 2017-07-13 12:07-0500\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2017-07-12 05:45-0400\n" -"Last-Translator: Paolo Falomo <info@paolofalomo.it>\n" "Language-Team: Italian (https://translate.zanata.org/project/view/GitLab)\n" +"PO-Revision-Date: 2017-08-07 10:15-0400\n" +"Last-Translator: Paolo Falomo <info@paolofalomo.it>\n" "Language: it\n" "X-Generator: Zanata 3.9.6\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" @@ -647,6 +647,12 @@ msgstr "Tutto" msgid "PipelineSchedules|Inactive" msgstr "Inattiva" +msgid "PipelineSchedules|Input variable key" +msgstr "Chiave della variabile" + +msgid "PipelineSchedules|Input variable value" +msgstr "Valore della variabile" + msgid "PipelineSchedules|Next Run" msgstr "Prossima esecuzione" @@ -656,12 +662,18 @@ msgstr "Nessuna" msgid "PipelineSchedules|Provide a short description for this pipeline" msgstr "Fornisci una breve descrizione per questa pipeline" +msgid "PipelineSchedules|Remove variable row" +msgstr "Rimuovi riga della variabile" + msgid "PipelineSchedules|Take ownership" msgstr "Prendi possesso" msgid "PipelineSchedules|Target" msgstr "Target" +msgid "PipelineSchedules|Variables" +msgstr "Variabili" + msgid "PipelineSheduleIntervalPattern|Custom" msgstr "Personalizzato" @@ -1144,6 +1156,9 @@ msgstr "Privato" msgid "VisibilityLevel|Public" msgstr "Pubblico" +msgid "VisibilityLevel|Unknown" +msgstr "Sconosciuto" + msgid "Want to see the data? Please ask an administrator for access." msgstr "" "Vuoi visualizzare i dati? Richiedi l'accesso ad un amministratore, grazie." @@ -1155,6 +1170,15 @@ msgid "Withdraw Access Request" msgstr "Ritira richiesta d'accesso" msgid "" +"You are going to remove %{group_name}.\n" +"Removed groups CANNOT be restored!\n" +"Are you ABSOLUTELY sure?" +msgstr "" +"Stai per rimuovere il gruppo %{group_name}.\n" +"I gruppi rimossi NON possono esser ripristinati!\n" +"Sei ASSOLUTAMENTE sicuro?" + +msgid "" "You are going to remove %{project_name_with_namespace}.\n" "Removed project CANNOT be restored!\n" "Are you ABSOLUTELY sure?" diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index c1298ed9cae..e059c9620ab 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -63,8 +63,6 @@ module TestEnv # See gitlab.yml.example test section for paths # def init(opts = {}) - Rake.application.rake_require 'tasks/gitlab/helpers' - Rake::Task.define_task :environment # Disable mailer for spinach tests disable_mailer if opts[:mailer] == false @@ -124,41 +122,50 @@ module TestEnv end def setup_gitlab_shell - gitlab_shell_dir = File.dirname(Gitlab.config.gitlab_shell.path) - gitlab_shell_needs_update = component_needs_update?(gitlab_shell_dir, + puts "\n==> Setting up Gitlab Shell..." + start = Time.now + gitlab_shell_dir = Gitlab.config.gitlab_shell.path + shell_needs_update = component_needs_update?(gitlab_shell_dir, Gitlab::Shell.version_required) - Rake.application.rake_require 'tasks/gitlab/shell' - unless !gitlab_shell_needs_update || Rake.application.invoke_task('gitlab:shell:install') + unless !shell_needs_update || system('rake', 'gitlab:shell:install') + puts "\nGitLab Shell failed to install, cleaning up #{gitlab_shell_dir}!\n" FileUtils.rm_rf(gitlab_shell_dir) - raise "Can't install gitlab-shell" + exit 1 end + + puts " GitLab Shell setup in #{Time.now - start} seconds...\n" end def setup_gitaly + puts "\n==> Setting up Gitaly..." + start = Time.now socket_path = Gitlab::GitalyClient.address('default').sub(/\Aunix:/, '') gitaly_dir = File.dirname(socket_path) if gitaly_dir_stale?(gitaly_dir) - puts "rm -rf #{gitaly_dir}" - FileUtils.rm_rf(gitaly_dir) + puts " Gitaly is outdated, cleaning up #{gitaly_dir}!" + FileUtils.rm_rf(gitaly_dir) end gitaly_needs_update = component_needs_update?(gitaly_dir, Gitlab::GitalyClient.expected_server_version) - Rake.application.rake_require 'tasks/gitlab/gitaly' - unless !gitaly_needs_update || Rake.application.invoke_task("gitlab:gitaly:install[#{gitaly_dir}]") + unless !gitaly_needs_update || system('rake', "gitlab:gitaly:install[#{gitaly_dir}]") + puts "\nGitaly failed to install, cleaning up #{gitaly_dir}!\n" FileUtils.rm_rf(gitaly_dir) - raise "Can't install gitaly" + exit 1 end start_gitaly(gitaly_dir) + puts " Gitaly setup in #{Time.now - start} seconds...\n" end def gitaly_dir_stale?(dir) gitaly_executable = File.join(dir, 'gitaly') - !File.exist?(gitaly_executable) || (File.mtime(gitaly_executable) < File.mtime(Rails.root.join('GITALY_SERVER_VERSION'))) + return false unless File.exist?(gitaly_executable) + + File.mtime(gitaly_executable) < File.mtime(Rails.root.join('GITALY_SERVER_VERSION')) end def start_gitaly(gitaly_dir) diff --git a/spec/tasks/gitlab/gitaly_rake_spec.rb b/spec/tasks/gitlab/gitaly_rake_spec.rb index 6d453c19fc3..cc932a4ec4c 100644 --- a/spec/tasks/gitlab/gitaly_rake_spec.rb +++ b/spec/tasks/gitlab/gitaly_rake_spec.rb @@ -41,6 +41,8 @@ describe 'gitlab:gitaly namespace rake task' do end describe 'gmake/make' do + let(:command_preamble) { %w[/usr/bin/env -u RUBYOPT] } + before(:all) do @old_env_ci = ENV.delete('CI') end @@ -57,12 +59,12 @@ describe 'gitlab:gitaly namespace rake task' do context 'gmake is available' do before do expect_any_instance_of(Object).to receive(:checkout_or_clone_version) - allow_any_instance_of(Object).to receive(:run_command!).with(['gmake']).and_return(true) + allow_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['gmake']).and_return(true) end it 'calls gmake in the gitaly directory' do expect(Gitlab::Popen).to receive(:popen).with(%w[which gmake]).and_return(['/usr/bin/gmake', 0]) - expect_any_instance_of(Object).to receive(:run_command!).with(['gmake']).and_return(true) + expect_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['gmake']).and_return(true) run_rake_task('gitlab:gitaly:install', clone_path) end @@ -71,12 +73,12 @@ describe 'gitlab:gitaly namespace rake task' do context 'gmake is not available' do before do expect_any_instance_of(Object).to receive(:checkout_or_clone_version) - allow_any_instance_of(Object).to receive(:run_command!).with(['make']).and_return(true) + allow_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['make']).and_return(true) end it 'calls make in the gitaly directory' do expect(Gitlab::Popen).to receive(:popen).with(%w[which gmake]).and_return(['', 42]) - expect_any_instance_of(Object).to receive(:run_command!).with(['make']).and_return(true) + expect_any_instance_of(Object).to receive(:run_command!).with(command_preamble + ['make']).and_return(true) run_rake_task('gitlab:gitaly:install', clone_path) end |