Skip to content

Commit

Permalink
Updating YAML Recipes for multi-arch apps
Browse files Browse the repository at this point in the history
  • Loading branch information
smithjw committed Nov 26, 2021
1 parent f825045 commit 32bcf57
Show file tree
Hide file tree
Showing 21 changed files with 182 additions and 103 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.pythonPath": "/Library/AutoPkg/Python3/Python.framework/Versions/3.7/bin/python3.7"
}
8 changes: 5 additions & 3 deletions Cisco/Webex.jamf.recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Comment: GROUP_CRITERIA should be either 'arm64' or 'x86_64'
Description: Downloads the latest version and makes a pkg. Then, uploads the package to the Jamf Pro Server and creates a Self Service Policy and Smart Group.
Identifier: com.github.smithjw.jamf.webex
ParentRecipe: com.github.smithjw.sign.webex
Expand All @@ -6,8 +7,9 @@ MinimumVersion: '2.3'
Input:
NAME: Webex
CATEGORY: Collaboration
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_CRITERIA: 'x86_64'
GROUP_NAME: 'Architecture - %ARCHITECTURE%'
GROUP_TEMPLATE: 'SmartGroup-architecture-smart.xml'
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
Expand Down Expand Up @@ -43,4 +45,4 @@ Process:
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
icon: '%SELF_SERVICE_ICON%'
13 changes: 8 additions & 5 deletions Docker/Docker.jamf.recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
Comment: GROUP_CRITERIA should be either 'arm64' or 'x86_64'
Description: Downloads the latest version and makes a pkg. Then, uploads the package to the Jamf Pro Server and creates a Self Service Policy and Smart Group.
Identifier: com.github.smithjw.jamf.Docker
MinimumVersion: '2.3'
ParentRecipe: com.github.smithjw.sign.Docker
MinimumVersion: '2.3'

Input:
NAME: Docker
CATEGORY: Utilities
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_CRITERIA: 'x86_64'
GROUP_NAME: 'Architecture - %ARCHITECTURE%'
GROUP_TEMPLATE: 'SmartGroup-architecture-smart.xml'
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
POLICY_NAME: 'Install Latest %NAME% (%ARCHITECTURE%)'
POLICY_RUN_COMMAND: 'chown -R "$(stat -f%Su /dev/console):staff" "/Applications/%NAME%.app" && echo "Corrected permissions for %NAME%."'
SELF_SERVICE_DISPLAY_NAME: 'Install Latest %NAME% (%ARCHITECTURE%)'
SELF_SERVICE_DISPLAY_NAME: 'Install Latest %NAME%'
SELF_SERVICE_DESCRIPTION: 'Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries - anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.'
SELF_SERVICE_ICON: '%NAME%.png'
SOFTWARE_TITLE: '%NAME%'
INSTALL_BUTTON_TEXT: 'Install'
REINSTALL_BUTTON_TEXT: 'Install'
UPDATE_PREDICATE: 'pkg_uploaded == False'
Expand All @@ -40,4 +43,4 @@ Process:
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
icon: '%SELF_SERVICE_ICON%'
70 changes: 36 additions & 34 deletions GitHub/GitHub_Desktop.jamf.recipe.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
Comment: GROUP_CRITERIA should be either 'arm64' or 'x86_64'
Description: Downloads the latest version and makes a pkg. Then, uploads the package to the Jamf Pro Server and creates a Self Service Policy and Smart Group.
Identifier: com.github.smithjw.jamf.github_desktop
ParentRecipe: com.github.smithjw.sign.github_desktop
MinimumVersion: '2.3'

Input:
NAME: GitHub Desktop
CATEGORY: Collaboration
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
POLICY_NAME: 'Install Latest %NAME% (%ARCHITECTURE%)'
POLICY_RUN_COMMAND: 'chown -R "$(stat -f%Su /dev/console):staff" "/Applications/%NAME%.app" && echo "Corrected permissions for %NAME%."'
SELF_SERVICE_DISPLAY_NAME: '%POLICY_NAME%'
SELF_SERVICE_DESCRIPTION: "Focus on what matters instead of fighting with Git. Whether you're new to Git or a seasoned user, GitHub Desktop simplifies your development workflow."
SELF_SERVICE_ICON: '%SOFTWARE_TITLE%.png'
SOFTWARE_TITLE: 'GitHub_Desktop'
INSTALL_BUTTON_TEXT: 'Install'
REINSTALL_BUTTON_TEXT: 'Install'
UPDATE_PREDICATE: 'pkg_uploaded == False'
NAME: GitHub Desktop
CATEGORY: Collaboration
GROUP_CRITERIA: 'x86_64'
GROUP_NAME: 'Architecture - %ARCHITECTURE%'
GROUP_TEMPLATE: SmartGroup-update-smart.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
POLICY_NAME: 'Install Latest %NAME% (%ARCHITECTURE%)'
POLICY_RUN_COMMAND: 'chown -R "$(stat -f%Su /dev/console):staff" "/Applications/%NAME%.app" && echo "Corrected permissions for %NAME%."'
SELF_SERVICE_DISPLAY_NAME: 'Install Latest %NAME%'
SELF_SERVICE_DESCRIPTION: "Focus on what matters instead of fighting with Git. Whether you're new to Git or a seasoned user, GitHub Desktop simplifies your development workflow."
SELF_SERVICE_ICON: '%SOFTWARE_TITLE%.png'
SOFTWARE_TITLE: 'GitHub_Desktop'
INSTALL_BUTTON_TEXT: 'Install'
REINSTALL_BUTTON_TEXT: 'Install'
UPDATE_PREDICATE: 'pkg_uploaded == False'

Process:
- Processor: com.github.grahampugh.jamf-upload.processors/JamfCategoryUploader
Arguments:
category_name: '%CATEGORY%'
- Processor: com.github.grahampugh.jamf-upload.processors/JamfCategoryUploader
Arguments:
category_name: '%CATEGORY%'

- Processor: com.github.grahampugh.jamf-upload.processors/JamfPackageUploader
Arguments:
pkg_category: '%CATEGORY%'
- Processor: com.github.grahampugh.jamf-upload.processors/JamfPackageUploader
Arguments:
pkg_category: '%CATEGORY%'

- Processor: StopProcessingIf
Arguments:
predicate: '%UPDATE_PREDICATE%'
- Processor: StopProcessingIf
Arguments:
predicate: '%UPDATE_PREDICATE%'

- Processor: com.github.grahampugh.jamf-upload.processors/JamfComputerGroupUploader
Arguments:
computergroup_template: '%GROUP_TEMPLATE%'
computergroup_name: '%GROUP_NAME%'
- Processor: com.github.grahampugh.jamf-upload.processors/JamfComputerGroupUploader
Arguments:
computergroup_template: '%GROUP_TEMPLATE%'
computergroup_name: '%GROUP_NAME%'

- Processor: com.github.grahampugh.jamf-upload.processors/JamfPolicyUploader
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
- Processor: com.github.grahampugh.jamf-upload.processors/JamfPolicyUploader
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
4 changes: 2 additions & 2 deletions Jabra/Jabra_Direct.jamf.recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Input:
NAME: Jabra Direct
CATEGORY: Utilities
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_TEMPLATE: SmartGroup-update-smart.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
Expand Down Expand Up @@ -43,4 +43,4 @@ Process:
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
icon: '%SELF_SERVICE_ICON%'
4 changes: 2 additions & 2 deletions Logitech/Logi_Options.jamf.recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Input:
NAME: Logi Options
CATEGORY: Collaboration
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_TEMPLATE: SmartGroup-update-smart.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
Expand Down Expand Up @@ -43,4 +43,4 @@ Process:
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
icon: '%SELF_SERVICE_ICON%'
4 changes: 2 additions & 2 deletions Microsoft/Microsoft_Company_Portal.jamf.recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Input:
NAME: Microsoft Company Portal
CATEGORY: Collaboration
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_TEMPLATE: SmartGroup-update-smart.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
Expand Down Expand Up @@ -43,4 +43,4 @@ Process:
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
icon: '%SELF_SERVICE_ICON%'
4 changes: 2 additions & 2 deletions Microsoft/Microsoft_Defender.jamf.recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Input:
NAME: Microsoft Defender
CATEGORY: Compliance
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_TEMPLATE: SmartGroup-update-smart.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
Expand Down Expand Up @@ -43,4 +43,4 @@ Process:
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
icon: '%SELF_SERVICE_ICON%'
4 changes: 2 additions & 2 deletions Microsoft/Microsoft_Edge.jamf.recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Input:
NAME: Microsoft Edge
CATEGORY: Collaboration
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_TEMPLATE: SmartGroup-update-smart.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
Expand Down Expand Up @@ -43,4 +43,4 @@ Process:
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
icon: '%SELF_SERVICE_ICON%'
7 changes: 4 additions & 3 deletions Microsoft/Microsoft_Teams.jamf.recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ Input:
NAME: Microsoft Teams
CATEGORY: Collaboration
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_TEMPLATE: SmartGroup-update-smart.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
POLICY_NAME: 'Install Latest %NAME%'
POLICY_RUN_COMMAND: 'chown -R "$(stat -f%Su /dev/console):staff" "/Applications/%NAME%.app" && echo "Corrected permissions for %NAME%."'
SELF_SERVICE_DISPLAY_NAME: 'Install Latest %NAME%'
SELF_SERVICE_DESCRIPTION: Microsoft Teams is a unified communications platform that
SELF_SERVICE_DESCRIPTION:
Microsoft Teams is a unified communications platform that
combines persistent workplace chat, video meetings, file storage, and application
integration. The service integrates with an Office 365 subscription office productivity
suite and features extensions that can integrate with non-Microsoft products.
Expand Down Expand Up @@ -46,4 +47,4 @@ Process:
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
icon: '%SELF_SERVICE_ICON%'
4 changes: 2 additions & 2 deletions Poly/Plantronics_Hub.jamf.recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Input:
NAME: Plantronics Hub
CATEGORY: Utilities
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_TEMPLATE: SmartGroup-update-smart.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
Expand Down Expand Up @@ -43,4 +43,4 @@ Process:
Arguments:
policy_template: '%POLICY_TEMPLATE%'
policy_name: '%POLICY_NAME%'
icon: '%SELF_SERVICE_ICON%'
icon: '%SELF_SERVICE_ICON%'
2 changes: 1 addition & 1 deletion Slack/Slack.jamf.recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Input:
NAME: Slack
CATEGORY: Collaboration
GROUP_NAME: '%NAME%-update-smart'
GROUP_TEMPLATE: SmartGroup-update-smart-regex.xml
GROUP_TEMPLATE: SmartGroup-update-smart.xml
TESTING_GROUP_NAME: Testing
POLICY_CATEGORY: Testing
POLICY_TEMPLATE: Policy-install-latest.xml
Expand Down
14 changes: 14 additions & 0 deletions SmartGroup-architecture-smart.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<computer_group>
<name>%GROUP_NAME%</name>
<is_smart>True</is_smart>
<criteria>
<criterion>
<name>Architecture Type</name>
<priority>0</priority>
<and_or>and</and_or>
<search_type>is</search_type>
<value>%GROUP_CRITERIA%</value>
</criterion>
</criteria>
</computer_group>
34 changes: 34 additions & 0 deletions Wireshark/Wireshark.download.recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Comment: |
Modify the ARCHITECTURE key and DOWNLOAD_TYPE to determine whether the Intel (x64) or Apple Silicon (arm64) version
of Wireshark is downloaded. Defaults to Intel if not overridden.
Wireshark uses Arm & Intel to distinguish downloads
eg "--key ARCHITECTURE=arm64 --key DOWNLOAD_TYPE=Arm"
Description: Downloads the latest version of Wireshark.
Identifier: com.github.smithjw.download.wireshark
MinimumVersion: '2.3'

Input:
NAME: Wireshark
ARCHITECTURE: x64
DOWNLOAD_TYPE: Intel

Process:
- Processor: URLTextSearcher
Arguments:
re_pattern: (Wireshark([%]20)*.*([%]20)*%DOWNLOAD_TYPE%([%]20)*64.dmg)
request_headers:
User-Agent: Safari 8.0.2
result_output_var_name: match
url: https://www.wireshark.org/download.html

- Processor: URLDownloader
Arguments:
filename: '%NAME%-%ARCHITECTURE%.dmg'
url: https://www.wireshark.org/download/osx/%match%

- Processor: EndOfCheckPhase

- Processor: CodeSignatureVerifier
Arguments:
input_path: '%pathname%/Wireshark*.app'
requirement: anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "7Z6EMTD2C6"
Loading

0 comments on commit 32bcf57

Please sign in to comment.