Skip to content

Commit

Permalink
Merge pull request #5907: Pants: add python_distribution BUILD meta…
Browse files Browse the repository at this point in the history
…data for runners
  • Loading branch information
cognifloyd committed Mar 2, 2023
2 parents 05ca9c5 + 69c32d7 commit cd8bb4c
Show file tree
Hide file tree
Showing 12 changed files with 159 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Added
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 #5853 #5848 #5847 #5858 #5857 #5860 #5868 #5871 #5864 #5874 #5884 #5893 #5891
#5890 #5898 #5901 #5906 #5899
#5890 #5898 #5901 #5906 #5899 #5907
Contributed by @cognifloyd

* Added a joint index to solve the problem of slow mongo queries for scheduled executions. #5805
Expand Down
12 changes: 12 additions & 0 deletions contrib/runners/action_chain_runner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
st2_runner_python_distribution(
runner_name="action_chain",
description=(
"Action-Chain workflow action runner "
"for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"action-chain": "action_chain_runner.action_chain_runner",
},
},
)
12 changes: 12 additions & 0 deletions contrib/runners/announcement_runner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
st2_runner_python_distribution(
runner_name="announcement",
description=(
"Announcement action runner "
"for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"announcement": "announcement_runner.announcement_runner",
},
},
)
11 changes: 11 additions & 0 deletions contrib/runners/http_runner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
st2_runner_python_distribution(
runner_name="http",
description=(
"HTTP(s) action runner for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"http-request": "http_runner.http_runner",
},
},
)
11 changes: 11 additions & 0 deletions contrib/runners/inquirer_runner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
st2_runner_python_distribution(
runner_name="inquirer",
description=(
"Inquirer action runner for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"inquirer": "inquirer_runner.inquirer_runner",
},
},
)
13 changes: 13 additions & 0 deletions contrib/runners/local_runner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
st2_runner_python_distribution(
runner_name="local",
description=(
"Local Shell Command and Script action runner "
"for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"local-shell-cmd": "local_runner.local_shell_command_runner",
"local-shell-script": "local_runner.local_shell_script_runner",
},
},
)
11 changes: 11 additions & 0 deletions contrib/runners/noop_runner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
st2_runner_python_distribution(
runner_name="noop",
description=(
"No-Op action runner for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"noop": "noop_runner.noop_runner",
},
},
)
43 changes: 43 additions & 0 deletions contrib/runners/orquesta_runner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
st2_runner_python_distribution(
runner_name="orquesta",
description=(
"Orquesta workflow runner "
"for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"orquesta": "orquesta_runner.orquesta_runner",
},
stevedore_namespace("orquesta.expressions.functions"): {
"st2kv": "orquesta_functions.st2kv:st2kv_",
"task": "orquesta_functions.runtime:task",
"basename": "st2common.expressions.functions.path:basename",
"dirname": "st2common.expressions.functions.path:dirname",
"from_json_string": "st2common.expressions.functions.data:from_json_string",
"from_yaml_string": "st2common.expressions.functions.data:from_yaml_string",
"json_dump": "st2common.expressions.functions.data:to_json_string",
"json_parse": "st2common.expressions.functions.data:from_json_string",
"json_escape": "st2common.expressions.functions.data:json_escape",
"jsonpath_query": "st2common.expressions.functions.data:jsonpath_query",
"regex_match": "st2common.expressions.functions.regex:regex_match",
"regex_replace": "st2common.expressions.functions.regex:regex_replace",
"regex_search": "st2common.expressions.functions.regex:regex_search",
"regex_substring": "st2common.expressions.functions.regex:regex_substring",
"to_human_time_from_seconds": "st2common.expressions.functions.time:to_human_time_from_seconds",
"to_json_string": "st2common.expressions.functions.data:to_json_string",
"to_yaml_string": "st2common.expressions.functions.data:to_yaml_string",
"use_none": "st2common.expressions.functions.data:use_none",
"version_compare": "st2common.expressions.functions.version:version_compare",
"version_more_than": "st2common.expressions.functions.version:version_more_than",
"version_less_than": "st2common.expressions.functions.version:version_less_than",
"version_equal": "st2common.expressions.functions.version:version_equal",
"version_match": "st2common.expressions.functions.version:version_match",
"version_bump_major": "st2common.expressions.functions.version:version_bump_major",
"version_bump_minor": "st2common.expressions.functions.version:version_bump_minor",
"version_bump_patch": "st2common.expressions.functions.version:version_bump_patch",
"version_strip_patch": "st2common.expressions.functions.version:version_strip_patch",
"yaml_dump": "st2common.expressions.functions.data:to_yaml_string",
"yaml_parse": "st2common.expressions.functions.data:from_yaml_string",
},
},
)
12 changes: 12 additions & 0 deletions contrib/runners/python_runner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
st2_runner_python_distribution(
runner_name="python",
description=(
"Python action runner for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"python-script": "python_runner.python_runner",
},
},
zip_safe=False,
)
13 changes: 13 additions & 0 deletions contrib/runners/remote_runner/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
st2_runner_python_distribution(
runner_name="remote",
description=(
"Remote SSH shell command and script action runner "
"for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"remote-shell-cmd": "remote_runner.remote_command_runner",
"remote-shell-script": "remote_runner.remote_script_runner",
},
},
)
15 changes: 15 additions & 0 deletions contrib/runners/winrm_runner/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,18 @@ python_requirement(
# https://github.com/pantsbuild/pants/pull/17390
modules=["winrm"],
)

st2_runner_python_distribution(
runner_name="winrm",
description=(
"WinRM shell command and PowerShell command and script action runner "
"for the StackStorm event-driven automation platform"
),
entry_points={
stevedore_namespace("st2common.runners.runner"): {
"winrm-cmd": "winrm_runner.winrm_command_runner",
"winrm-ps-cmd": "winrm_runner.winrm_ps_command_runner",
"winrm-ps-script": "winrm_runner.winrm_ps_script_runner",
},
},
)
5 changes: 5 additions & 0 deletions pants-plugins/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
# limitations under the License.


# this is only here temporarily until we update to pants 2.16+
def stevedore_namespace(ns):
return ns


def st2_publish_repos():
"""Return the list of repos twine should publish to.
Expand Down

0 comments on commit cd8bb4c

Please sign in to comment.