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

Add mingw related changes to Windows Agents #201

Merged
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
2 changes: 1 addition & 1 deletion lib/compute/agent-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class AgentNodes {
maxTotalUses: 10,
minimumNumberOfSpareInstances: 2,
numExecutors: 1,
amiId: 'ami-0710dc5e5094bde27',
amiId: 'ami-0eb10b1babd0c157d',
initScript: 'echo',
remoteFs: 'C:\\Users\\Administrator\\jenkins',
};
Expand Down
17 changes: 16 additions & 1 deletion packer/scripts/windows/scoop-install-commons.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $fileName = 'nohup.exe'
$fileDir = 'C:\\Users\\Administrator\\scoop\\apps\\git'
$fileFound = (Get-ChildItem -Path $fileDir -Filter $fileName -Recurse | %{$_.FullName} | select -first 1)
$fileFound
$gitPathFound = $fileFound.replace('nohup.exe', '')
$gitPathFound = $fileFound.replace("$fileName", '')
$gitPathFound
# Add to EnvVar
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
Expand All @@ -36,6 +36,21 @@ git config --system --list
# Rename system32 find.exe in case it gets conflicted with POSIX find
mv -v 'C:\\Windows\\System32\\find.exe' 'C:\\Windows\\System32\\find_windows.exe'

# Add some sleep due to a potential race condition
Start-Sleep -Seconds 5

# Install mingw for k-NN specific requirements with renaming
# This file can change its version overtime
scoop install mingw
$libName = 'libgfortran-5.dll'
$libNameRequired = 'libgfortran-3.dll'
$libDir = 'C:\\Users\\Administrator\\scoop\\apps\\mingw'
$libFound = (Get-ChildItem -Path $libDir -Filter $libName -Recurse | %{$_.FullName} | select -first 1)
$libFound
$libPathFound = $libFound.replace("$libName", '')
$libPathFound
mv -v "$libFound" "$libPathFound\\$libNameRequired"

# Setup Repos (This has to happen after git is installed or will error out)
scoop bucket add java
scoop bucket add versions
Expand Down