

- #BLOCKBLOCK AUTOPKG RECIPE HOW TO#
- #BLOCKBLOCK AUTOPKG RECIPE FOR MAC#
- #BLOCKBLOCK AUTOPKG RECIPE INSTALL#
- #BLOCKBLOCK AUTOPKG RECIPE SOFTWARE#
(Only if the pre-commit hook is running on a Mac with AutoPkg installed) Processor arguments should be limited to the input variables defined in the processor code. This applies to processors like CURLDownloader (which has been consolidated back into URLDownloader) and URLGetter (which should be used by other processors instead of being called directly). Using %NAME% instead of the actual app’s name will needlessly break processes like CodeSignatureVerifier and Versioner if the NAME is customized.ĭeprecated processors and superclass processors should not be used.
#BLOCKBLOCK AUTOPKG RECIPE SOFTWARE#
AutoPkg users sometimes override the NAME input variable of a recipe to customize how the software will be referenced in a Munki repo or a Jamf policy. %NAME% should not be used in place of an app path in processor arguments. Omitting this processor may cause your recipe to take more actions than AutoPkg users expect it to in that mode. EndOfCheckPhase is conventionally used to signal where to stop when running AutoPkg in -check mode. Recipes that use a downloader processor must also have an EndOfCheckPhase processor. In the Process array, Arguments are optional, but the Processor string is not. Recipe processors must have a Processor key. Repos: - repo: rev: v1.10.1 hooks: - id: check-autopkg-recipes args: The default prefix is com.github., but you can customize this hook by providing your own prefix in the hook arguments in your. followed by the GitHub username of the author, followed by the recipe type and name of the software. For most recipes in the public AutoPkg GitHub organization, the identifier starts with com.github. The recipe’s Identifier must start with the specified prefix. The hook ensures that the identifier is unique (within your repository) and that the identifier isn’t the same as the ParentRecipe (which would cause a loop). AutoPkg uses this identifier to reference recipes and construct parent/child relationships between recipes. The recipe must contain a unique Identifier key at the top level. This hook will catch basic syntax or formatting errors in your recipes, which can be particularly undesirable in public repositories. The recipe must be a valid plist or YAML file. Repos: - repo: rev: v1.10.1 hooks: - id: check-autopkg-recipesĪs of this writing, the list of checks includes:
#BLOCKBLOCK AUTOPKG RECIPE INSTALL#
If you haven’t already, install pre-commit. To review, here’s how you’d start using pre-commit in a repository: I’ve started off with a few AutoPkg, Munki, Jamf, and packaging related hooks, and I’m sure I’ll add more over time. So I wrote my own repository of Mac admin pre-commit hooks.

#BLOCKBLOCK AUTOPKG RECIPE FOR MAC#
Pre-Commit Hooks for Mac AdminsĪlthough there are many pre-commit hooks available, I needed something that would understand and parse various file formats and conventions used by Mac admins. Recipe authors with repositories in the AutoPkg GitHub organization will find this especially useful (since their recipes are under a bit more scrutiny), but the same principles apply equally to private repositories or repositories hosted somewhere other than GitHub. In this one I’ll provide some more specific recommendations for Mac admins who maintain a repository of AutoPkg recipes.Īll you need is a Git repo that contains AutoPkg recipes.
#BLOCKBLOCK AUTOPKG RECIPE HOW TO#
In a previous post, I showed you how to set up pre-commit to perform some basic checks on your Git repo before each commit.
