Skip to content

Commit 1a86b23

Browse files
authored
Pants+Packaging: Add makeself_archive for each pack to facilitate installation (#6311)
2 parents 8f826bc + bba75f7 commit 1a86b23

File tree

19 files changed

+172
-10
lines changed

19 files changed

+172
-10
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Added
7979
to pants' use of PEX lockfiles. This is not a user-facing addition.
8080
#6118 #6141 #6133 #6120 #6181 #6183 #6200 #6237 #6229 #6240 #6241 #6244 #6251 #6253
8181
#6254 #6258 #6259 #6260 #6269 #6275 #6279 #6278 #6282 #6283 #6273 #6287 #6306 #6307
82+
#6311
8283
Contributed by @cognifloyd
8384
* Build of ST2 EL9 packages #6153
8485
Contributed by @amanda11

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"])},

0 commit comments

Comments
 (0)