diff --git a/DataDog/DataDogAgent-Win-Install_Update.bes.mustache b/DataDog/DataDogAgent-Win-Install_Update.bes.mustache new file mode 100644 index 0000000..a640ae3 --- /dev/null +++ b/DataDog/DataDogAgent-Win-Install_Update.bes.mustache @@ -0,0 +1,56 @@ + + + <{{TypeTaskOrFixlet}}{{^TypeTaskOrFixlet}}Task{{/TypeTaskOrFixlet}}> + {{^patch}}Install/{{/patch}}Update: {{DisplayName}} v{{version}} - Windows{{#64BitOnly}} (x64){{/64BitOnly}} +
Run Command As: System User

Download Size: {{DownloadSize}} +{{^patch}}{{#icon_base64}}

Icon:
{{/icon_base64}}{{/patch}} + ]]>
+ windows of operating system + {{#64BitOnly}} + + {{/64BitOnly}} + + {{#patch}}{{#DisplayName}} + + {{/DisplayName}}{{/patch}} + = "{{version}}") of values "DisplayVersion" of keys whose(value "DisplayName" of it as string starts with "{{DisplayName}}") of keys "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall" of (x32 registries; x64 registries) + ]]> + + {{DownloadSize}}{{^DownloadSize}}0{{/DownloadSize}} + {{DisplayName}} + + {{SourceReleaseDate}} + + + + + action-ui-metadata + { {{#version}}"version":"{{version}}",{{/version}}"size":{{DownloadSize}}{{^DownloadSize}}0{{/DownloadSize}}{{^patch}}{{#icon_base64}},"icon":"data:{{icon_type}}{{^icon_type}}image/png{{/icon_type}};base64,{{icon_base64}}"{{/icon_base64}}{{/patch}} } + + + x-fixlet-modification-time + {{x-fixlet-modification-time}} + + BESC + + + Click + here + to deploy {{DisplayName}} v{{version}}. + + + + + +
diff --git a/DataDog/DataDogAgent-Win.bigfix.recipe.yaml b/DataDog/DataDogAgent-Win.bigfix.recipe.yaml new file mode 100644 index 0000000..67fb294 --- /dev/null +++ b/DataDog/DataDogAgent-Win.bigfix.recipe.yaml @@ -0,0 +1,38 @@ +--- +Description: Generates a BigFix Task for the latest DataDog Agent +Identifier: com.github.jgstew.bigfix.DataDog-Win +Input: + NAME: DataDogAgent-Win + DisplayName: Datadog Agent + 64BitOnly: TRUE +MinimumVersion: "2.3" +ParentRecipe: com.github.jgstew.download.DataDog-Agent-Win +Process: + - Processor: com.github.jgstew.SharedProcessors/BigFixPrefetchItem + + - Processor: com.github.jgstew.SharedProcessors/BigFixSetupTemplateDictionary + # Arguments: + # template_version: "%version_maximum%" + + - Processor: com.github.jgstew.SharedProcessors/TemplateDictionaryAppendInput + + - Processor: com.github.jgstew.SharedProcessors/ContentFromTemplate + Arguments: + # use UNIX style paths so this works on Windows and non-Windows: + template_file_path: ./DataDog/DataDogAgent-Win-Install_Update.bes.mustache + content_file_pathname: "%RECIPE_CACHE_DIR%/%NAME%-InstallUpdate.bes" + + - Processor: com.github.jgstew.SharedProcessors/BESImport + + - Processor: com.github.jgstew.SharedProcessors/BigFixActioner + + # create update(patch) only content: + - Processor: com.github.jgstew.SharedProcessors/TemplateDictionaryAppend + Arguments: + append_key: "patch" + append_value: true + + - Processor: com.github.jgstew.SharedProcessors/ContentFromTemplate + Arguments: + # template_file_path: "./%VendorFolder%/%NAME%-Win-Install_Update.bes.mustache" + content_file_pathname: "%RECIPE_CACHE_DIR%/%NAME%-Update.bes" diff --git a/DataDog/DataDogAgent-Win.download.recipe.yaml b/DataDog/DataDogAgent-Win.download.recipe.yaml new file mode 100644 index 0000000..fd1d708 --- /dev/null +++ b/DataDog/DataDogAgent-Win.download.recipe.yaml @@ -0,0 +1,38 @@ +--- +Description: Downloads the latest DataDog Agent for Windows +Identifier: com.github.jgstew.download.DataDog-Agent-Win +Input: + NAME: DataDog-Agent-Win + DisplayName: Datadog Agent +MinimumVersion: "2.3" +Process: + # get all versions found in this JSON doc: + - Processor: com.github.jgstew.SharedProcessors/URLTextSearcherArray + Arguments: + url: https://ddagent-windows-stable.s3.amazonaws.com/installers_v2.json + re_pattern: '(\d+\.\d+\.\d+)-' + + # get the maximum version: + - Processor: com.github.jgstew.SharedProcessors/VersionMaximumArray + + - Processor: URLDownloaderPython + Arguments: + # %version_maximum% + url: https://s3.amazonaws.com/ddagent-windows-stable/ddagent-cli-%version_maximum%.msi + filename: datadog-agent-x86_64.msi + download_version: "" + COMPUTE_HASHES: True + + - Processor: EndOfCheckPhase + + # Get apparent SourceReleaseDate from MSI metadata: + - Processor: com.github.jgstew.SharedProcessors/FileMsiGetInfoOLE + + # Get version number from MSI ProductVersion: + - Processor: com.github.jgstew.SharedProcessors/FileMsiGetProperty + + # verify version is set correctly, at least major.minor: + - Processor: com.github.jgstew.SharedProcessors/TextSearcher + Arguments: + input_string: "%version%" + re_pattern: '^\d+\.\d+'