diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7d456f91f5..b324f52a6e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,7 @@ Added working on StackStorm, improve our security posture, and improve CI reliability thanks in part to pants' use of PEX lockfiles. This is not a user-facing addition. #5778 #5789 #5817 #5795 #5830 #5833 #5834 #5841 #5840 #5838 #5842 #5837 #5849 #5850 + #5846 Contributed by @cognifloyd * Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805 diff --git a/conf/BUILD b/conf/BUILD new file mode 100644 index 0000000000..c434d58228 --- /dev/null +++ b/conf/BUILD @@ -0,0 +1,56 @@ +file( + name="st2client_sample_config", + source="st2rc.sample.ini", +) + +file( + name="st2.conf.sample", + source="st2.conf.sample", +) + +file( + name="logrotate", + source="logrotate.conf", +) + +file( + name="nginx_sample_config", + source="nginx/st2.conf", +) + +file( + name="st2_kvstore_demo_crypto_key", + source="st2_kvstore_demo.crypto.key.json", +) + +files( + name="st2_tests_conf", + sources=[ + "st2.tests*.conf", + ], + dependencies=[ + "st2auth/conf:htpasswd", + "st2actions/conf:logging", + "st2reactor/conf:logging", + "st2tests/conf:other_logging_conf", + ], +) + +file( + name="st2_dev_conf", + source="st2.dev.conf", + dependencies=[ + ":st2_kvstore_demo_crypto_key", + "st2auth/conf:htpasswd", + "st2actions/conf:logging", + "st2api/conf:logging", + "st2auth/conf:logging", + "st2reactor/conf:logging", + "st2stream/conf:logging", + ], +) + +file( + name="st2_package_conf", + source="st2.package.conf", +) diff --git a/contrib/chatops/tests/BUILD b/contrib/chatops/tests/BUILD index 86783f843c..e00129e8ce 100644 --- a/contrib/chatops/tests/BUILD +++ b/contrib/chatops/tests/BUILD @@ -1,3 +1,10 @@ +files( + name="fixtures", + sources=["fixtures/*.json"], +) + python_tests( + name="tests", + dependencies=[":fixtures"], skip_pylint=True, ) diff --git a/contrib/runners/action_chain_runner/action_chain_runner/BUILD b/contrib/runners/action_chain_runner/action_chain_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/action_chain_runner/action_chain_runner/BUILD +++ b/contrib/runners/action_chain_runner/action_chain_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/contrib/runners/announcement_runner/announcement_runner/BUILD b/contrib/runners/announcement_runner/announcement_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/announcement_runner/announcement_runner/BUILD +++ b/contrib/runners/announcement_runner/announcement_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/contrib/runners/http_runner/http_runner/BUILD b/contrib/runners/http_runner/http_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/http_runner/http_runner/BUILD +++ b/contrib/runners/http_runner/http_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/contrib/runners/inquirer_runner/inquirer_runner/BUILD b/contrib/runners/inquirer_runner/inquirer_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/inquirer_runner/inquirer_runner/BUILD +++ b/contrib/runners/inquirer_runner/inquirer_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/contrib/runners/local_runner/local_runner/BUILD b/contrib/runners/local_runner/local_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/local_runner/local_runner/BUILD +++ b/contrib/runners/local_runner/local_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/contrib/runners/noop_runner/noop_runner/BUILD b/contrib/runners/noop_runner/noop_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/noop_runner/noop_runner/BUILD +++ b/contrib/runners/noop_runner/noop_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/contrib/runners/orquesta_runner/orquesta_runner/BUILD b/contrib/runners/orquesta_runner/orquesta_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/orquesta_runner/orquesta_runner/BUILD +++ b/contrib/runners/orquesta_runner/orquesta_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/contrib/runners/python_runner/python_runner/BUILD b/contrib/runners/python_runner/python_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/python_runner/python_runner/BUILD +++ b/contrib/runners/python_runner/python_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/contrib/runners/remote_runner/remote_runner/BUILD b/contrib/runners/remote_runner/remote_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/remote_runner/remote_runner/BUILD +++ b/contrib/runners/remote_runner/remote_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/contrib/runners/winrm_runner/tests/unit/fixtures/BUILD b/contrib/runners/winrm_runner/tests/unit/fixtures/BUILD index db46e8d6c9..d121b83f96 100644 --- a/contrib/runners/winrm_runner/tests/unit/fixtures/BUILD +++ b/contrib/runners/winrm_runner/tests/unit/fixtures/BUILD @@ -1 +1,8 @@ -python_sources() +files( + name="powershell", + sources=["*.ps1"], +) + +python_sources( + dependencies=[":powershell"], +) diff --git a/contrib/runners/winrm_runner/winrm_runner/BUILD b/contrib/runners/winrm_runner/winrm_runner/BUILD index db46e8d6c9..dc04a89328 100644 --- a/contrib/runners/winrm_runner/winrm_runner/BUILD +++ b/contrib/runners/winrm_runner/winrm_runner/BUILD @@ -1 +1,8 @@ -python_sources() +resource( + name="runner_metadata", + source="runner.yaml", +) + +python_sources( + dependencies=[":runner_metadata"], +) diff --git a/scripts/github/BUILD b/scripts/github/BUILD index 6c95f66377..714f976026 100644 --- a/scripts/github/BUILD +++ b/scripts/github/BUILD @@ -1 +1,11 @@ -shell_sources() +files( + name="assets", + sources=[ + "*.txt", + "*.conf", + ], +) + +shell_sources( + dependencies=[":assets"], +) diff --git a/st2actions/conf/BUILD b/st2actions/conf/BUILD new file mode 100644 index 0000000000..57246fe48d --- /dev/null +++ b/st2actions/conf/BUILD @@ -0,0 +1,14 @@ +file( + name="logging_console", + source="console.conf", +) + +files( + name="logging", + sources=["logging*.conf"], +) + +files( + name="logging_syslog", + sources=["syslog*.conf"], +) diff --git a/st2api/conf/BUILD b/st2api/conf/BUILD new file mode 100644 index 0000000000..9c3668885c --- /dev/null +++ b/st2api/conf/BUILD @@ -0,0 +1,19 @@ +file( + name="logging_console", + source="console.conf", +) + +file( + name="logging", + source="logging.conf", +) + +file( + name="logging_gunicorn", + source="logging.gunicorn.conf", +) + +file( + name="logging_syslog", + source="syslog.conf", +) diff --git a/st2api/st2api/public/BUILD b/st2api/st2api/public/BUILD new file mode 100644 index 0000000000..75f7f76214 --- /dev/null +++ b/st2api/st2api/public/BUILD @@ -0,0 +1,5 @@ +files( + sources=[ + "images/*.png", + ], +) diff --git a/st2api/st2api/templates/BUILD b/st2api/st2api/templates/BUILD new file mode 100644 index 0000000000..9e2968ec22 --- /dev/null +++ b/st2api/st2api/templates/BUILD @@ -0,0 +1 @@ +file(source="index.html") diff --git a/st2api/tests/integration/BUILD b/st2api/tests/integration/BUILD index 57341b1358..9cd1d7c3e2 100644 --- a/st2api/tests/integration/BUILD +++ b/st2api/tests/integration/BUILD @@ -1,3 +1,6 @@ python_tests( name="tests", + dependencies=[ + "conf/st2.tests.conf:st2_tests_conf", + ], ) diff --git a/st2auth/conf/BUILD b/st2auth/conf/BUILD new file mode 100644 index 0000000000..8fd094d9fa --- /dev/null +++ b/st2auth/conf/BUILD @@ -0,0 +1,29 @@ +file( + name="apache_sample_conf", + source="apache.sample.conf", +) + +file( + name="htpasswd", + source="htpasswd_dev", +) + +file( + name="logging_console", + source="console.conf", +) + +file( + name="logging", + source="logging.conf", +) + +file( + name="logging_gunicorn", + source="logging.gunicorn.conf", +) + +file( + name="logging_syslog", + source="syslog.conf", +) diff --git a/st2client/tests/fixtures/BUILD b/st2client/tests/fixtures/BUILD index db46e8d6c9..86e1157f5a 100644 --- a/st2client/tests/fixtures/BUILD +++ b/st2client/tests/fixtures/BUILD @@ -1 +1,13 @@ -python_sources() +resources( + name="execution_fixtures", + sources=["execution*.json", "execution*.txt"], +) + +resources( + name="st2client_ini", + sources=["*.ini"], +) + +python_sources( + dependencies=[":execution_fixtures"], +) diff --git a/st2client/tests/unit/BUILD b/st2client/tests/unit/BUILD index 9aaca5d249..4af5ab5d8d 100644 --- a/st2client/tests/unit/BUILD +++ b/st2client/tests/unit/BUILD @@ -1,6 +1,7 @@ python_tests( name="tests", dependencies=[ + "st2client/tests/fixtures:st2client_ini", # most files import tests.base which is ambiguous. Tell pants which one to use. "st2client/tests/base.py", ], diff --git a/st2common/benchmarks/fixtures/json/BUILD b/st2common/benchmarks/fixtures/json/BUILD new file mode 100644 index 0000000000..acfa51487e --- /dev/null +++ b/st2common/benchmarks/fixtures/json/BUILD @@ -0,0 +1,3 @@ +files( + sources=["*.json"], +) diff --git a/st2common/benchmarks/micro/BUILD b/st2common/benchmarks/micro/BUILD index 828ec3ebba..de55e01dc8 100644 --- a/st2common/benchmarks/micro/BUILD +++ b/st2common/benchmarks/micro/BUILD @@ -1,4 +1,5 @@ python_sources( + dependencies=["st2common/benchmarks/fixtures/json"], skip_pylint=True, ) diff --git a/st2common/st2common/BUILD b/st2common/st2common/BUILD index db46e8d6c9..38259c4c32 100644 --- a/st2common/st2common/BUILD +++ b/st2common/st2common/BUILD @@ -1 +1,11 @@ -python_sources() +python_sources( + dependencies=[ + ":openapi_spec", + ] +) + +# These may be loaded with st2common.util.spec_loader +resources( + name="openapi_spec", + sources=["openapi.yaml", "openapi.yaml.j2"], +) diff --git a/st2common/st2common/bootstrap/BUILD b/st2common/st2common/bootstrap/BUILD index db46e8d6c9..37d827b2f1 100644 --- a/st2common/st2common/bootstrap/BUILD +++ b/st2common/st2common/bootstrap/BUILD @@ -1 +1,9 @@ -python_sources() +python_sources( + overrides={ + "policiesregistrar.py": { + "dependencies": [ + "st2common/st2common/policies/meta:policies_meta", + ], + }, + }, +) diff --git a/st2common/st2common/conf/BUILD b/st2common/st2common/conf/BUILD new file mode 100644 index 0000000000..3b89b94788 --- /dev/null +++ b/st2common/st2common/conf/BUILD @@ -0,0 +1,5 @@ +# used in st2common.constants.logging.DEFAULT_LOGGING_CONF_PATH +resource( + name="base.logging.conf", + source="base.logging.conf", +) diff --git a/st2common/st2common/constants/BUILD b/st2common/st2common/constants/BUILD index db46e8d6c9..f0ac5efd12 100644 --- a/st2common/st2common/constants/BUILD +++ b/st2common/st2common/constants/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2common/st2common/conf:base.logging.conf", + ] +) diff --git a/st2common/st2common/policies/meta/BUILD b/st2common/st2common/policies/meta/BUILD new file mode 100644 index 0000000000..7164261422 --- /dev/null +++ b/st2common/st2common/policies/meta/BUILD @@ -0,0 +1,5 @@ +# These are loaded by st2common.bootstrap.policiesregistrar +resources( + name="policies_meta", + sources=["*.yaml"], +) diff --git a/st2common/st2common/util/schema/BUILD b/st2common/st2common/util/schema/BUILD index db46e8d6c9..c579e7b49b 100644 --- a/st2common/st2common/util/schema/BUILD +++ b/st2common/st2common/util/schema/BUILD @@ -1 +1,10 @@ -python_sources() +python_sources( + dependencies=[ + ":jsonschema", + ] +) + +resources( + name="jsonschema", + sources=["*.json"], +) diff --git a/st2common/tests/integration/BUILD b/st2common/tests/integration/BUILD index 0eea8b1cf1..fc4f20c403 100644 --- a/st2common/tests/integration/BUILD +++ b/st2common/tests/integration/BUILD @@ -2,4 +2,9 @@ python_sources() python_tests( name="tests", + dependencies=[ + # used by test_register_content_script + "conf/st2.tests.conf:st2_tests_conf", + "conf/st2.tests1.conf:st2_tests_conf", + ], ) diff --git a/st2common/tests/unit/test_util_file_system.py b/st2common/tests/unit/test_util_file_system.py index e36fa85301..9ae8d1bc7a 100644 --- a/st2common/tests/unit/test_util_file_system.py +++ b/st2common/tests/unit/test_util_file_system.py @@ -34,6 +34,7 @@ def test_get_file_list(self): "mock_exception.py", "concurrency.py", "__init__.py", + "meta/BUILD", "meta/mock_exception.yaml", "meta/concurrency.yaml", "meta/__init__.py", @@ -49,6 +50,6 @@ def test_get_file_list(self): "meta/__init__.py", ] result = get_file_list( - directory=directory, exclude_patterns=["*.pyc", "*.yaml", "BUILD"] + directory=directory, exclude_patterns=["*.pyc", "*.yaml", "*BUILD"] ) self.assertItemsEqual(expected, result) diff --git a/st2reactor/conf/BUILD b/st2reactor/conf/BUILD new file mode 100644 index 0000000000..57246fe48d --- /dev/null +++ b/st2reactor/conf/BUILD @@ -0,0 +1,14 @@ +file( + name="logging_console", + source="console.conf", +) + +files( + name="logging", + sources=["logging*.conf"], +) + +files( + name="logging_syslog", + sources=["syslog*.conf"], +) diff --git a/st2reactor/tests/fixtures/BUILD b/st2reactor/tests/fixtures/BUILD new file mode 100644 index 0000000000..6a2517a6a7 --- /dev/null +++ b/st2reactor/tests/fixtures/BUILD @@ -0,0 +1,4 @@ +resources( + name="metadata", + sources=["*.yaml"], +) diff --git a/st2reactor/tests/fixtures/fixture/BUILD b/st2reactor/tests/fixtures/fixture/BUILD index db46e8d6c9..4dd7080488 100644 --- a/st2reactor/tests/fixtures/fixture/BUILD +++ b/st2reactor/tests/fixtures/fixture/BUILD @@ -1 +1,3 @@ -python_sources() +python_sources( + dependencies=["st2reactor/tests/fixtures:metadata"], +) diff --git a/st2reactor/tests/integration/BUILD b/st2reactor/tests/integration/BUILD index 57341b1358..c0a9372515 100644 --- a/st2reactor/tests/integration/BUILD +++ b/st2reactor/tests/integration/BUILD @@ -1,3 +1,7 @@ python_tests( name="tests", + dependencies=[ + "conf/st2.tests.conf:st2_tests_conf", + "conf/st2.tests2.conf:st2_tests_conf", + ], ) diff --git a/st2stream/conf/BUILD b/st2stream/conf/BUILD new file mode 100644 index 0000000000..9c3668885c --- /dev/null +++ b/st2stream/conf/BUILD @@ -0,0 +1,19 @@ +file( + name="logging_console", + source="console.conf", +) + +file( + name="logging", + source="logging.conf", +) + +file( + name="logging_gunicorn", + source="logging.gunicorn.conf", +) + +file( + name="logging_syslog", + source="syslog.conf", +) diff --git a/st2tests/conf/BUILD b/st2tests/conf/BUILD new file mode 100644 index 0000000000..72352b12b1 --- /dev/null +++ b/st2tests/conf/BUILD @@ -0,0 +1,24 @@ +file( + name="st2.conf", + source="st2.conf", +) + +file( + name="st2_kvstore_tests.crypto.key.json", + source="st2_kvstore_tests.crypto.key.json", +) + +file( + name="logging.conf", + source="logging.conf", +) + +files( + name="other_logging_conf", + sources=["logging.*.conf"], +) + +file( + name="vagrant_ssh_key", + source="vagrant.privkey.insecure", +) diff --git a/st2tests/integration/BUILD b/st2tests/integration/BUILD index 3c3cd5dda1..f289067c07 100644 --- a/st2tests/integration/BUILD +++ b/st2tests/integration/BUILD @@ -6,5 +6,9 @@ __defaults__( shell_sources( name="shell", + dependencies=[ + "st2tests/conf:st2.conf", + "st2tests/conf:vagrant_ssh_key", + ], skip_shellcheck=True, ) diff --git a/st2tests/st2tests/BUILD b/st2tests/st2tests/BUILD index db46e8d6c9..bdd44d7ac9 100644 --- a/st2tests/st2tests/BUILD +++ b/st2tests/st2tests/BUILD @@ -1 +1,9 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/conf:st2.conf", + "st2tests/conf:st2_kvstore_tests.crypto.key.json", + "st2tests/conf:logging.conf", + "./resources:ssh", + "./resources:packs", + ], +) diff --git a/st2tests/st2tests/fixtures/BUILD b/st2tests/st2tests/fixtures/BUILD new file mode 100644 index 0000000000..010e795e35 --- /dev/null +++ b/st2tests/st2tests/fixtures/BUILD @@ -0,0 +1,8 @@ +resources( + # used by tests in st2-rbac-backend + name="rbac_fixtures", + sources=[ + "./rbac/**/*.yaml", + "./rbac_invalid/**/*.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/conf/BUILD b/st2tests/st2tests/fixtures/conf/BUILD index db46e8d6c9..5674cea485 100644 --- a/st2tests/st2tests/fixtures/conf/BUILD +++ b/st2tests/st2tests/fixtures/conf/BUILD @@ -1 +1,18 @@ -python_sources() +resources( + name="st2.tests.conf", + sources=[ + "st2.tests*.conf", + "logging.*.conf", # used by st2.tests*.conf + ], + dependencies=[ + "st2tests/conf:other_logging_conf", + # depending on st2auth from st2tests is not nice. + "st2auth/conf:htpasswd", + ], +) + +python_sources( + dependencies=[ + ":st2.tests.conf", + ], +) diff --git a/st2tests/st2tests/fixtures/history_views/BUILD b/st2tests/st2tests/fixtures/history_views/BUILD index db46e8d6c9..a724ff3786 100644 --- a/st2tests/st2tests/fixtures/history_views/BUILD +++ b/st2tests/st2tests/fixtures/history_views/BUILD @@ -1 +1,8 @@ -python_sources() +resources( + name="assets", + sources=["*.yaml"], +) + +python_sources( + dependencies=[":assets"], +) diff --git a/st2tests/st2tests/fixtures/keyczar_keys/BUILD b/st2tests/st2tests/fixtures/keyczar_keys/BUILD index db46e8d6c9..63a281f0b7 100644 --- a/st2tests/st2tests/fixtures/keyczar_keys/BUILD +++ b/st2tests/st2tests/fixtures/keyczar_keys/BUILD @@ -1 +1,8 @@ -python_sources() +resources( + name="assets", + sources=["*.json"], +) + +python_sources( + dependencies=[":assets"], +) diff --git a/st2tests/st2tests/fixtures/packs/configs/BUILD b/st2tests/st2tests/fixtures/packs/configs/BUILD new file mode 100644 index 0000000000..0700f34cd5 --- /dev/null +++ b/st2tests/st2tests/fixtures/packs/configs/BUILD @@ -0,0 +1,3 @@ +resources( + sources=["*.yaml"], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_1/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_1/BUILD index db46e8d6c9..4a173b377b 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_1/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_1/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_1.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_11/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_11/BUILD index db46e8d6c9..af53903c91 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_11/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_11/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_11.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_19/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_19/BUILD index db46e8d6c9..a7cbcb14b2 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_19/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_19/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_19.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_22/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_22/BUILD index db46e8d6c9..76fb2a9339 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_22/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_22/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_22.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_5/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_5/BUILD index db46e8d6c9..e12c5b4ab9 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_5/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_5/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_5.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_6/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_6/BUILD index db46e8d6c9..d5287b4ba2 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_6/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_6/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_6.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_7/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_7/BUILD index db46e8d6c9..852ffa1b22 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_7/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_7/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_7.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/BUILD index db46e8d6c9..f577a9434a 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_1/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_schema_with_nested_object_1.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/BUILD index db46e8d6c9..6c3d0aff16 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_2/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_schema_with_nested_object_2.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/BUILD index db46e8d6c9..7dacccd590 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_3/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_schema_with_nested_object_3.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/BUILD b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/BUILD index db46e8d6c9..80faba7d5c 100644 --- a/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/BUILD +++ b/st2tests/st2tests/fixtures/packs/dummy_pack_schema_with_nested_object_4/BUILD @@ -1 +1,5 @@ -python_sources() +python_sources( + dependencies=[ + "st2tests/st2tests/fixtures/packs/configs/dummy_pack_schema_with_nested_object_4.yaml", + ], +) diff --git a/st2tests/st2tests/fixtures/packs/executions/BUILD b/st2tests/st2tests/fixtures/packs/executions/BUILD index db46e8d6c9..46408a38dc 100644 --- a/st2tests/st2tests/fixtures/packs/executions/BUILD +++ b/st2tests/st2tests/fixtures/packs/executions/BUILD @@ -1 +1,8 @@ -python_sources() +resources( + name="artifacts", + sources=["*.yaml"], +) + +python_sources( + dependencies=[":artifacts"], +) diff --git a/st2tests/st2tests/fixtures/specs/BUILD b/st2tests/st2tests/fixtures/specs/BUILD new file mode 100644 index 0000000000..090f612588 --- /dev/null +++ b/st2tests/st2tests/fixtures/specs/BUILD @@ -0,0 +1,4 @@ +resource( + name="openapi_specs", + source="openapi.yaml.j2", +) diff --git a/st2tests/st2tests/fixtures/ssl_certs/BUILD b/st2tests/st2tests/fixtures/ssl_certs/BUILD index db46e8d6c9..d5c05d1ede 100644 --- a/st2tests/st2tests/fixtures/ssl_certs/BUILD +++ b/st2tests/st2tests/fixtures/ssl_certs/BUILD @@ -1 +1,15 @@ -python_sources() +resources( + name="assets", + sources=[ + "**/*.cer", + "**/*.cnf", + "**/*.p12", + "**/*.pem", + "ca/index.txt*", + "ca/serial*", + ], +) + +python_sources( + dependencies=[":assets"], +) diff --git a/st2tests/st2tests/policies/meta/BUILD b/st2tests/st2tests/policies/meta/BUILD new file mode 100644 index 0000000000..20f3688a97 --- /dev/null +++ b/st2tests/st2tests/policies/meta/BUILD @@ -0,0 +1,4 @@ +resources( + name="policies_meta", + sources=["*.yaml"], +) diff --git a/st2tests/st2tests/resources/BUILD b/st2tests/st2tests/resources/BUILD new file mode 100644 index 0000000000..b3cf3010e3 --- /dev/null +++ b/st2tests/st2tests/resources/BUILD @@ -0,0 +1,9 @@ +resources( + name="ssh", + sources=["ssh/*"], +) + +resources( + name="packs", + sources=["packs/**", "!packs/**/BUILD"], +) diff --git a/tools/BUILD b/tools/BUILD index aa957dfd72..17e8df14c8 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -7,4 +7,7 @@ shell_sources( "st2-setup-*", ], skip_shellcheck=True, + dependencies=[ + "conf:st2_dev_conf", + ], )