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:
authorRémy Coutable <remy@rymai.me>2019-01-21 22:20:38 +0300
committerRémy Coutable <remy@rymai.me>2019-02-05 16:04:54 +0300
commit6b39f55d3f0ba0d48e920693c4d5128e26769a1c (patch)
treea55eae5d31118fa44d902a932ea638163356d3ed /lib/gitlab/task_helpers.rb
parent31fc5965baf9ca23a1da4a0ffc350102fe4c89c6 (diff)
Add cache to the 'compile-assets' and 'gitlab:assets:compile' jobs
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/task_helpers.rb')
-rw-r--r--lib/gitlab/task_helpers.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gitlab/task_helpers.rb b/lib/gitlab/task_helpers.rb
index 224bb648d8f..8532845f3cb 100644
--- a/lib/gitlab/task_helpers.rb
+++ b/lib/gitlab/task_helpers.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
require 'rainbow/ext/string'
-require 'gitlab/utils/strong_memoize'
+require_dependency 'gitlab/utils/strong_memoize'
# rubocop:disable Rails/Output
module Gitlab
@@ -13,6 +13,12 @@ module Gitlab
extend self
+ def invoke_and_time_task(task)
+ start = Time.now
+ Rake::Task[task].invoke
+ puts "`#{task}` finished in #{Time.now - start} seconds"
+ end
+
# Ask if the user wants to continue
#
# Returns "yes" the user chose to continue