Skip to content

Commit 185e871

Browse files
committed
add documentation for pants-plugins/pack_metadata
1 parent b6074c4 commit 185e871

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

pants-plugins/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ The plugins here add custom goals or other logic into pants.
88

99
To see available goals, do "./pants help goals" and "./pants help $goal".
1010

11+
These StackStorm-specific plugins might be useful in other StackStorm-related repos.
12+
- `pack_metadata`
13+
1114
These StackStorm-specific plugins are probably only useful for the st2 repo.
1215
- `api_spec`
1316
- `sample_conf`
@@ -26,6 +29,26 @@ This plugin also wires up pants so that the `lint` goal runs additional
2629
api spec validation on `st2common/st2common/openapi.yaml` with something
2730
like `./pants lint st2common/st2common/openapi.yaml`.
2831

32+
### `pack_metadata` plugin
33+
34+
This plugin adds two new targets to pants:
35+
- `pack_metadata`
36+
- `pack_metadata_in_git_submodule`
37+
38+
These targets include all StackStorm pack metadata files in a pack.
39+
Pack metadata includes top-level files (`pack.yaml`, `<pack>.yaml.examle`,
40+
`config.schema.yaml`, and `icon.png`) and metadata (`*.yaml`, `*.yml`)
41+
for actions, action-aliases, policies, rules, and sensors.
42+
43+
This plugin also wires up the `tailor` goal, so that it will add a
44+
`pack_metadata(name="metadata")` target wherever it finds a `pack.yaml` file.
45+
46+
One of the packs in this repo is in a git submodule to test our handling
47+
of git submodules (`st2tests/st2tests/fixtures/packs/test_content_version`).
48+
If it is not checked out, then some of the tests will fail.
49+
If it is not checked out, `pack_metadata_in_git_submodule` handles providing
50+
a helpful, instructive error message as early as possible.
51+
2952
### `sample_conf` plugin
3053

3154
This plugin wires up pants to make sure `conf/st2.conf.sample` gets

pants-plugins/pack_metadata/target_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class PackMetadata(ResourcesGeneratorTarget):
6060
help = (
6161
"Loose pack metadata files.\n\n"
6262
"Pack metadata includes top-level files (pack.yaml, <pack>.yaml.examle, "
63-
"config.schema.yaml, icon.png, and requirements.txt) and metadata for actions, "
63+
"config.schema.yaml, and icon.png) and metadata for actions, "
6464
"action-aliases, policies, rules, and sensors."
6565
)
6666

0 commit comments

Comments
 (0)