This release introduces a subtle but important change to the behaviour of the processor, so I thought it worthy of an explanation here. For other changes in this release, please see the CHANGELOG.
Stop processing if no package upload required
MunkiImporter processor for AutoPkg checks if a package has changed since the last import, by comparing the package in the repository with the package in the AutoPkg cache. If they are different, the processor proceeds to upload the package and
pkginfo file. If the package is the same, the processor stops - no need to upload or rewrite the pkginfo.
Previous versions of the
JSSImporter processor had no such check. The package was always checked, and no upload would be carried out if a package of the same name exists on the Distribution Point, but the processor would continue to overwrite any policies, scripts, smart groups etc, regardless of the package check.
While this was not a problem for some workflows, it could get messy in others. For example, if a policy generated by AutoPkg has gone through a testing process and has been staged to production, the “untested” policy is most likely renamed, moved or deleted. A subsequent AutoPkg run will potentially recreate the “untested” policy that the administrator deleted, confusing other administrators into thinking there was something to test.
Many of us had manually solved this problem by creating our own
.jss recipes with a
StopProcessingIf processor added before the
JSSImporter processor, which would stop the process based on a test predicate, usually either that the download had not changed or the package was not recreated.
However, it made more sense to replicate the behaviour of the
MunkiImporter processor as closely as possible, to avoid everyone with this problem having to create their own recipes.
New ‘STOP_IF_NO_JSS_UPLOAD’ argument
Version 1.0.2b3 introduces the
STOP_IF_NO_JSS_UPLOAD argument to the
JSSImporter processor. This argument is set to
True by default, but can be overridden.
The new default behaviour is that if no package upload is deemed necessary, the process stops.
If you wish to override this behaviour one time, you can add the
--key STOP_IF_NO_JSS_UPLOAD=False to your AutoPkg command, such as:
autopkg run Slack.jss --key STOP_IF_NO_JSS_UPLOAD=False
This will cause the processor to proceed even if no package is uploaded.
Note that this does not cause the package to upload again - currently the only way to do that is to manually delete the package from the repo.
If you wish for the processor to always proceed for a particular recipe, you can alternatively add the
STOP_IF_NO_JSS_UPLOAD argument to your recipe override, like so: