Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JamfComputerGroupUploader Error Finding Template #70

Open
cgolebio opened this issue Aug 31, 2022 · 1 comment
Open

JamfComputerGroupUploader Error Finding Template #70

cgolebio opened this issue Aug 31, 2022 · 1 comment
Labels
invalid This doesn't seem right question Further information is requested by the person who opened the issue

Comments

@cgolebio
Copy link

I have a local repo with the following structure
Main
-> JAMF_PreProduction_Policies
-->SomeRecipe.jamf.recipe.yaml
-> Templates
--> JAMF-StaticGroup.xml

So basically the at the root, I have two directories, one with all the recipes, and another with templates. In an earlier release of this processor, everything was working fine. I recently updated and now getting where it cannot find the template xml. Here is an output of the error

JamfComputerGroupUploader: Matching dir: /Users/autopkg/Library/AutoPkg/RecipeOverrides
JamfComputerGroupUploader: Looking for JAMF-StaticGroup.xml in /Users/autopkg/Library/AutoPkg/RecipeOverrides
JamfComputerGroupUploader: Matching dir: /Users/autopkg/Library/AutoPkg/RecipeOverrides
JamfComputerGroupUploader: Parent Recipe: /Volumes/DataVolume01/Autopkg/LocalRecipes/JAMF_PreProduction_Policies/SomeRecipe.jamf.recipe.yaml
JamfComputerGroupUploader: Matching dir: /Volumes/DataVolume01/Autopkg/LocalRecipes/JAMF_PreProduction_Policies
JamfComputerGroupUploader: Matching dir: /Volumes/DataVolume01/Autopkg/LocalRecipes/JAMF_PreProduction_Policies
JamfComputerGroupUploader: Matching dir: /Volumes/DataVolume01/Autopkg/LocalRecipes/JAMF_PreProduction_Policies
Traceback (most recent call last):
  File "/Library/AutoPkg/autopkglib/__init__.py", line 840, in process
    self.env = processor.process()
  File "/Library/AutoPkg/autopkglib/__init__.py", line 626, in process
    self.main()
  File "/Volumes/DataVolume01/Autopkg/RecipeRepo/com.github.autopkg.grahampugh-recipes/JamfUploaderProcessors/JamfComputerGroupUploader.py", line 170, in main
    raise ProcessorError(
autopkglib.ProcessorError: ERROR: Computer Group file JAMF-StaticGroup.xml not found
  File "/Library/AutoPkg/autopkglib/__init__.py", line 840, in process
    self.env = processor.process()
ERROR: Computer Group file JAMF-StaticGroup.xml not found
Failed.

What I figured out is that I needed to add to the search directories the current directory I was operating in. Even though my search directories is set with a '.', the processor was not searching it.

At least this could be documented or another condition can be added to search within the current directory IF there is a '.' in the existing REPO_SEARCH_DIR array.

@grahampugh
Copy link
Owner

Sorry, I don't quite understand I needed to add to the search directories the current directory I was operating in. Even though my search directories is set with a '.', the processor was not searching it.

The search locations are described in the wiki:
https://github.com/grahampugh/jamf-upload/wiki/JamfUploader-Templates#where-to-store-templates

It looks like you are using a local folder rather than a repo. That's probably why you have had to add that directory into the RECIPE_SEARCH_DIRS just as you would any real repo.

@grahampugh grahampugh added invalid This doesn't seem right question Further information is requested by the person who opened the issue labels Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right question Further information is requested by the person who opened the issue
Projects
None yet
Development

No branches or pull requests

2 participants