Skip to content

Commit 161c641

Browse files
committed
Packaging: Add self-install archives for each pack to /opt/stackstorm/install
1 parent c57f59d commit 161c641

File tree

16 files changed

+167
-7
lines changed

16 files changed

+167
-7
lines changed

contrib/chatops/BUILD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@ __defaults__(all=dict(inject_pack_python_path=True))
33
pack_metadata(
44
name="metadata",
55
)
6+
7+
st2_pack_archive(
8+
dependencies=[
9+
":metadata",
10+
"./actions",
11+
"./tests",
12+
],
13+
)

contrib/chatops/tests/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# tests can only be dependencies of other tests in this directory
2-
__dependents_rules__(("*", "/**", "!*"))
2+
__dependents_rules__(("*", "/**", f"//{build_file_dir().parent}:files", "!*"))
33

44
__defaults__(
55
{python_test: dict(tags=["pack"])},

contrib/core/BUILD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@ python_requirements(
1010
)
1111

1212
python_sources(
13+
# this is for fixture.py
1314
dependencies=[
1415
":metadata",
1516
"./actions",
1617
"./actions/send_mail:send_mail_resources",
1718
],
1819
)
20+
21+
st2_pack_archive(
22+
dependencies=[
23+
":metadata",
24+
":reqs",
25+
"./actions",
26+
"./actions/send_mail:send_mail_resources",
27+
"./tests",
28+
],
29+
)

contrib/core/tests/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# tests can only be dependencies of other tests in this directory
2-
__dependents_rules__(("*", "/**", "!*"))
2+
__dependents_rules__(("*", "/**", f"//{build_file_dir().parent}:files", "!*"))
33

44
__defaults__(
55
{python_test: dict(tags=["pack"])},

contrib/debug/BUILD

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@ __defaults__(all=dict(inject_pack_python_path=True))
33
pack_metadata(
44
name="metadata",
55
)
6+
7+
st2_pack_archive(
8+
dependencies=[
9+
":metadata",
10+
"./actions",
11+
],
12+
)

contrib/default/BUILD

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@ __defaults__(all=dict(inject_pack_python_path=True))
33
pack_metadata(
44
name="metadata",
55
)
6+
7+
st2_pack_archive(
8+
dependencies=[
9+
":metadata",
10+
],
11+
)

contrib/examples/BUILD

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,29 @@ python_requirement(
1818
name="flask",
1919
requirements=["flask"],
2020
)
21+
22+
# Also capture the requirements file for distribution in the pack archive.
23+
files(
24+
name="reqs",
25+
sources=["requirements*.txt"],
26+
)
27+
28+
st2_pack_archive(
29+
# we need to list targets of all files because transitive dep targets are NOT included
30+
dependencies=[
31+
":metadata",
32+
":reqs",
33+
"./actions",
34+
"./actions:shell",
35+
"./actions/bash_exit_code",
36+
"./actions/bash_ping",
37+
"./actions/bash_random",
38+
"./actions/pythonactions",
39+
"./actions/ubuntu_pkg_info",
40+
"./actions/ubuntu_pkg_info/lib",
41+
"./actions/windows",
42+
"./lib",
43+
"./sensors",
44+
"./tests",
45+
],
46+
)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
files(
2+
sources=["*.ps1"],
3+
)

contrib/examples/tests/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# tests can only be dependencies of other tests in this directory
2-
__dependents_rules__(("*", "/**", "!*"))
2+
__dependents_rules__(("*", "/**", f"//{build_file_dir().parent}:files", "!*"))
33

44
__defaults__(
55
{python_test: dict(tags=["pack"])},

contrib/hello_st2/BUILD

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,19 @@ __defaults__(all=dict(inject_pack_python_path=True))
33
pack_metadata(
44
name="metadata",
55
)
6+
7+
# Capture the requirements file for distribution in the pack archive;
8+
# we do not need to use `python_requirements()` for this sample file.
9+
files(
10+
name="reqs",
11+
sources=["requirements*.txt"],
12+
)
13+
14+
st2_pack_archive(
15+
dependencies=[
16+
":metadata",
17+
":reqs",
18+
"./actions",
19+
"./sensors",
20+
],
21+
)

0 commit comments

Comments
 (0)