This PR adds a pre-commit configuration tailored to AutoPkg recipes, and this repository specifically. It also includes the fixes to recipes needed to pass the initial checks, with two exceptions:
Docker/Docker.munki.recipe.yaml: Adjustments omitted in order not to conflict with other open PRs that fix that recipe.
Xcode/Xcode.pkg.recipe.yaml: This recipe has been excluded from checks, as its result (creation of a dmg) doesn't perfectly align with a conventional recipe type.
Here's an example of what pre-commit will produce once this PR is merged, when errors or warnings exist:
% pre-commit run --all-files
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...............................................................Passed
check xml................................................................Passed
check for added large files..............................................Passed
Check AutoPkg Recipes....................................................Failed
- hook id: check-autopkg-recipes
- exit code: 1
Luxafor/Luxafor.download.recipe: Contains a download processor, but no EndOfCheckPhase processor.
Luxafor/Luxafor.download.recipe: URLTextSearcher processor requires minimum AutoPkg version 0.2.9
Xcode/Xcode.jamf.recipe.yaml: WARNING: JamfUploader processors are not in the recommended order: JamfCategoryUploader, JamfPackageUploader, JamfScriptUploader, JamfComputerGroupUploader, JamfPolicyUploader.
Little Snitch/Little Snitch 5.download.recipe: CodeSignatureVerifier processor requires minimum AutoPkg version 0.3.1
Little Snitch/Little Snitch 5.download.recipe: URLTextSearcher processor requires minimum AutoPkg version 0.2.9
Microsoft/Azure_Data_Studio.jamf.recipe.yaml: Processor EndOfCheckPhase is not conventional for this recipe type.
Zoom/ZoomOutlook.download.recipe: CodeSignatureVerifier processor requires minimum AutoPkg version 0.3.1
Zoom/ZoomClientSharing.download.recipe: CodeSignatureVerifier processor requires minimum AutoPkg version 0.3.1
JetBrains/RubyMine.pkg.recipe: FileMover processor requires minimum AutoPkg version 0.2.9
Zoom/ZoomMeetings.download.recipe: CodeSignatureVerifier processor requires minimum AutoPkg version 0.3.1
Xray Exploratory App/Xray_Exploratory_App.download.recipe.yaml: EndOfCheckPhase typically goes after a download processor, not before.
Little Snitch/Little Snitch.download.recipe: URLTextSearcher processor requires minimum AutoPkg version 0.2.9
Docker/Docker.munki.recipe.yaml: pkginfo key supported_architectures should be type <class 'list'>, not type <class 'str'>
Zoom/ZoomIT.download.recipe: CodeSignatureVerifier processor requires minimum AutoPkg version 0.3.1
GitHub/GitHub_Desktop.download.recipe.yaml: Contains a download processor, but no EndOfCheckPhase processor.
Apple/Enable_macOS_Beta.jamf.recipe.yaml: WARNING: JamfUploader processors are not in the recommended order: JamfCategoryUploader, JamfExtensionAttributeUploader, JamfScriptUploader, JamfComputerGroupUploader, JamfPolicyUploader.
Luxafor/Luxafor.pkg.recipe: PlistReader processor requires minimum AutoPkg version 0.2.5
Viscosity/Viscosity.pkg.recipe: FileMover processor requires minimum AutoPkg version 0.2.9
Zoom/ZoomRooms.download.recipe: CodeSignatureVerifier processor requires minimum AutoPkg version 0.3.1
Forbid AutoPkg Overrides.................................................Passed
Forbid AutoPkg Trust Info................................................Passed
Here's an example of all tests passing successfully:
% pre-commit run --all-files
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...............................................................Passed
check xml................................................................Passed
check for added large files..............................................Passed
Check AutoPkg Recipes....................................................Passed
Forbid AutoPkg Overrides.................................................Passed
Forbid AutoPkg Trust Info................................................Passed
This PR adds a pre-commit configuration tailored to AutoPkg recipes, and this repository specifically. It also includes the fixes to recipes needed to pass the initial checks, with two exceptions:
Here's an example of what pre-commit will produce once this PR is merged, when errors or warnings exist:
Here's an example of all tests passing successfully:
Some more details and examples in this quick talk from MacDevOpsYVR: https://www.youtube.com/watch?v=1UCyGC6DVOU