go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/lucicfg/testdata/errors/dynamic_bucket_with_multiple_template.star (about)

     1  luci.project(
     2      name = "zzz",
     3      buildbucket = "cr-buildbucket.appspot.com",
     4      swarming = "chromium-swarm.appspot.com",
     5  )
     6  luci.bucket(name = "dynamic", dynamic = True)
     7  
     8  luci.recipe(
     9      name = "main/recipe",
    10      cipd_package = "recipe/bundles/main",
    11  )
    12  
    13  luci.recipe(
    14      name = "another/recipe",
    15      cipd_package = "recipe/bundles/another",
    16  )
    17  
    18  luci.dynamic_builder_template(
    19      bucket = "dynamic",
    20      executable = "main/recipe",
    21      service_account = "builder@example.com",
    22      dimensions = {
    23          "os": "Linux",
    24          "pool": "luci.ci.tester",
    25      },
    26  )
    27  
    28  luci.dynamic_builder_template(
    29      bucket = "dynamic",
    30      executable = "another/recipe",
    31  )
    32  
    33  # Expect errors like:
    34  #
    35  # Traceback (most recent call last):
    36  #   //testdata/errors/dynamic_bucket_with_multiple_template.star: in <toplevel>
    37  #   ...
    38  # Error: dynamic bucket "dynamic" can have at most one dynamic_builder_template