go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/lucicfg/starlark/stdlib/builtins.star (about) 1 # Copyright 2018 The LUCI Authors. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 """Defines symbols available in the global namespace of any lucicfg script.""" 16 17 # Non-LUCI features. 18 load("@stdlib//internal/io.star", _io = "io") 19 load("@stdlib//internal/lucicfg.star", _lucicfg = "lucicfg") 20 load("@stdlib//internal/time.star", _time = "time") 21 22 # Individual LUCI rules. 23 load("@stdlib//internal/luci/rules/binding.star", _binding = "binding") 24 load("@stdlib//internal/luci/rules/bucket.star", _bucket = "bucket") 25 load("@stdlib//internal/luci/rules/bucket_constraints.star", _bucket_constraints = "bucket_constraints") 26 load("@stdlib//internal/luci/rules/builder.star", _builder = "builder") 27 load("@stdlib//internal/luci/rules/buildbucket_notification_topic.star", _buildbucket_notification_topic = "buildbucket_notification_topic") 28 load("@stdlib//internal/luci/rules/console_view.star", _console_view = "console_view") 29 load("@stdlib//internal/luci/rules/console_view_entry.star", _console_view_entry = "console_view_entry") 30 load("@stdlib//internal/luci/rules/cq.star", _cq = "cq") 31 load("@stdlib//internal/luci/rules/cq_group.star", _cq_group = "cq_group") 32 load("@stdlib//internal/luci/rules/cq_tryjob_verifier.star", _cq_tryjob_verifier = "cq_tryjob_verifier") 33 load("@stdlib//internal/luci/rules/custom_role.star", _custom_role = "custom_role") 34 load("@stdlib//internal/luci/rules/dynamic_builder_template.star", _dynamic_builder_template = "dynamic_builder_template") 35 load("@stdlib//internal/luci/rules/executable.star", _executable = "executable", _recipe = "recipe") 36 load("@stdlib//internal/luci/rules/external_console_view.star", _external_console_view = "external_console_view") 37 load("@stdlib//internal/luci/rules/gitiles_poller.star", _gitiles_poller = "gitiles_poller") 38 load("@stdlib//internal/luci/rules/list_view.star", _list_view = "list_view") 39 load("@stdlib//internal/luci/rules/list_view_entry.star", _list_view_entry = "list_view_entry") 40 load("@stdlib//internal/luci/rules/logdog.star", _logdog = "logdog") 41 load("@stdlib//internal/luci/rules/milo.star", _milo = "milo") 42 load("@stdlib//internal/luci/rules/notifier.star", _notifier = "notifier") 43 load("@stdlib//internal/luci/rules/notifier_template.star", _notifier_template = "notifier_template") 44 load("@stdlib//internal/luci/rules/notify.star", _notify = "notify") 45 load("@stdlib//internal/luci/rules/project.star", _project = "project") 46 load("@stdlib//internal/luci/rules/realm.star", _realm = "realm") 47 load("@stdlib//internal/luci/rules/task_backend.star", _task_backend = "task_backend") 48 load("@stdlib//internal/luci/rules/tree_closer.star", _tree_closer = "tree_closer") 49 50 # LUCI helper modules. 51 load("@stdlib//internal/luci/lib/acl.star", _acl = "acl") 52 load("@stdlib//internal/luci/lib/cq.star", _cq_helpers = "cq") 53 load("@stdlib//internal/luci/lib/realms.star", _realms = "realms") 54 load("@stdlib//internal/luci/lib/resultdb.star", _resultdb = "resultdb") 55 load("@stdlib//internal/luci/lib/scheduler.star", _scheduler = "scheduler") 56 load("@stdlib//internal/luci/lib/swarming.star", _swarming = "swarming") 57 58 # Register all LUCI config generator callbacks. 59 load("@stdlib//internal/luci/generators.star", _register = "register") 60 61 _register() 62 63 # Non-LUCI-specific public API. 64 65 io = _io 66 lucicfg = _lucicfg 67 time = _time 68 69 # LUCI-specific public API. Order of entries matters for documentation. 70 71 luci = struct( 72 project = _project, 73 realm = _realm, 74 binding = _binding, 75 restrict_attribute = _realms.restrict_attribute, 76 custom_role = _custom_role, 77 logdog = _logdog, 78 bucket = _bucket, 79 executable = _executable, 80 recipe = _recipe, 81 builder = _builder, 82 gitiles_poller = _gitiles_poller, 83 milo = _milo, 84 list_view = _list_view, 85 list_view_entry = _list_view_entry, 86 console_view = _console_view, 87 console_view_entry = _console_view_entry, 88 external_console_view = _external_console_view, 89 notify = _notify, 90 notifier = _notifier, 91 tree_closer = _tree_closer, 92 notifier_template = _notifier_template, 93 cq = _cq, 94 cq_group = _cq_group, 95 cq_tryjob_verifier = _cq_tryjob_verifier, 96 bucket_constraints = _bucket_constraints, 97 buildbucket_notification_topic = _buildbucket_notification_topic, 98 task_backend = _task_backend, 99 dynamic_builder_template = _dynamic_builder_template, 100 ) 101 acl = _acl 102 cq = _cq_helpers 103 resultdb = _resultdb 104 scheduler = _scheduler 105 swarming = _swarming