autopkg-wrapper 2026.2.6__py3-none-any.whl → 2026.2.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,244 @@
1
+ Metadata-Version: 2.4
2
+ Name: autopkg-wrapper
3
+ Version: 2026.2.9
4
+ Summary: A package used to execute some autopkg functions, primarily within the context of a GitHub Actions runner.
5
+ Project-URL: Repository, https://github.com/smithjw/autopkg-wrapper
6
+ Author-email: James Smith <james@smithjw.me>
7
+ License-Expression: BSD-3-Clause
8
+ License-File: LICENSE
9
+ Requires-Python: ~=3.14.0
10
+ Requires-Dist: chardet
11
+ Requires-Dist: idna
12
+ Requires-Dist: jamf-pro-sdk
13
+ Requires-Dist: pygithub
14
+ Requires-Dist: requests
15
+ Requires-Dist: ruamel-yaml
16
+ Requires-Dist: toml
17
+ Requires-Dist: urllib3
18
+ Description-Content-Type: text/markdown
19
+
20
+ # autopkg-wrapper
21
+
22
+ `autopkg_wrapper` is a small package that can be used to run [`autopkg`](https://github.com/autopkg/autopkg) within CI/CD environments such as GitHub Actions.
23
+
24
+ The easiest way to run it is by installing with pip.
25
+
26
+ ```shell
27
+ pip install autopkg-wrapper
28
+ ```
29
+
30
+ ## Development
31
+
32
+ This project uses `uv` for dependency management and `mise` tasks for common workflows.
33
+
34
+ ```bash
35
+ mise run install
36
+ mise run test
37
+ mise run build
38
+ ```
39
+
40
+ ## Command Line Parameters
41
+
42
+ <!-- CLI-PARAMS-START -->
43
+
44
+ ```shell
45
+ usage: autopkg_wrapper [-h] [--recipe-file RECIPE_FILE |
46
+ --recipes [RECIPES ...]]
47
+ [--recipe-processing-order [RECIPE_PROCESSING_ORDER ...]]
48
+ [--autopkg-bin AUTOPKG_BIN] [--dry-run] [--debug]
49
+ [--disable-recipe-trust-check] [--disable-git-commands]
50
+ [--concurrency CONCURRENCY]
51
+ [--github-token GITHUB_TOKEN]
52
+ [--branch-name BRANCH_NAME] [--create-pr]
53
+ [--create-issues]
54
+ [--overrides-repo-path OVERRIDES_REPO_PATH]
55
+ [--post-processors [POST_PROCESSORS ...]]
56
+ [--autopkg-prefs AUTOPKG_PREFS] [--process-reports]
57
+ [--reports-zip REPORTS_ZIP]
58
+ [--reports-extract-dir REPORTS_EXTRACT_DIR]
59
+ [--reports-dir REPORTS_DIR]
60
+ [--reports-out-dir REPORTS_OUT_DIR]
61
+ [--reports-run-date REPORTS_RUN_DATE]
62
+ [--reports-strict]
63
+
64
+ Run autopkg recipes
65
+
66
+ options:
67
+ -h, --help show this help message and exit
68
+ --recipe-file RECIPE_FILE
69
+ Provide the list of recipes to run via a JSON file for
70
+ easier management.
71
+ --recipes [RECIPES ...]
72
+ Recipes to run via CLI flag or environment variable.
73
+ If the '--recipes' flag is used, simply provide a
74
+ space-separated list on the command line: `autopkg-
75
+ wrapper --recipes recipe_one.download
76
+ recipe_two.download` Alternatively, you can provide a
77
+ space/comma-separated list in the 'AW_RECIPES'
78
+ environment variable: `export
79
+ AW_RECIPES="recipe_one.download recipe_two.download"`
80
+ `export AW_RECIPES="recipe_one.pkg,recipe_two.pkg"`
81
+ `autopkg-wrapper`
82
+ --recipe-processing-order [RECIPE_PROCESSING_ORDER ...]
83
+ This option comes in handy if you include additional
84
+ recipe type names in your overrides and wish them to
85
+ be processed in a specific order. We'll specifically
86
+ look for these recipe types after the first period (.)
87
+ in the recipe name. Order items can be either a full
88
+ type suffix (e.g. "upload.jamf") or a partial token
89
+ (e.g. "upload", "auto_update"). Partial tokens are
90
+ matched against the dot-separated segments after the
91
+ first '.' so recipes like "Foo.epz.auto_update.jamf"
92
+ will match "auto_update". This can also be provided
93
+ via the 'AW_RECIPE_PROCESSING_ORDER' environment
94
+ variable as a comma-separated list (e.g.
95
+ "upload,self_service,auto_update"). For example, if
96
+ you have the following recipes to be processed:
97
+ ExampleApp.auto_install.jamf ExampleApp.upload.jamf
98
+ ExampleApp.self_service.jamf And you want to ensure
99
+ that the .upload recipes are always processed first,
100
+ followed by .auto_install, and finally .self_service,
101
+ you would provide the following processing order:
102
+ `--recipe-processing-order upload.jamf
103
+ auto_install.jamf self_service.jamf` This would ensure
104
+ that all .upload recipes are processed before any
105
+ other recipe types. Within each recipe type, the
106
+ recipes will be ordered alphabetically. We assume that
107
+ no extensions are provided (but will strip them if
108
+ needed - extensions that are stripped include .recipe
109
+ or .recipe.yaml).
110
+ --autopkg-bin AUTOPKG_BIN
111
+ Path to the autopkg binary (default:
112
+ /usr/local/bin/autopkg). Can also be set via
113
+ AW_AUTOPKG_BIN.
114
+ --dry-run Show planned actions without executing external
115
+ commands
116
+ --debug Enable debug logging when running script
117
+ --disable-recipe-trust-check
118
+ If this option is used, recipe trust verification will
119
+ not be run prior to a recipe run. This does not set
120
+ FAIL_RECIPES_WITHOUT_TRUST_INFO to No. You will need
121
+ to set that outside of this application.
122
+ --disable-git-commands
123
+ If this option is used, git commands won't be run
124
+ --concurrency CONCURRENCY
125
+ Number of recipes to run in parallel (default: 1)
126
+ --github-token GITHUB_TOKEN
127
+ --branch-name BRANCH_NAME
128
+ Branch name to be used recipe overrides have failed
129
+ their trust verification and need to be updated. By
130
+ default, this will be in the format of
131
+ "fix/update_trust_information/YYYY-MM-DDTHH-MM-SS"
132
+ --create-pr If enabled, autopkg_wrapper will open a PR for updated
133
+ trust information
134
+ --create-issues Create a GitHub issue for recipes that fail during
135
+ processing
136
+ --overrides-repo-path OVERRIDES_REPO_PATH
137
+ The path on disk to the git repository containing the
138
+ autopkg overrides directory. If none is provided, we
139
+ will try to determine it for you.
140
+ --post-processors [POST_PROCESSORS ...]
141
+ One or more autopkg post processors to run after each
142
+ recipe execution
143
+ --autopkg-prefs AUTOPKG_PREFS
144
+ Path to the autopkg preferences you'd like to use
145
+ --process-reports Process autopkg report directories or zip and emit
146
+ markdown summaries
147
+ --reports-zip REPORTS_ZIP
148
+ Path to an autopkg_report-*.zip to extract and process
149
+ --reports-extract-dir REPORTS_EXTRACT_DIR
150
+ Directory to extract the zip into (default:
151
+ autopkg_reports_summary/reports)
152
+ --reports-dir REPORTS_DIR
153
+ Directory of reports to process (if no zip provided)
154
+ --reports-out-dir REPORTS_OUT_DIR
155
+ Directory to write markdown outputs (default:
156
+ autopkg_reports_summary/summary)
157
+ --reports-run-date REPORTS_RUN_DATE
158
+ Run date string to include in the summary
159
+ --reports-strict Exit non-zero if any errors are detected in processed
160
+ reports
161
+ ```
162
+
163
+ <!-- CLI-PARAMS-END -->
164
+
165
+ ## Examples
166
+
167
+ Run recipes (serial):
168
+
169
+ ```bash
170
+ autopkg_wrapper --recipes Foo.download Bar.download
171
+ ```
172
+
173
+ Run 3 recipes concurrently and process reports afterward:
174
+
175
+ ```bash
176
+ autopkg_wrapper \
177
+ --recipe-file /path/to/recipe_list.txt \
178
+ --concurrency 3 \
179
+ --disable-git-commands \
180
+ --process-reports \
181
+ --reports-out-dir /tmp/autopkg_reports_summary \
182
+ --reports-strict
183
+ ```
184
+
185
+ Process a reports zip explicitly (no recipe run):
186
+
187
+ ```bash
188
+ autopkg_wrapper \
189
+ --process-reports \
190
+ --reports-zip /path/to/autopkg_report-2026-02-02.zip \
191
+ --reports-extract-dir /tmp/autopkg_reports \
192
+ --reports-out-dir /tmp/autopkg_reports_summary
193
+ ```
194
+
195
+ ## Recipe Processing Flow
196
+
197
+ ```mermaid
198
+ flowchart TD
199
+ start([Start]) --> args[Parse CLI args]
200
+ args --> load[Load recipes list]
201
+ load --> order{Processing order provided?}
202
+ order -- Yes --> batches[Build recipe batches by type]
203
+ order -- No --> all[Single batch of all recipes]
204
+ batches --> log[Log each batch type and identifiers]
205
+ all --> log
206
+ log --> run[Run batch recipes concurrently within batch]
207
+ run --> next{More batches?}
208
+ next -- Yes --> log
209
+ next -- No --> git[Apply git updates serially]
210
+ git --> notify[Send notifications]
211
+ notify --> pr{Create PR?}
212
+ pr -- Yes --> createPR[Open trust update PR]
213
+ pr -- No --> issues{Create issues?}
214
+ createPR --> issues
215
+ issues -- Yes --> createIssue[Open failures issue]
216
+ issues -- No --> reports{Process reports?}
217
+ createIssue --> reports
218
+ reports -- Yes --> process[Process reports output]
219
+ reports -- No --> done([Done])
220
+ process --> done
221
+ ```
222
+
223
+ Related code:
224
+
225
+ - `autopkg_wrapper/autopkg_wrapper.py`
226
+ - `autopkg_wrapper/utils/recipe_batching.py`
227
+ - `autopkg_wrapper/utils/recipe_ordering.py`
228
+ - `autopkg_wrapper/utils/report_processor.py`
229
+ - `autopkg_wrapper/notifier/slack.py`
230
+
231
+ Notes:
232
+
233
+ - During recipe runs, per‑recipe plist reports are written to `/private/tmp/autopkg`.
234
+ - Log output references full recipe identifiers (for example, `Foo.upload.jamf`) and batch logs list recipe identifiers grouped by type.
235
+ - When `--process-reports` is supplied without `--reports-zip` or `--reports-dir`, the tool processes `/private/tmp/autopkg`.
236
+ - If `AUTOPKG_JSS_URL`, `AUTOPKG_CLIENT_ID`, and `AUTOPKG_CLIENT_SECRET` are set, uploaded package rows are enriched with Jamf package links.
237
+ - No extra CLI flag is required; enrichment runs automatically when all three env vars are present.
238
+
239
+ An example folder structure and GitHub Actions Workflow is available within the [`actions-demo`](actions-demo)
240
+
241
+ ## Credits
242
+
243
+ - [`autopkg_tools` from Facebook](https://github.com/facebook/IT-CPE/tree/main/legacy/autopkg_tools)
244
+ - [`autopkg_tools` from Facebook, modified by Gusto](https://github.com/Gusto/it-cpe-opensource/tree/main/autopkg)
@@ -0,0 +1,17 @@
1
+ autopkg_wrapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ autopkg_wrapper/autopkg_wrapper.py,sha256=bb63BJMcWekfLiE-qeBqsa5C9_bSHo1QkxyOEAz_TD8,16186
3
+ autopkg_wrapper/models/recipe.py,sha256=yZOkYyTCd4D6fB7AGJrBETEK0-asf4YwJbhrs1gowlg,6471
4
+ autopkg_wrapper/notifier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ autopkg_wrapper/notifier/slack.py,sha256=O5Dc3ux7w258zTkfyDkjNbpfFLLCaCCoGUguOYfOETk,2056
6
+ autopkg_wrapper/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ autopkg_wrapper/utils/args.py,sha256=I3-Xgljv5gt-GHRUPbdlPGScgt1pcLgiMUXa8eIwjuU,8577
8
+ autopkg_wrapper/utils/git_functions.py,sha256=5egBB4itrEusGrANoL2_8F13diRAZSfBcnZrUxn6Z5M,4976
9
+ autopkg_wrapper/utils/logging.py,sha256=3knpMViO_zAU8WM5bSImQaz5M01vMFk_raB4lt1cbvo,324
10
+ autopkg_wrapper/utils/recipe_batching.py,sha256=ohZUPyr6IFD8j4m9VSASsLOFh_9Fs0_UkIo6MIR4fIQ,1722
11
+ autopkg_wrapper/utils/recipe_ordering.py,sha256=LWxbktRo_NlDNaW7NL63GJHSXGspYHDvu-2mP1JATFE,6190
12
+ autopkg_wrapper/utils/report_processor.py,sha256=SfF5Ybtzo5u5O_PwnejDkhDR4-BB1SngJDnKL69VeFY,28864
13
+ autopkg_wrapper-2026.2.9.dist-info/METADATA,sha256=xYq-R6pJdaPYqUnXp8SBP9UIfdUOTyluHJLS5pN9GdY,10867
14
+ autopkg_wrapper-2026.2.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
15
+ autopkg_wrapper-2026.2.9.dist-info/entry_points.txt,sha256=TVIcOt7OozzX1c00pwMGbBysaHg_v_N3mO3juoFqPpo,73
16
+ autopkg_wrapper-2026.2.9.dist-info/licenses/LICENSE,sha256=PpNOQjZGcsKFuA0wU16YU7PueVxqPX4OnyZ7TlLQlq4,1602
17
+ autopkg_wrapper-2026.2.9.dist-info/RECORD,,
@@ -1,107 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: autopkg-wrapper
3
- Version: 2026.2.6
4
- Summary: A package used to execute some autopkg functions, primarily within the context of a GitHub Actions runner.
5
- Project-URL: Repository, https://github.com/smithjw/autopkg-wrapper
6
- Author-email: James Smith <james@smithjw.me>
7
- License-Expression: BSD-3-Clause
8
- License-File: LICENSE
9
- Requires-Python: ~=3.14.0
10
- Requires-Dist: chardet
11
- Requires-Dist: idna
12
- Requires-Dist: jamf-pro-sdk
13
- Requires-Dist: pygithub
14
- Requires-Dist: requests
15
- Requires-Dist: ruamel-yaml
16
- Requires-Dist: toml
17
- Requires-Dist: urllib3
18
- Description-Content-Type: text/markdown
19
-
20
- # autopkg-wrapper
21
-
22
- `autopkg_wrapper` is a small package that can be used to run [`autopkg`](https://github.com/autopkg/autopkg) within CI/CD environments such as GitHub Actions.
23
-
24
- The easiest way to run it is by installing with pip.
25
-
26
- ```shell
27
- pip install autopkg-wrapper
28
- ```
29
-
30
- ## Command Line Parameters
31
-
32
- ```shell
33
- -h, --help Show this help message and exit
34
- --recipe-file RECIPE_FILE Path to a list of recipes to run (cannot be run with --recipes)
35
- --recipes [RECIPES ...] Recipes to run with autopkg (cannot be run with --recipe-file)
36
- --recipe-processing-order [RECIPE_PROCESSING_ORDER ...]
37
- Optional processing order for recipe "types" (suffix segments after the first '.'); supports partial tokens like upload/auto_update; env var AW_RECIPE_PROCESSING_ORDER expects comma-separated values
38
- --debug Enable debug logging when running script
39
- --disable-recipe-trust-check If this option is used, recipe trust verification will not be run prior to a recipe run.
40
- --github-token GITHUB_TOKEN A token used to publish a PR to your GitHub repo if overrides require their trust to be updated
41
- --branch-name BRANCH_NAME Branch name to be used where recipe overrides have failed their trust verification and need to be updated.
42
- By default, this will be in the format of "fix/update_trust_information/YYYY-MM-DDTHH-MM-SS"
43
- --create-pr If enabled, autopkg_wrapper will open a PR for updated trust information
44
- --create-issues Create a GitHub issue for recipes that fail during processing
45
- --disable-git-commands If this option is used, git commands won't be run
46
- --post-processors [POST_PROCESSORS ...]
47
- One or more autopkg post processors to run after each recipe execution
48
- --autopkg-prefs AW_AUTOPKG_PREFS_FILE
49
- Path to the autopkg preferences you'd like to use
50
- --overrides-repo-path AUTOPKG_OVERRIDES_REPO_PATH
51
- The path on disk to the git repository containing the autopkg overrides directory. If none is provided, we will try to determine it for you.
52
- --concurrency CONCURRENCY Number of recipes to run in parallel (default: 1)
53
- --process-reports Process autopkg report directories or zip and emit markdown summaries (runs after recipes complete)
54
- --reports-zip REPORTS_ZIP Path to an autopkg_report-*.zip to extract and process
55
- --reports-extract-dir REPORTS_EXTRACT_DIR
56
- Directory to extract the zip into (default: autopkg_reports_summary/reports)
57
- --reports-dir REPORTS_DIR Directory of reports to process (if no zip provided). Defaults to /private/tmp/autopkg when processing after a run
58
- --reports-out-dir REPORTS_OUT_DIR
59
- Directory to write markdown outputs (default: autopkg_reports_summary/summary)
60
- --reports-run-date REPORTS_RUN_DATE
61
- Run date string to include in the summary
62
- --reports-strict Exit non-zero if any errors are detected in processed reports
63
- ```
64
-
65
- ## Examples
66
-
67
- Run recipes (serial):
68
-
69
- ```bash
70
- autopkg_wrapper --recipes Foo.download Bar.download
71
- ```
72
-
73
- Run 3 recipes concurrently and process reports afterward:
74
-
75
- ```bash
76
- autopkg_wrapper \
77
- --recipe-file /path/to/recipe_list.txt \
78
- --concurrency 3 \
79
- --disable-git-commands \
80
- --process-reports \
81
- --reports-out-dir /tmp/autopkg_reports_summary \
82
- --reports-strict
83
- ```
84
-
85
- Process a reports zip explicitly (no recipe run):
86
-
87
- ```bash
88
- autopkg_wrapper \
89
- --process-reports \
90
- --reports-zip /path/to/autopkg_report-2026-02-02.zip \
91
- --reports-extract-dir /tmp/autopkg_reports \
92
- --reports-out-dir /tmp/autopkg_reports_summary
93
- ```
94
-
95
- Notes:
96
-
97
- - During recipe runs, per‑recipe plist reports are written to `/private/tmp/autopkg`.
98
- - When `--process-reports` is supplied without `--reports-zip` or `--reports-dir`, the tool processes `/private/tmp/autopkg`.
99
- - If `AUTOPKG_JSS_URL`, `AUTOPKG_CLIENT_ID`, and `AUTOPKG_CLIENT_SECRET` are set, uploaded package rows are enriched with Jamf package links.
100
- - No extra CLI flag is required; enrichment runs automatically when all three env vars are present.
101
-
102
- An example folder structure and GitHub Actions Workflow is available within the [`actions-demo`](actions-demo)
103
-
104
- ## Credits
105
-
106
- - [`autopkg_tools` from Facebook](https://github.com/facebook/IT-CPE/tree/main/legacy/autopkg_tools)
107
- - [`autopkg_tools` from Facebook, modified by Gusto](https://github.com/Gusto/it-cpe-opensource/tree/main/autopkg)
@@ -1,17 +0,0 @@
1
- autopkg_wrapper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- autopkg_wrapper/autopkg_wrapper.py,sha256=k4V-vEoCLUsUUNRxDh3VdWvxAsDIrYH5aSMMZ0HRlTY,12307
3
- autopkg_wrapper/models/recipe.py,sha256=xUENrhmCIXN8U86u8HwplSsoxP-vgznJZF_OfhGD9_Y,4891
4
- autopkg_wrapper/notifier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- autopkg_wrapper/notifier/slack.py,sha256=pUsjwpVfwDSn3c09O3UbdcNtfD98q2fXJ_rKPWvDw7E,1959
6
- autopkg_wrapper/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- autopkg_wrapper/utils/args.py,sha256=1uEdjTIuqQQcealiEqihZNAamSDLbU9qBzJ6M-tpsS4,8423
8
- autopkg_wrapper/utils/git_functions.py,sha256=e7wiUIW8Pu6m4oK0LlH7Vnrvp8XzknwTPYXz-Ekn40o,4893
9
- autopkg_wrapper/utils/logging.py,sha256=3knpMViO_zAU8WM5bSImQaz5M01vMFk_raB4lt1cbvo,324
10
- autopkg_wrapper/utils/recipe_batching.py,sha256=13Xw952cUryeymYMICA-ATAQiRdpv89Mn4HK17Mynoo,1051
11
- autopkg_wrapper/utils/recipe_ordering.py,sha256=v5yn8KAcvOnNuvAL93ZXwkCUlmNnTGo3oNIqpUAF2jk,5974
12
- autopkg_wrapper/utils/report_processor.py,sha256=TjSvW02Jq62JhsHNmt_JmZCuQwT_x5RfJNfVTmIePrY,22420
13
- autopkg_wrapper-2026.2.6.dist-info/METADATA,sha256=UlniYyeX0seVYUVeXb76mJbJaAcoICtBkKQfHNyVuoM,5223
14
- autopkg_wrapper-2026.2.6.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
15
- autopkg_wrapper-2026.2.6.dist-info/entry_points.txt,sha256=TVIcOt7OozzX1c00pwMGbBysaHg_v_N3mO3juoFqPpo,73
16
- autopkg_wrapper-2026.2.6.dist-info/licenses/LICENSE,sha256=PpNOQjZGcsKFuA0wU16YU7PueVxqPX4OnyZ7TlLQlq4,1602
17
- autopkg_wrapper-2026.2.6.dist-info/RECORD,,