Skip to content
Open
Changes from 2 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
9 changes: 9 additions & 0 deletions windows/clone.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ password $Env:DRONE_NETRC_PASSWORD
"@ > (Join-Path $Env:USERPROFILE '_netrc');
}

if ($Env:DRONE_PERSIST_CREDS) {
Comment thread
ebtasam-faridy marked this conversation as resolved.
$sourcePath = Join-Path $Env:USERPROFILE '_netrc';
$destinationPath = 'C:\addon\shared\_netrc';
New-Item -ItemType Directory -Path (Split-Path $destinationPath) -Force;
if (Test-Path -Path $sourcePath) {
Copy-Item -Path $sourcePath -Destination $destinationPath -Force;
}
}

if ($Env:DRONE_SSH_KEY) {
mkdir C:\.ssh -Force
echo $Env:DRONE_SSH_KEY > C:\.ssh\id_rsa
Expand Down