Mask the azure storage account and storage container names.
This commit is contained in:
parent
9751f83c99
commit
0dd15611e1
1 changed files with 18 additions and 4 deletions
|
@ -4,10 +4,10 @@ param(
|
||||||
|
|
||||||
function CheckRequiredVariables
|
function CheckRequiredVariables
|
||||||
{
|
{
|
||||||
if([string]::IsNullOrEmpty($env:DOTNET_BUILD_VERSION))
|
if([string]::IsNullOrEmpty($env:DOTNET_BUILD_VERSION))
|
||||||
{
|
{
|
||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
|
|
||||||
# this variable is set by the CI system
|
# this variable is set by the CI system
|
||||||
if([string]::IsNullOrEmpty($env:SASTOKEN))
|
if([string]::IsNullOrEmpty($env:SASTOKEN))
|
||||||
|
@ -15,6 +15,18 @@ function CheckRequiredVariables
|
||||||
return $false
|
return $false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# this variable is set by the CI system
|
||||||
|
if([string]::IsNullOrEmpty($env:STORAGE_ACCOUNT))
|
||||||
|
{
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
|
||||||
|
# this variable is set by the CI system
|
||||||
|
if([string]::IsNullOrEmpty($env:STORAGE_CONTAINER))
|
||||||
|
{
|
||||||
|
return $false
|
||||||
|
}
|
||||||
|
|
||||||
return $true
|
return $true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +35,7 @@ $Result = CheckRequiredVariables
|
||||||
|
|
||||||
if(!$Result)
|
if(!$Result)
|
||||||
{
|
{
|
||||||
# fail silently if the required variables are not available for publishing the file.
|
# fail silently if the required variables are not available for publishing the file
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,7 +58,9 @@ elseif([System.IO.Path]::GetExtension($file).ToLower() -eq ".msi")
|
||||||
|
|
||||||
Write-Host "Uploading $fileName to dotnet feed.."
|
Write-Host "Uploading $fileName to dotnet feed.."
|
||||||
|
|
||||||
Invoke-WebRequest -URI "https://dotnetcli.blob.core.windows.net/dotnet/$Folder/$env:DOTNET_BUILD_VERSION/$fileName$env:SASTOKEN" -Method PUT -Headers @{"x-ms-blob-type"="BlockBlob"; "x-ms-date"="2015-10-23";"x-ms-version"="2013-08-15"} -InFile $file
|
$Upload_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$Folder/$env:DOTNET_BUILD_VERSION/$fileName$env:SASTOKEN"
|
||||||
|
|
||||||
|
Invoke-WebRequest -URI $Upload_URI -Method PUT -Headers @{"x-ms-blob-type"="BlockBlob"; "x-ms-date"="2015-10-23";"x-ms-version"="2013-08-15"} -InFile $file
|
||||||
|
|
||||||
$ReturnCode = $LASTEXITCODE
|
$ReturnCode = $LASTEXITCODE
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue