Commit 31a16992 authored by Andrejs Cunskis's avatar Andrejs Cunskis

Use env variables to set knapsack paths

parent 9649d8e8
......@@ -33,18 +33,17 @@ module QA
#
# @return [void]
def configure
ENV["KNAPSACK_TEST_FILE_PATTERN"] ||= "qa/specs/features/**/*_spec.rb"
ENV["KNAPSACK_REPORT_PATH"] = report_path
Knapsack.logger = QA::Runtime::Logger.logger
Knapsack.report.config(
# temp compatibility before all pipelines migrate to automatically setting report path
test_file_pattern: ENV["KNAPSACK_TEST_FILE_PATTERN"] || "qa/specs/features/**/*_spec.rb",
report_path: ENV["KNAPSACK_REPORT_PATH"] || report_path
)
download_report
rescue StandardError => e
logger.warn("Failed to download latest knapsack report: #{e}")
logger.warn("Falling back to 'knapsack/master_report.json'")
Knapsack.report.config(report_path: "knapsack/master_report.json")
ENV["KNAPSACK_REPORT_PATH"] = "knapsack/master_report.json"
end
# Download knapsack report from gcs bucket
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment