blob: 73c05dd3d9058b97e9e36ed6c8afea2f3c186442 [file] [log] [blame]
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Default resultdb configurations."""
load("@stdlib//internal/luci/lib/resultdb.star", "resultdb")
RESULTDB_SETTING_NO_BQ = resultdb.settings(enable = True)
RESULTDB_SETTING_STAGING = resultdb.settings(
enable = True,
bq_exports = [
resultdb.export_test_results(
bq_table = "flutter-infra-staging.resultdb.staging",
predicate = None,
),
resultdb.export_text_artifacts(
bq_table = "flutter-infra-staging.resultdb.artifacts_staging",
predicate = None,
),
],
)
RESULTDB_SETTING_PROD = resultdb.settings(
enable = True,
bq_exports = [
resultdb.export_test_results(
bq_table = "flutter-infra-staging.resultdb.prod",
predicate = None,
),
resultdb.export_text_artifacts(
bq_table = "flutter-infra-staging.resultdb.artifacts_prod",
predicate = None,
),
],
history_options = resultdb.history_options(
by_timestamp = True,
),
)
RESULTDB_SETTING_TRY = resultdb.settings(
enable = True,
bq_exports = [
resultdb.export_test_results(
bq_table = "flutter-infra-staging.resultdb.try",
predicate = None,
),
resultdb.export_text_artifacts(
bq_table = "flutter-infra-staging.resultdb.artifacts_try",
predicate = None,
),
],
)
# This is a mapping for build_bucket to resultdb bq_table.
resultdb_bucket_mapping = {
"prod": RESULTDB_SETTING_PROD,
"try": RESULTDB_SETTING_TRY,
"staging": RESULTDB_SETTING_STAGING,
"luci.flutter.prod": RESULTDB_SETTING_PROD,
"luci.flutter.try": RESULTDB_SETTING_TRY,
"luci.flutter.staging": RESULTDB_SETTING_STAGING,
}
def _get_config(bucket):
return resultdb_bucket_mapping[bucket]
resultdb_config = struct(
get = _get_config,
)