From 51b7dbfb88228c80600249378d6a178145800b6d Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Sat, 30 Nov 2019 21:22:24 +0700 Subject: [PATCH] Add a TB_DISABLE_INSIGHTS env variable to disable the insights uploading step --- lib/test_boosters/insights_uploader.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_boosters/insights_uploader.rb b/lib/test_boosters/insights_uploader.rb index b0cdef3..23a26c4 100644 --- a/lib/test_boosters/insights_uploader.rb +++ b/lib/test_boosters/insights_uploader.rb @@ -3,7 +3,7 @@ module InsightsUploader module_function def upload(booster_type, file) - return unless File.exist?(file) + return if ENV['TB_DISABLE_INSIGHTS'] || !File.exist?(file) cmd = "http POST '#{insights_url}' #{booster_type}:=@#{file}"