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

Resolve incorrectly added env vars for Windows #214

Merged
merged 1 commit into from
Oct 28, 2022
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
4 changes: 2 additions & 2 deletions lib/compute/agent-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class AgentNodes {
maxTotalUses: -1,
minimumNumberOfSpareInstances: 2,
numExecutors: 1,
amiId: 'ami-04e3e1e593eb9b709',
amiId: 'ami-0720b70e6cb2e8012',
initScript: 'echo',
remoteFs: 'C:\\Users\\Administrator\\jenkins',
};
Expand All @@ -160,7 +160,7 @@ export class AgentNodes {
maxTotalUses: 1,
minimumNumberOfSpareInstances: 1,
numExecutors: 1,
amiId: 'ami-04e3e1e593eb9b709',
amiId: 'ami-0720b70e6cb2e8012',
initScript: 'echo',
remoteFs: 'C:\\Users\\Administrator\\jenkins',
};
Expand Down
10 changes: 5 additions & 5 deletions packer/scripts/windows/scoop-install-commons.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ $fileFound
$gitPathFound = $fileFound.replace("$fileName", '')
$gitPathFound
# Add to EnvVar
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";$gitPathFound", "User")
$userenv = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::User)
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";$gitPathFound", [System.EnvironmentVariableTarget]::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
Expand Down Expand Up @@ -57,7 +57,7 @@ $libPathFound = $libFound.replace("$libName", '')
$libPathFound
mv -v "$libFound" "$libPathFound\\$libNameRequired"
# Add MINGW_BIN path to User Env Var for k-NN to retrieve libs
[System.Environment]::SetEnvironmentVariable("MINGW_BIN", "$libPathFound", "User")
[System.Environment]::SetEnvironmentVariable("MINGW_BIN", "$libPathFound", [System.EnvironmentVariableTarget]::User)

# Install zlib for k-NN compilation requirements
scoop install zlib
Expand Down Expand Up @@ -114,9 +114,9 @@ Foreach ($nodeVersion in $nodeVersionList)
}
volta install yarn
yarn --version
$userenv2 = [System.Environment]::GetEnvironmentVariable("Path", "User")
$userenv2 = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::User)
$nodePathFixed = "C:\\Users\\Administrator\\scoop\\persist\\volta\\appdata\\bin"
[System.Environment]::SetEnvironmentVariable("PATH", $userenv2 + ";$nodePathFixed", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv2 + ";$nodePathFixed", [System.EnvironmentVariableTarget]::User)

# Install ruby24
scoop install ruby24
Expand Down