Fix Jenkins even more (#872)
This commit is contained in:
parent
1f34c631d6
commit
2354dc0723
|
|
@ -8,7 +8,7 @@ simpleNode('Windows.10.Enterprise.RS3.ASPNET') {
|
||||||
}
|
}
|
||||||
stage ('Build') {
|
stage ('Build') {
|
||||||
def logFolder = getLogFolder()
|
def logFolder = getLogFolder()
|
||||||
def environment = "\$env:ASPNETCORE_TEST_LOG_DIR=\"${WORKSPACE}\\${logFolder}\""
|
def environment = "\$env:ASPNETCORE_TEST_LOG_DIR='${WORKSPACE}\\${logFolder}'"
|
||||||
batchFile ("powershell -Command \"&.\\tools\\update_schema.ps1;${environment};&.\\run.ps1 -CI default-build /p:Configuration=${params.Configuration}\"")
|
bat "powershell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command \"&.\\tools\\update_schema.ps1;${environment};&.\\run.ps1 -CI default-build /p:Configuration=${params.Configuration}\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,12 +49,20 @@ for ($i=0; $i -lt $ancmSchemaFiles.Length; $i++)
|
||||||
$schemaSource = $ancmSchemaFileLocations[$i]
|
$schemaSource = $ancmSchemaFileLocations[$i]
|
||||||
|
|
||||||
$destinations = @(
|
$destinations = @(
|
||||||
"${env:ProgramFiles(x86)}\IIS Express\config\schema\${schemaFile}",
|
"${env:ProgramFiles(x86)}\IIS Express\config\schema\",
|
||||||
"${env:ProgramFiles}\IIS Express\config\schema\${schemaFile}",
|
"${env:ProgramFiles}\IIS Express\config\schema\",
|
||||||
"${env:windir}\system32\inetsrv\config\schema\${schemaFile}"
|
"${env:windir}\system32\inetsrv\config\schema\"
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach ($dest in $destinations) {
|
foreach ($destPath in $destinations) {
|
||||||
|
$dest = "$destPath\${schemaFile}";
|
||||||
|
|
||||||
|
if (!(Test-Path $destPath))
|
||||||
|
{
|
||||||
|
Write-Host "$destPath doesn't exist"
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ($PSCmdlet.ShouldProcess($dest, "Replace file")) {
|
if ($PSCmdlet.ShouldProcess($dest, "Replace file")) {
|
||||||
Write-Host "Updated $dest"
|
Write-Host "Updated $dest"
|
||||||
Move-Item $dest "${dest}.bak" -ErrorAction Ignore
|
Move-Item $dest "${dest}.bak" -ErrorAction Ignore
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue