mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-03 10:51:44 +00:00
Kubernetes | Docker: Add support for rootless images (#4151)
This commit is contained in:
@@ -40,7 +40,9 @@ func generateScriptWindows(commands []string) string {
|
||||
|
||||
const setupScriptWin = `
|
||||
$ErrorActionPreference = 'Stop';
|
||||
&cmd /c "mkdir c:\root";
|
||||
if ([Environment]::GetEnvironmentVariable('CI_WORKSPACE')) { if (-not (Test-Path "$env:CI_WORKSPACE")) { New-Item -Path "$env:CI_WORKSPACE" -ItemType Directory -Force }};
|
||||
if (-not [Environment]::GetEnvironmentVariable('HOME')) { [Environment]::SetEnvironmentVariable('HOME', 'c:\root') };
|
||||
if (-not (Test-Path "$env:HOME")) { New-Item -Path "$env:HOME" -ItemType Directory -Force };
|
||||
if ($Env:CI_NETRC_MACHINE) {
|
||||
$netrc=[string]::Format("{0}\_netrc",$Env:HOME);
|
||||
"machine $Env:CI_NETRC_MACHINE" >> $netrc;
|
||||
@@ -49,6 +51,7 @@ $netrc=[string]::Format("{0}\_netrc",$Env:HOME);
|
||||
};
|
||||
[Environment]::SetEnvironmentVariable("CI_NETRC_PASSWORD",$null);
|
||||
[Environment]::SetEnvironmentVariable("CI_SCRIPT",$null);
|
||||
if ([Environment]::GetEnvironmentVariable('CI_WORKSPACE')) { cd "$env:CI_WORKSPACE" };
|
||||
%s
|
||||
`
|
||||
|
||||
|
Reference in New Issue
Block a user