From 6e3055d056b2140ad6bd66d710745cad75102081 Mon Sep 17 00:00:00 2001 From: skyamgarp <130442619+skyamgarp@users.noreply.github.com> Date: Mon, 2 Sep 2024 19:57:56 +0530 Subject: [PATCH] (PA-6330) Add Windows 2016 FIPS platform definition to puppet-agent-7.x (PA-6330) Fix Rubocop (PA-6330) Updated puppet.json --- configs/platforms/windowsfips-2016-x64.rb | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 configs/platforms/windowsfips-2016-x64.rb diff --git a/configs/platforms/windowsfips-2016-x64.rb b/configs/platforms/windowsfips-2016-x64.rb new file mode 100644 index 0000000000..308c3b6a0e --- /dev/null +++ b/configs/platforms/windowsfips-2016-x64.rb @@ -0,0 +1,28 @@ +platform "windowsfips-2016-x64" do |plat| + plat.vmpooler_template 'win-2016-fips-x86_64' + plat.servicetype 'windows' + + # We need to ensure we install chocolatey prior to adding any nuget repos. Otherwise, everything will fall over + plat.add_build_repository "https://artifactory.delivery.puppetlabs.net/artifactory/generic/buildsources/windows/chocolatey/install-chocolatey-1.4.0.ps1" + plat.provision_with "C:/ProgramData/chocolatey/bin/choco.exe feature enable -n useFipsCompliantChecksums" + + plat.add_build_repository "https://artifactory.delivery.puppetlabs.net/artifactory/api/nuget/nuget" + + # We don't want to install any packages from the chocolatey repo by accident + plat.provision_with "C:/ProgramData/chocolatey/bin/choco.exe sources remove -name chocolatey" + + #FIXME we need Fips Compliant Wix, currently not in choco repositories + #plat.provision_with "C:/ProgramData/chocolatey/bin/choco.exe install -y Wix310 -version 3.10.2 -debug -x86 --no-progress" + plat.provision_with "curl -L -o /tmp/wix314-binaries.zip https://artifactory.delivery.puppetlabs.net/artifactory/generic/buildsources/windows/wix3/wix3.14.0.6526-binaries.zip && 7z x -y -o\"/cygdrive/c/Program Files (x86)/WiX Toolset v3.14/bin\" /tmp/wix314-binaries.zip && rm /tmp/wix314-binaries.zip && SETX WIX \"C:\\Program Files (x86)\\WiX Toolset v3.14\" /M" + plat.provision_with "chmod -R 750 \"/cygdrive/c/Program Files (x86)/WiX Toolset v3.14/bin\"" + + plat.install_build_dependencies_with "C:/ProgramData/chocolatey/bin/choco.exe install -y --no-progress" + + plat.make "/usr/bin/make" + plat.patch "TMP=/var/tmp /usr/bin/patch.exe --binary" + + plat.platform_triple "x86_64-w64-mingw32" + + plat.package_type "msi" + plat.output_dir "windowsfips" +end