1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216
  217
  218
  219
  220
  221
  222
  223
  224
  225
  226
  227
  228
  229
  230
  231
  232
  233
  234
  235
  236
  237
  238
  239
  240
  241
  242
  243
  244
  245
  246
  247
  248
  249
  250
  251
  252
  253
  254
  255
  256
  257
  258
  259
  260
  261
  262
  263
  264
  265
  266
  267
  268
  269
  270
  271
  272
  273
  274
  275
  276
  277
  278
  279
  280
  281
  282
  283
  284
  285
  286
  287
  288
  289
  290
  291
  292
  293
  294
  295
  296
  297
  298
  299
  300
  301
  302
  303
  304
  305
  306
  307
  308
  309
  310
  311
  312
  313
  314
  315
  316
  317
  318
  319
  320
  321
  322
  323
  324
  325
  326
  327
  328
  329
  330
  331
  332
  333
  334
  335
  336
  337
  338
  339
  340

infra / config / recipes.star [blame]

# Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

load("//lib/bootstrap.star", "POLYMORPHIC", "register_recipe_bootstrappability")
load("//lib/recipe_experiments.star", "register_recipe_experiments")

_RECIPE_NAME_PREFIX = "recipe:"

def _recipe_for_package(cipd_package):
    def recipe(
            *,
            name,
            cipd_version = None,
            recipe = None,
            bootstrappable = False,
            experiments = None):
        """Declare a recipe for the given package.

        A wrapper around luci.recipe with a fixed cipd_package and some
        chromium-specific functionality. See
        https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/lucicfg/doc/README.md#luci.recipe
        for more information.

        Args:
            name: The name to use to refer to the executable in builder
              definitions. Must start with "recipe:". See luci.recipe for more
              information.
            cipd_version: See luci.recipe.
            recipe: See luci.recipe.
            bootstrappable: Whether or not the recipe supports the chromium
              bootstrapper. A recipe supports the bootstrapper if the following
              conditions are met:
              * chromium_bootstrap.update_gclient_config is called to update the
                gclient config that is used for bot_update. This will be true if
                calling chromium_checkout.ensure_checkout or
                chromium_tests.prepare_checkout.
              * If the recipe does analysis to reduce compilation/testing, it
                skips analysis and performs a full build if
                chromium_bootstrap.skip_analysis_reasons is non-empty. This will
                be true if calling chromium_tests.determine_compilation_targets.
              In addition to a True or False value, POLYMORPHIC can be
              specified. This value will cause the builder's executable to be
              changed to the bootstrapper in properties-optional, polymorphic
              mode, which will by default not bootstrap any properties. On a
              per-run basis the $bootstrap/properties property can be set to
              bootstrap properties for different builders.
            experiments: Experiments to apply to a builder using the recipe. If
              the builder specifies an experiment, the experiment value from the
              recipe will be ignored.
        """

        # Force the caller to put the recipe prefix rather than adding it
        # programatically to make the string greppable
        if not name.startswith(_RECIPE_NAME_PREFIX):
            fail("Recipe name {!r} does not start with {!r}"
                .format(name, _RECIPE_NAME_PREFIX))
        if recipe == None:
            recipe = name[len(_RECIPE_NAME_PREFIX):]
        ret = luci.recipe(
            name = name,
            cipd_package = cipd_package,
            cipd_version = cipd_version,
            recipe = recipe,
            use_bbagent = True,
            use_python3 = True,
        )

        register_recipe_bootstrappability(name, bootstrappable)

        register_recipe_experiments(name, experiments or {})

        return ret

    return recipe

build_recipe = _recipe_for_package(
    "infra/recipe_bundles/chromium.googlesource.com/chromium/tools/build",
)

build_recipe(
    name = "recipe:android/androidx_packager",
)

build_recipe(
    name = "recipe:android/avd_packager",
)

build_recipe(
    name = "recipe:android/device_flasher",
)

build_recipe(
    name = "recipe:android/sdk_packager",
)

build_recipe(
    name = "recipe:angle_chromium",
)

build_recipe(
    name = "recipe:angle_chromium_trybot",
)

build_recipe(
    name = "recipe:binary_size_generator_tot",
)

build_recipe(
    name = "recipe:binary_size_trybot",
)

build_recipe(
    name = "recipe:binary_size_fuchsia_trybot",
)

build_recipe(
    name = "recipe:branch_configuration/tester",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:compile_size_trybot",
)

build_recipe(
    name = "recipe:chrome_build/build_perf",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chrome_build/build_perf_siso",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chrome_build/build_perf_developer",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chrome_build/build_perf_without_rbe",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:celab",
)

build_recipe(
    name = "recipe:chromium",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chromium/builder_config_verifier",
)

build_recipe(
    name = "recipe:chromium/autosharder",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chromium/generic_script_runner",
)

build_recipe(
    name = "recipe:chromium/orchestrator",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chromium/compilator",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chromium/builder_cache_prewarmer",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chromium/gn_args_verifier",
)

build_recipe(
    name = "recipe:chromium/targets_config_verifier",
)

build_recipe(
    name = "recipe:chromium_licenses/scan",
)

build_recipe(
    name = "recipe:chromium_polymorphic/launcher",
)

build_recipe(
    name = "recipe:chromium_rr/orchestrator",
)

build_recipe(
    name = "recipe:chromium_rr/test_launcher",
    bootstrappable = POLYMORPHIC,
)

build_recipe(
    name = "recipe:chromium_3pp",
)

build_recipe(
    name = "recipe:chromium/fuzz",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chromium/mega_cq_launcher",
)

build_recipe(
    name = "recipe:chromium/universal_test_runner_test",
)

build_recipe(
    name = "recipe:chromium_clang_coverage_tot",
)

build_recipe(
    name = "recipe:chromium_fuzz_coverage",
)

build_recipe(
    name = "recipe:chrome_codeql_database_builder",
)

build_recipe(
    name = "recipe:chrome_codeql_query_runner",
)

build_recipe(
    name = "recipe:chromium_codesearch",
)

build_recipe(
    name = "recipe:chromium_expectation_files/expectation_file_scripts",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chromium_export_metadata",
)

build_recipe(
    name = "recipe:chromium_rts/create_model",
)

build_recipe(
    name = "recipe:chromium_rts/rts_analyze",
)

build_recipe(
    name = "recipe:chromium_trybot",
    bootstrappable = True,
)

build_recipe(
    name = "recipe:chromium_toolchain/package_clang",
)

build_recipe(
    name = "recipe:chromium_toolchain/package_rust",
)

build_recipe(
    name = "recipe:cronet",
)

build_recipe(
    name = "recipe:flakiness/reproducer",
)

build_recipe(
    name = "recipe:gofindit/chromium/single_revision",
    bootstrappable = POLYMORPHIC,
)

build_recipe(
    name = "recipe:gofindit/chromium/test_single_revision",
    bootstrappable = POLYMORPHIC,
)

build_recipe(
    name = "recipe:presubmit",
)

build_recipe(
    name = "recipe:reclient_config_deploy_check/tester",
)

build_recipe(
    name = "recipe:reclient_reclient_comparison",
)

build_recipe(
    name = "recipe:requires_testing_checker",
)

build_recipe(
    name = "recipe:reviver/chromium/runner",
    bootstrappable = POLYMORPHIC,
)

build_recipe(
    name = "recipe:swarming/deterministic_build",
)

build_recipe(
    name = "recipe:tricium_clang_tidy_wrapper",
)

build_recipe(
    name = "recipe:tricium_clang_tidy_orchestrator",
)

build_recipe(
    name = "recipe:tricium_metrics",
)

build_recipe(
    name = "recipe:tricium_oilpan",
)

build_recipe(
    name = "recipe:tricium_simple",
)

build_recipe(
    name = "recipe:webrtc/chromium_ios",
)