Skip to content

Commit

Permalink
JSS recipe fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
macmule committed May 27, 2017
1 parent 68852d2 commit 0966fd9
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 45 deletions.
19 changes: 0 additions & 19 deletions Adobe/CFBundleVersionExtensionAttribute.xml

This file was deleted.

50 changes: 45 additions & 5 deletions Adobe/CreativeCloudApp.jss.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@
<string>%NAME%-update-smart</string>
<key>GROUP_TEMPLATE</key>
<string>SmartGroupTemplate.xml</string>
<key>NAME</key>
<string>%display_name%</string>
<key>POLICY_CATEGORY</key>
<string>Testing</string>
<key>POLICY_TEMPLATE</key>
<string>PolicyTemplate.xml</string>
<key>UNINSTALL_CATEGORY</key>
<string>Uninstallers</string>
<key>UNINSTALL_GROUP_NAME</key>
<string>%NAME%-uninstall</string>
<key>UNINSTALL_GROUP_TEMPLATE</key>
<string>UninstallSmartGroupTemplate.xml</string>
<key>UNINSTALL_POLICY_CATEGORY</key>
<string>Testing</string>
<key>UNINSTALL_POLICY_TEMPLATE</key>
<string>UninstallPolicyTemplate.xml</string>
<key>SELF_SERVICE_ICON</key>
<string></string>
</dict>
Expand All @@ -45,16 +53,48 @@
<string>%GROUP_TEMPLATE%</string>
</dict>
</array>
<key>package_notes</key>
<string>%package_info_text%</string>
<key>jss_inventory_name</key>
<string>%jss_inventory_name%</string>
<key>policy_category</key>
<string>%POLICY_CATEGORY%</string>
<key>policy_template</key>
<string>%POLICY_TEMPLATE%</string>
<key>prod_name</key>
<string>%NAME%</string>
<key>self_service_description</key>
<string>%release_notes%</string>
<string>%package_info_text%</string>
<key>self_service_icon</key>
<string>%icon_path%</string>
</dict>
<key>Processor</key>
<string>JSSImporter</string>
</dict>
<dict>
<key>Arguments</key>
<dict>
<key>category</key>
<string>%UNINSTALL_CATEGORY%</string>
<key>groups</key>
<array>
<dict>
<key>name</key>
<string>%UNINSTALL_GROUP_NAME%</string>
<key>smart</key>
<true/>
<key>template_path</key>
<string>%UNINSTALL_GROUP_TEMPLATE%</string>
</dict>
</array>
<key>jss_inventory_name</key>
<string>%jss_inventory_name%</string>
<key>pkg_path</key>
<string>%uninstaller_pkg_path%</string>
<key>policy_category</key>
<string>%UNINSTALL_POLICY_CATEGORY%</string>
<key>policy_template</key>
<string>%UNINSTALL_POLICY_TEMPLATE%</string>
<key>prod_name</key>
<string>%NAME%</string>
<key>self_service_icon</key>
<string>%icon_path%</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Adobe/CreativeCloudApp.pkg.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Other Input values here correspond to options provided in the CCP UI.</string>
<key>Arguments</key>
<dict>
<key>package_name</key>
<string>%NAME%</string>
<string>%NAME%-%version%</string>
</dict>
</dict>
<dict>
Expand Down
4 changes: 2 additions & 2 deletions Adobe/CreativeCloudPackager.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def automation_xml(self):
# add additional parameters for which there's no need for the user to
# supply in the 'ccpinfo' input
params.update({
'packageName': self.env['NAME'],
'packageName': self.env['package_name'],
'outputLocation': self.env['RECIPE_CACHE_DIR'],
'packaging_job_id': str(uuid.uuid4()),
'IncludeUpdates': False,
Expand Down Expand Up @@ -303,7 +303,7 @@ def main(self):
xml_data = self.automation_xml()
# using .xml as a suffix because CCP's automation mode creates a '<input>_results.xml' file with the assumption
# that the input ends in '.xml'
xml_path = os.path.join(xml_workdir, 'ccp_automation_%s.xml' % self.env['NAME'])
xml_path = os.path.join(xml_workdir, 'ccp_automation_%s.xml' % self.env['package_name'])
with open(xml_path, 'w') as fd:
fd.write(xml_data)

Expand Down
15 changes: 7 additions & 8 deletions Adobe/CreativeCloudVersioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ class CreativeCloudVersioner(Processor):
"required": True,
"description": "Path to the built bundle-style CCP uninstaller pkg.",
},
"display_name": {
"required": True,
"description": "The product full name and major version"
},
"minimum_os_version": {
"required": True,
"description": "The minimum operating system version required to install this package"
Expand All @@ -63,6 +59,9 @@ class CreativeCloudVersioner(Processor):
"description":
"Some pkginfo fields extracted from the Adobe metadata.",
},
"jss_inventory_name": {
"description": "Application title for jamf pro smart group criteria.",
},
"package_info_text": {
"description": "Text notes about which packages and updates are included in the pkg."
},
Expand Down Expand Up @@ -138,7 +137,7 @@ def process_apro_installer(self):
# self.output("app_identifier: %s" % app_identifier)

# Now we have the deets, let"s use them
self.create_pkginfo(app_version, installed_path)
self.create_pkginfo(app_bundle, app_version, installed_path)


def process_hd_installer(self):
Expand Down Expand Up @@ -202,14 +201,14 @@ def process_hd_installer(self):
continue

# Now we have the deets, let"s use them
self.create_pkginfo(app_version, installed_path)
self.create_pkginfo(app_bundle, app_version, installed_path)


def create_pkginfo(self, app_version, installed_path):
def create_pkginfo(self, app_bundle, app_version, installed_path):
''' Create pkginfo will found details '''
pkginfo = {}
self.env["version"] = app_version
self.env["prod_name"] = self.env["display_name"]
self.env["jss_inventory_name"] = app_bundle
pkginfo["version"] = self.env["version"]
pkginfo["display_name"] = self.env["display_name"]
pkginfo["minimum_os_version"] = self.env["minimum_os_version"]
Expand Down
10 changes: 0 additions & 10 deletions Adobe/ScriptTemplate.xml

This file was deleted.

27 changes: 27 additions & 0 deletions Adobe/UninstallPolicyTemplate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<policy>
<general>
<name>Uninstall Latest %PROD_NAME%</name>
<enabled>true</enabled>
<frequency>Ongoing</frequency>
<category>
<name>%POLICY_CATEGORY%</name>
</category>
</general>
<scope>
<!--Scope added by JSSImporter-->
</scope>
<package_configuration>
<!--Package added by JSSImporter-->
</package_configuration>
<scripts>
<!--Scripts added by JSSImporter-->
</scripts>
<self_service>
<use_for_self_service>true</use_for_self_service>
<install_button_text>Uninstall %VERSION%</install_button_text>
<self_service_description>%SELF_SERVICE_DESCRIPTION%</self_service_description>
</self_service>
<maintenance>
<recon>true</recon>
</maintenance>
</policy>
27 changes: 27 additions & 0 deletions Adobe/UninstallSmartGroupTemplate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<computer_group>
<name>%group_name%</name>
<is_smart>true</is_smart>
<criteria>
<criterion>
<name>Application Title</name>
<priority>0</priority>
<and_or>and</and_or>
<search_type>is</search_type>
<value>%JSS_INVENTORY_NAME%</value>
</criterion>
<criterion>
<name>Application Version</name>
<priority>1</priority>
<and_or>and</and_or>
<search_type>is</search_type>
<value>%VERSION%</value>
</criterion>
<criterion>
<name>Computer Group</name>
<priority>2</priority>
<and_or>and</and_or>
<search_type>member of</search_type>
<value>Testing</value>
</criterion>
</criteria>
</computer_group>

0 comments on commit 0966fd9

Please sign in to comment.