Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks to windows agent to support distribution builds #187

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/compute/agent-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why restrict to 10?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimumNumberOfSpareInstances: 2,
numExecutors: 1,
amiId: 'ami-07591ca4ef792c2d4',
amiId: 'ami-00b281139e1429343',
initScript: 'echo',
remoteFs: 'C:\\Users\\Administrator\\jenkins',
};
Expand Down
1 change: 1 addition & 0 deletions packer/jenkins-agent-win2019-x64.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions packer/scripts/windows/longpath-setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "Enable Long Path"
set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem LongPathsEnabled -Type DWORD -Value 1 -Force
13 changes: 13 additions & 0 deletions packer/scripts/windows/scoop-install-commons.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down