diff --git a/lib/compute/agent-nodes.ts b/lib/compute/agent-nodes.ts index 870f58b8..c13bbf45 100644 --- a/lib/compute/agent-nodes.ts +++ b/lib/compute/agent-nodes.ts @@ -152,10 +152,10 @@ export class AgentNodes { workerLabelString: 'Jenkins-Agent-Windows2019-X64-C54xlarge-Single-Host', instanceType: 'C54xlarge', remoteUser: 'Administrator', - maxTotalUses: -1, - minimumNumberOfSpareInstances: 1, + maxTotalUses: 10, + minimumNumberOfSpareInstances: 2, numExecutors: 1, - amiId: 'ami-07591ca4ef792c2d4', + amiId: 'ami-00b281139e1429343', initScript: 'echo', remoteFs: 'C:\\Users\\Administrator\\jenkins', }; diff --git a/packer/jenkins-agent-win2019-x64.json b/packer/jenkins-agent-win2019-x64.json index 658c331f..4676e5e1 100644 --- a/packer/jenkins-agent-win2019-x64.json +++ b/packer/jenkins-agent-win2019-x64.json @@ -64,6 +64,7 @@ "type":"powershell", "scripts": [ "scripts/windows/smb-setup-2019-plus.ps1", + "scripts/windows/longpath-setup.ps1", "scripts/windows/scoop-setup.ps1", "scripts/windows/scoop-install-commons.ps1", "scripts/windows/pip-install.ps1" diff --git a/packer/scripts/windows/longpath-setup.ps1 b/packer/scripts/windows/longpath-setup.ps1 new file mode 100644 index 00000000..d9347c4f --- /dev/null +++ b/packer/scripts/windows/longpath-setup.ps1 @@ -0,0 +1,2 @@ +echo "Enable Long Path" +set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled -Type DWORD -Value 1 -Force diff --git a/packer/scripts/windows/scoop-install-commons.ps1 b/packer/scripts/windows/scoop-install-commons.ps1 index 61f4b72c..28907b4e 100644 --- a/packer/scripts/windows/scoop-install-commons.ps1 +++ b/packer/scripts/windows/scoop-install-commons.ps1 @@ -21,10 +21,19 @@ $gitPathFound # Add to EnvVar $userenv = [System.Environment]::GetEnvironmentVariable("Path", "User") [System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";$gitPathFound", "User") +# Make sure mem size are set to avoid "Out of memory, malloc failed" issues on Windows +git config --system core.packedGitLimit 128m +git config --system core.packedGitWindowSize 128m +git config --system pack.deltaCacheSize 128m +git config --system pack.packSizeLimit 128m +git config --system pack.windowMemory 128m +git config --system http.postBuffer 524288000 +git config --system --list # Setup Repos (This has to happen after git is installed or will error out) scoop bucket add java scoop bucket add versions +scoop bucket add github-gh https://github.com/cli/scoop-gh.git # Install jdk8 scoop install temurin8-jdk @@ -78,6 +87,10 @@ jq --version scoop install yq yq --version +# Install gh +scoop install gh +gh version + # Install dev tools scoop install cmake cmake --version