Skip to main content
Question

Announcement - JSS add-on for autopkg hits beta, ready for testers

  • January 6, 2014
  • 32 replies
  • 184 views

Show first post

32 replies

loceee
Forum|alt.badge.img+10
  • Contributor
  • June 26, 2014

I haven't said it here... so I will. Love it! When I have some time I will (attempt to) hack something to make it pop out patchoo ready smart groups and policies.


loceee
Forum|alt.badge.img+10
  • Contributor
  • June 26, 2014
TheScriptFormallyKnownAsJunkie

Like that too... next version may just be called a symbol :)


Forum|alt.badge.img+10
  • New Contributor
  • July 23, 2014

@loceee][/url
So I've been playing with Patchoo! and the JSSImporter for AutoPkg recently and they are both awesome!

What would be really awesome is to get the JSSImporter to work with Patchoo!
I've had a bit of a play around with editing the JSSImporter.py file.
What i've got so far is up on my GitHub here
https://github.com/hunty1/jss-autopkg-addon/blob/master/JSSImporter.py

Essentially this now creates the correct smart group criteria and required policy for Patchoo to do its thing.
Its not setup very nice and was just a quick way draft to see how hard it would be to do. Im no python scripter by any means but Im going to try to do a bit more work to make it play nice with dev and production categories so that automatically downloaded packages don't go straight out to production and instead go to a dev group and then have to be enabled before they actually go out to them.


loceee
Forum|alt.badge.img+10
  • Contributor
  • July 23, 2014

@calumhunter !

Excited to try it out! I just haven't had any capacity to look at this, so thanks heaps! Having the new pkgs land in dev will be totally bad ass!


Forum|alt.badge.img+10
  • New Contributor
  • July 23, 2014

Boom bad ass status achieved. Was a lot easier than I thought it would be.

https://github.com/hunty1/jss-autopkg-addon/blob/master/JSSImporter.py


Forum|alt.badge.img+10
  • New Contributor
  • July 24, 2014

So I just setup Jenkins with this now as well. Oh my gosh.

EDIT

Ahhh.. Ok slight issue.
Running the recipe (Firefox.jss) once works great, creates everything as it should. But running it a second time, it fails when it tries to check if the smart group is created in the JSS.
It seems to be to do with the name of the smart group in the recipe now not matching what I have changed it to in the JSSImporter.

The recipe is saying to use a smart group name of LessThanMostRecent_%NAME%
but the JSSImporter is creating update%PROD_NAME%-%version%

I've created an override for the recipe, and changed the smart group name to update%NAME%-31.0 this runs fine.

So how would I go about getting the version variable into the recipe? is this possible?


Forum|alt.badge.img+10
  • New Contributor
  • July 25, 2014

For those following along at home.
The version variable is defined by a processor which runs after the recipe, so can't be evaluated in the recipe.
Solution - lets not try to create the name of the smart group in the recipe. instead lets create the smart group name variable in the JSSImporter which is able to evaluate the version variable.

I'm just not sure how to do that yet