Merge pull request #163 from Sridhar-MS/latest-builds
Create/overwrite the latest blob with the most current tar.gz/deb/pkg
This commit is contained in:
commit
6d9d727ed2
3 changed files with 66 additions and 26 deletions
|
@ -8,6 +8,11 @@ Build Status
|
|||
|**Debug**|[](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_debug_ubuntu/)|[](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_debug_windows_nt/)|[](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_debug_osx/) |
|
||||
|**Release**|[](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_release_ubuntu/)|[](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_release_windows_nt/)|[](http://dotnet-ci.cloudapp.net/job/Private/job/dotnet_cli_release_osx/) |
|
||||
|
||||
| |Ubuntu 14.04 |Windows |Mac OS X |
|
||||
|---------|:------:|:------:|:------:|
|
||||
|**Installers**|[Download Debian Package](https://dotnetcli.blob.core.windows.net/dotnet/dev/Installers/Latest/dotnet-linux-x64.latest.deb)|[Download Msi](https://dotnetcli.blob.core.windows.net/dotnet/dev/Installers/Latest/dotnet-win-x64.latest.msi)|[Download Pkg](https://dotnetcli.blob.core.windows.net/dotnet/dev/Installers/Latest/dotnet-osx-x64.latest.pkg) |
|
||||
|**Binaries**|[Download tar file](https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/Latest/dotnet-linux-x64.latest.tar.gz)|[Download zip file](https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/Latest/dotnet-win-x64.latest.zip)|[Download tar file](https://dotnetcli.blob.core.windows.net/dotnet/dev/Binaries/Latest/dotnet-osx-x64.latest.tar.gz) |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
In order to build dotnet-cli, you need the following installed on you machine
|
||||
|
|
|
@ -60,37 +60,55 @@ function UploadBinaries($zipFile)
|
|||
$fileName = [System.IO.Path]::GetFileName($zipFile)
|
||||
$Upload_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/Binaries/$env:DOTNET_BUILD_VERSION/$fileName$env:SASTOKEN"
|
||||
|
||||
if(UploadFile $Upload_URI $zipFile)
|
||||
if(-Not (UploadFile $Upload_URI $zipFile))
|
||||
{
|
||||
# update the index file too
|
||||
$indexContent = "Binaries/$env:DOTNET_BUILD_VERSION/$fileName"
|
||||
$indexFile = "$env:TEMP\latest.win.index"
|
||||
$indexContent | Out-File -FilePath $indexFile
|
||||
|
||||
# upload the index file
|
||||
$Upload_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/dnvm/latest.win.index$env:SASTOKEN"
|
||||
|
||||
if(UploadFile $Upload_URI $indexFile)
|
||||
{
|
||||
$result = 0
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
return $result
|
||||
Write-Host "Updating the latest dotnet binaries for windows.."
|
||||
$Upload_URI_Latest = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/Binaries/Latest/dotnet-win-x64.latest.zip$env:SASTOKEN"
|
||||
|
||||
if(-Not (UploadFile $Upload_URI_Latest $zipFile))
|
||||
{
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
# update the index file too
|
||||
$indexContent = "Binaries/$env:DOTNET_BUILD_VERSION/$fileName"
|
||||
$indexFile = "$env:TEMP\latest.win.index"
|
||||
$indexContent | Out-File -FilePath $indexFile
|
||||
|
||||
# upload the index file
|
||||
$Upload_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/dnvm/latest.win.index$env:SASTOKEN"
|
||||
|
||||
if(-Not (UploadFile $Upload_URI $indexFile))
|
||||
{
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function UploadInstallers($msiFile)
|
||||
{
|
||||
$result = -1
|
||||
$fileName = [System.IO.Path]::GetFileName($msiFile)
|
||||
$Upload_URI = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/Installers/$env:DOTNET_BUILD_VERSION/$fileName$env:SASTOKEN"
|
||||
|
||||
if(UploadFile $Upload_URI $msiFile)
|
||||
if(-Not (UploadFile $Upload_URI $msiFile))
|
||||
{
|
||||
$result = 0
|
||||
return -1
|
||||
}
|
||||
|
||||
return $result
|
||||
Write-Host "Updating the latest dotnet installer for windows.."
|
||||
$Upload_URI_Latest = "https://$env:STORAGE_ACCOUNT.blob.core.windows.net/$env:STORAGE_CONTAINER/$env:CHANNEL/Installers/Latest/dotnet-win-x64.latest.msi$env:SASTOKEN"
|
||||
|
||||
if(-Not (UploadFile $Upload_URI_Latest $msiFile))
|
||||
{
|
||||
return -1
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
if(!(CheckRequiredVariables))
|
||||
|
|
|
@ -124,16 +124,24 @@ upload_binaries_to_blob_storage(){
|
|||
local filename=$(basename $tarfile)
|
||||
local blob="$CHANNEL/Binaries/$DOTNET_BUILD_VERSION/$filename"
|
||||
|
||||
if upload_file_to_blob_storage_azure_cli $blob $tarfile; then
|
||||
# update the index file
|
||||
local indexContent="Binaries/$DOTNET_BUILD_VERSION/$filename"
|
||||
local indexfile="latest.$OSNAME.index"
|
||||
local update_URL="https://$STORAGE_ACCOUNT.blob.core.windows.net/$STORAGE_CONTAINER/$CHANNEL/dnvm/$indexfile$SASTOKEN"
|
||||
update_file_in_blob_storage $update_URL $indexfile $indexContent
|
||||
return $?
|
||||
if ! upload_file_to_blob_storage_azure_cli $blob $tarfile; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 1
|
||||
# create the latest blob
|
||||
echo "Updating the latest dotnet binaries.."
|
||||
local latestblob="$CHANNEL/Binaries/Latest/dotnet-$OSNAME-x64.latest.tar.gz"
|
||||
|
||||
if ! upload_file_to_blob_storage_azure_cli $latestblob $tarfile; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# update the index file
|
||||
local indexContent="Binaries/$DOTNET_BUILD_VERSION/$filename"
|
||||
local indexfile="latest.$OSNAME.index"
|
||||
local update_URL="https://$STORAGE_ACCOUNT.blob.core.windows.net/$STORAGE_CONTAINER/$CHANNEL/dnvm/$indexfile$SASTOKEN"
|
||||
update_file_in_blob_storage $update_URL $indexfile $indexContent
|
||||
return $?
|
||||
}
|
||||
|
||||
upload_installers_to_blob_storage(){
|
||||
|
@ -145,6 +153,15 @@ upload_installers_to_blob_storage(){
|
|||
return 1
|
||||
fi
|
||||
|
||||
# create the latest blob
|
||||
echo "Updating the latest dotnet installer.."
|
||||
local extension="${filename##*.}"
|
||||
local latestblob="$CHANNEL/Installers/Latest/dotnet-$OSNAME-x64.latest.$extension"
|
||||
|
||||
if ! upload_file_to_blob_storage_azure_cli $latestblob $installfile; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# debain packages need to be uploaded to the PPA feed too
|
||||
if [[ $installfile == *.deb ]]; then
|
||||
DEB_FILE=$installfile
|
||||
|
|
Loading…
Add table
Reference in a new issue