trabajo-afectivo/lib/tasks/zammad/ci/settings.rake

21 lines
614 B
Ruby
Raw Permalink Normal View History

# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
2018-10-01 17:41:17 +00:00
namespace :zammad do
namespace :ci do
desc 'Sets all required Settings for performing tests in the CI environment'
task :settings, [:elasticsearch] => :environment do |_task, args|
Setting.set('developer_mode', true)
Setting.set('chat_agent_idle_timeout', '45')
next if args[:elasticsearch] != 'with_elasticsearch'
Setting.set('es_url', 'http://elasticsearch:9200')
2018-10-01 17:41:17 +00:00
Setting.set('es_index', "browser_test_#{ENV['CI_BUILD_ID']}")
Rake::Task['searchindex:rebuild'].invoke
end
end
end