Ingest new version Aspnet store
Change the url and name accordingly for the name naming convention
This commit is contained in:
parent
ab6933708e
commit
1fa454bda4
9 changed files with 121 additions and 76 deletions
|
@ -31,21 +31,17 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<AspNetCoreRuntimeInstallerBlobRootUrl>$(CoreSetupBlobRootUrl)aspnetcore/store/$(AspNetCoreRuntimeAzureblobStoresSubfolderName)</AspNetCoreRuntimeInstallerBlobRootUrl>
|
||||
<AspNetCoreRuntimeInstallerBlobRootUrl>$(CoreSetupBlobRootUrl)aspnetcore/store/$(AspNetCoreRuntimePackageFolderName)</AspNetCoreRuntimeInstallerBlobRootUrl>
|
||||
<AspNetCoreSharedRuntimeVersionFileName>runtime.version</AspNetCoreSharedRuntimeVersionFileName>
|
||||
<AspNetCoreSharedRuntimeVersionFile Condition=" '$(AspNetCoreSharedRuntimeVersionFileName)' != '' ">$(PackagesDirectory)/$(AspNetCoreSharedRuntimeVersionFileName)</AspNetCoreSharedRuntimeVersionFile>
|
||||
|
||||
<!-- Examples: Build.RS.linux.zip Build.RS.winx86.zip AspNetCorePackageStoreLibx64.wixlib -->
|
||||
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(HostOSName)' == 'win' ">$(HostOSName)$(Architecture)</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
|
||||
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(HostOSName)' == 'osx' ">$(HostOSName)</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
|
||||
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(AspNetCoreRuntimeInstallerArchiveFileNameOSToken)' == '' ">linux</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
|
||||
|
||||
<AspNetCoreRuntimeStoreSuffix Condition="'$(AspNetCoreRuntimePackageFlavor)' != 'notimestamp'">-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimeStoreSuffix>
|
||||
<AspNetCoreRuntimeInstallerArchiveSuffix Condition="'$(AspNetCoreRuntimeStoreSuffix)' != ''">-$(AspNetCoreRelease)$(AspNetCoreRuntimeStoreSuffix)</AspNetCoreRuntimeInstallerArchiveSuffix>
|
||||
<AspNetCoreRuntimeInstallerArchiveFileName>Build.RS.$(AspNetCoreRuntimeInstallerArchiveFileNameOSToken)$(AspNetCoreRuntimeInstallerArchiveSuffix)$(ArchiveExtension)</AspNetCoreRuntimeInstallerArchiveFileName>
|
||||
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(HostOSName)' == 'win' ">win7-$(Architecture)</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
|
||||
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(HostOSName)' == 'osx' ">$(HostOSName)-$(Architecture)</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
|
||||
<AspNetCoreRuntimeInstallerArchiveFileNameOSToken Condition=" '$(AspNetCoreRuntimeInstallerArchiveFileNameOSToken)' == '' ">linux-$(Architecture)</AspNetCoreRuntimeInstallerArchiveFileNameOSToken>
|
||||
<AspNetCoreRuntimeInstallerArchiveFileName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)-$(AspNetCoreRuntimeInstallerArchiveFileNameOSToken)$(ArchiveExtension)</AspNetCoreRuntimeInstallerArchiveFileName>
|
||||
<AspNetCoreRuntimeInstallerArchiveFile>$(PackagesDirectory)/$(AspNetCoreRuntimeInstallerArchiveFileName)</AspNetCoreRuntimeInstallerArchiveFile>
|
||||
|
||||
<AspNetCoreRuntimeInstallerWixLibFileName Condition=" '$(HostOSName)' == 'win' ">AspNetCorePackageStoreLib$(Architecture)$(AspNetCoreRuntimeStoreSuffix).wixlib</AspNetCoreRuntimeInstallerWixLibFileName>
|
||||
<AspNetCoreRuntimeInstallerWixLibFileName Condition=" '$(HostOSName)' == 'win' ">AspNetCorePackageStoreLib_$(Architecture)-$(AspNetCoreRuntimePackageVersion).wixlib</AspNetCoreRuntimeInstallerWixLibFileName>
|
||||
<AspNetCoreRuntimeInstallerWixLibFile Condition=" '$(AspNetCoreRuntimeInstallerWixLibFileName)' != '' ">$(PackagesDirectory)/$(AspNetCoreRuntimeInstallerWixLibFileName)</AspNetCoreRuntimeInstallerWixLibFile>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -32,18 +32,9 @@
|
|||
<MicroBuildVersion>0.2.0</MicroBuildVersion>
|
||||
<SpaTemplateVersion>1.0.417</SpaTemplateVersion>
|
||||
<XliffTasksVersion>0.2.0-beta-000042</XliffTasksVersion>
|
||||
|
||||
<!-- This should either be timestamped or notimestamp as appropriate -->
|
||||
<AspNetCoreRuntimePackageFlavor>notimestamp</AspNetCoreRuntimePackageFlavor>
|
||||
<!--BranchName and AspNetCoreVersion will not always be the same-->
|
||||
<AspNetCoreBranchName>2.0.0</AspNetCoreBranchName>
|
||||
<AspNetCoreRelease>rtm</AspNetCoreRelease>
|
||||
<AspNetCoreVersion>2.0.0</AspNetCoreVersion>
|
||||
<AspNetCoreRuntimePackageTimestamp>26452</AspNetCoreRuntimePackageTimestamp>
|
||||
|
||||
<AspNetCoreRuntimePackageBrandName>aspnetcore-store</AspNetCoreRuntimePackageBrandName>
|
||||
<AspNetCoreVersionAndRelease>$(AspNetCoreVersion)-$(AspNetCoreRelease)</AspNetCoreVersionAndRelease>
|
||||
<AspNetCoreRuntimeAzureblobStoresSubfolderName>$(AspNetCoreBranchName)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimeAzureblobStoresSubfolderName>
|
||||
<AspNetCoreRuntimePackageFolderName>dev-26623</AspNetCoreRuntimePackageFolderName>
|
||||
<AspNetCoreRuntimePackageVersion>2.1.0-preview1-26623</AspNetCoreRuntimePackageVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- infrastructure and test only dependencies -->
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<Target Name="Test"
|
||||
Condition=" '$(CLIBUILD_SKIP_TESTS)' != 'true' "
|
||||
DependsOnTargets="BuildTests;">
|
||||
DependsOnTargets="TestsForBuildItself;BuildTests;">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectsToTest Include="build/test/RunTest.proj">
|
||||
|
@ -85,6 +85,11 @@
|
|||
|
||||
</Target>
|
||||
|
||||
<Target Name="TestsForBuildItself">
|
||||
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/test/MsBuildScript.Tests/runtests.target"
|
||||
ToolPath="$(Stage0Directory)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="EnsureStageSeparation">
|
||||
<DotNetMSBuild Arguments="/v:diag $(RepoRoot)/build_projects/Microsoft.DotNet.Cli.Build.SelfTest/InvokeWithStage0.proj /p:OutputDirectory="$(OutputDirectory)""
|
||||
ToolPath="$(Stage0Directory)" />
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<FinalArchive>$(SdkOutputDirectory)/nuGetPackagesArchive.lzma</FinalArchive>
|
||||
<NugetPackagesArchiveName>nuGetPackagesArchive.$(AspNetCoreRuntimePackageFlavor).lzma</NugetPackagesArchiveName>
|
||||
<NugetPackagesArchiveName>nuGetPackagesArchive-$(AspNetCoreRuntimePackageVersion).lzma</NugetPackagesArchiveName>
|
||||
<IntermediateArchive>$(IntermediateDirectory)/$(NugetPackagesArchiveName)</IntermediateArchive>
|
||||
<NugetPackagesArchiveBlobUrl>$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(NugetPackagesArchiveName)</NugetPackagesArchiveBlobUrl>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -35,11 +35,8 @@
|
|||
<HostFxrDebianPackageName>dotnet-hostfxr-$(HostFxrDebianPackageVersion)</HostFxrDebianPackageName>
|
||||
<HostFxrDebianPackageName>$(HostFxrDebianPackageName.ToLower())</HostFxrDebianPackageName>
|
||||
<HostDebianPackageName>dotnet-host</HostDebianPackageName>
|
||||
<AspNetCoreRuntimePackageName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimePackageName>
|
||||
<AspNetCoreRuntimePackageName Condition=" '$(AspNetCoreRuntimePackageFlavor)' == 'notimestamp' ">$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)</AspNetCoreRuntimePackageName>
|
||||
<HostRidInAspNetCoreRuntimeDebInstallerFileName>$(HostRid)</HostRidInAspNetCoreRuntimeDebInstallerFileName>
|
||||
<AspNetCoreRuntimeDebInstallerFileName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)-$(HostRidInAspNetCoreRuntimeDebInstallerFileName).deb</AspNetCoreRuntimeDebInstallerFileName>
|
||||
<AspNetCoreRuntimeDebInstallerFileName Condition=" '$(AspNetCoreRuntimePackageFlavor)' == 'notimestamp' ">$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)-$(HostRidInAspNetCoreRuntimeDebInstallerFileName).deb</AspNetCoreRuntimeDebInstallerFileName>
|
||||
<AspNetCoreRuntimePackageName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)</AspNetCoreRuntimePackageName>
|
||||
<AspNetCoreRuntimeDebInstallerFileName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)-$(HostRid).deb</AspNetCoreRuntimeDebInstallerFileName>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Inputs -->
|
||||
|
|
|
@ -18,52 +18,8 @@
|
|||
DependsOnTargets="GenerateSdkRpm"
|
||||
Condition=" '$(BuildRpmPackage)' == 'True' and '$(FPMPresent)' == 'True' "/>
|
||||
|
||||
<Target Name="GenerateSdkRpm">
|
||||
<PropertyGroup>
|
||||
<RpmPackageVersion>$(SdkVersion)</RpmPackageVersion>
|
||||
<InputRoot>$(OutputDirectory)/sdk</InputRoot>
|
||||
<SdkInstallerFile>$(InstallerOutputDirectory)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||
<RpmFile>$(SdkInstallerFile)</RpmFile>
|
||||
<ManPagesDir>$(RepoRoot)/Documentation/manpages</ManPagesDir>
|
||||
<ConfigJsonFile>$(RepoRoot)/packaging/rpm/dotnet-config.json</ConfigJsonFile>
|
||||
<RpmIntermediatesDir>$(IntermediateDirectory)/$(RpmPackageName)/$(RpmPackageVersion)</RpmIntermediatesDir>
|
||||
<RpmTestResultsXmlFile>$(RpmIntermediatesDir)/debian-testResults.xml</RpmTestResultsXmlFile>
|
||||
<RpmInstalledDirectory>/usr/share/dotnet</RpmInstalledDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<RpmLayoutDirectory>$(RpmIntermediatesDir)/RpmLayoutDirectory/</RpmLayoutDirectory>
|
||||
<RpmLayoutPackageRoot>$(RpmLayoutDirectory)package_root</RpmLayoutPackageRoot>
|
||||
<RpmLayoutSDK>$(RpmLayoutPackageRoot)/sdk</RpmLayoutSDK>
|
||||
<RpmLayoutDocs>$(RpmLayoutDirectory)docs</RpmLayoutDocs> <!-- Man Pages -->
|
||||
<RpmLayoutTemplates>$(RpmLayoutDirectory)templates</RpmLayoutTemplates> <!-- Copyright, Changelog -->
|
||||
<RpmLayoutScripts>$(RpmLayoutDirectory)scripts</RpmLayoutScripts>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<SdkRpmPackageVersion>$(SdkVersion)</SdkRpmPackageVersion>
|
||||
<SdkRpmPackageName>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkRpmPackageVersion)</SdkRpmPackageName>
|
||||
<SharedFxRpmPackageVersion>$(SharedFrameworkVersion)</SharedFxRpmPackageVersion>
|
||||
<SharedFxRpmPackageName>dotnet-runtime-$(SharedFxRpmPackageVersion)</SharedFxRpmPackageName>
|
||||
<SharedFxRpmPackageName>$(SharedFxRpmPackageName.ToLower())</SharedFxRpmPackageName>
|
||||
<HostFxrRpmPackageVersion>$(HostFxrVersion)</HostFxrRpmPackageVersion>
|
||||
<HostFxrRpmPackageName>dotnet-hostfxr-$(HostFxrRpmPackageVersion)</HostFxrRpmPackageName>
|
||||
<HostFxrRpmPackageName>$(HostFxrRpmPackageName.ToLower())</HostFxrRpmPackageName>
|
||||
<HostRpmPackageName>dotnet-host</HostRpmPackageName>
|
||||
<HostRidInAspNetCoreRuntimeRpmInstallerFileName>$(HostRid)</HostRidInAspNetCoreRuntimeRpmInstallerFileName>
|
||||
<AspNetCoreRuntimePackageName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimePackageName>
|
||||
<AspNetCoreRuntimePackageName Condition="'$(AspNetCoreRuntimePackageFlavor)' == 'notimestamp'">$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)</AspNetCoreRuntimePackageName>
|
||||
<AspNetCoreRuntimePackageVersion>$(AspNetCoreVersion)-$(AspNetCoreRelease)-$(AspNetCoreRuntimePackageTimestamp)</AspNetCoreRuntimePackageVersion>
|
||||
<AspNetCoreRuntimePackageVersion Condition="'$(AspNetCoreRuntimePackageFlavor)' == 'notimestamp'">$(AspNetCoreVersion)</AspNetCoreRuntimePackageVersion>
|
||||
<AspNetCoreRuntimeRpmInstallerFileName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersionAndRelease)-$(AspNetCoreRuntimePackageTimestamp)-$(HostRidInAspNetCoreRuntimeRpmInstallerFileName).rpm</AspNetCoreRuntimeRpmInstallerFileName>
|
||||
<AspNetCoreRuntimeRpmInstallerFileName Condition="'$(AspNetCoreRuntimePackageFlavor)' == 'notimestamp'">$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreVersion)-$(HostRidInAspNetCoreRuntimeRpmInstallerFileName).rpm</AspNetCoreRuntimeRpmInstallerFileName>
|
||||
<AfterInstallHostScriptTemplateFile>$(ScriptsDir)/$(AfterInstallHostScriptName)</AfterInstallHostScriptTemplateFile>
|
||||
<AfterInstallHostScriptDestinationFile>$(RpmLayoutScripts)/$(AfterInstallHostScriptName)</AfterInstallHostScriptDestinationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<EndToEndTestProject>$(RepoRoot)/test/EndToEnd/EndToEnd.csproj</EndToEndTestProject>
|
||||
</PropertyGroup>
|
||||
<Target Name="GenerateSdkRpm"
|
||||
DependsOnTargets="SetupRpmProps">
|
||||
|
||||
<RemoveDir Condition="Exists('$(RpmIntermediatesDir)')" Directories="$(RpmIntermediatesDir)"/>
|
||||
<MakeDir Directories="$(RpmIntermediatesDir)"/>
|
||||
|
@ -182,8 +138,52 @@
|
|||
|
||||
</Target>
|
||||
|
||||
<Target Name="SetupRpmProps">
|
||||
<PropertyGroup>
|
||||
<RpmPackageVersion>$(SdkVersion)</RpmPackageVersion>
|
||||
<InputRoot>$(OutputDirectory)/sdk</InputRoot>
|
||||
<SdkInstallerFile>$(InstallerOutputDirectory)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</SdkInstallerFile>
|
||||
<RpmFile>$(SdkInstallerFile)</RpmFile>
|
||||
<ManPagesDir>$(RepoRoot)/Documentation/manpages</ManPagesDir>
|
||||
<ConfigJsonFile>$(RepoRoot)/packaging/rpm/dotnet-config.json</ConfigJsonFile>
|
||||
<RpmIntermediatesDir>$(IntermediateDirectory)/$(RpmPackageName)/$(RpmPackageVersion)</RpmIntermediatesDir>
|
||||
<RpmTestResultsXmlFile>$(RpmIntermediatesDir)/debian-testResults.xml</RpmTestResultsXmlFile>
|
||||
<RpmInstalledDirectory>/usr/share/dotnet</RpmInstalledDirectory>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<RpmLayoutDirectory>$(RpmIntermediatesDir)/RpmLayoutDirectory/</RpmLayoutDirectory>
|
||||
<RpmLayoutPackageRoot>$(RpmLayoutDirectory)package_root</RpmLayoutPackageRoot>
|
||||
<RpmLayoutSDK>$(RpmLayoutPackageRoot)/sdk</RpmLayoutSDK>
|
||||
<RpmLayoutDocs>$(RpmLayoutDirectory)docs</RpmLayoutDocs> <!-- Man Pages -->
|
||||
<RpmLayoutTemplates>$(RpmLayoutDirectory)templates</RpmLayoutTemplates> <!-- Copyright, Changelog -->
|
||||
<RpmLayoutScripts>$(RpmLayoutDirectory)scripts</RpmLayoutScripts>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<SdkRpmPackageVersion>$(SdkVersion)</SdkRpmPackageVersion>
|
||||
<SdkRpmPackageName>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkRpmPackageVersion)</SdkRpmPackageName>
|
||||
<SharedFxRpmPackageVersion>$(SharedFrameworkVersion)</SharedFxRpmPackageVersion>
|
||||
<SharedFxRpmPackageName>dotnet-runtime-$(SharedFxRpmPackageVersion)</SharedFxRpmPackageName>
|
||||
<SharedFxRpmPackageName>$(SharedFxRpmPackageName.ToLower())</SharedFxRpmPackageName>
|
||||
<HostFxrRpmPackageVersion>$(HostFxrVersion)</HostFxrRpmPackageVersion>
|
||||
<HostFxrRpmPackageName>dotnet-hostfxr-$(HostFxrRpmPackageVersion)</HostFxrRpmPackageName>
|
||||
<HostFxrRpmPackageName>$(HostFxrRpmPackageName.ToLower())</HostFxrRpmPackageName>
|
||||
<HostRpmPackageName>dotnet-host</HostRpmPackageName>
|
||||
<AspNetCoreRuntimePackageName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)</AspNetCoreRuntimePackageName>
|
||||
<AspNetCoreRuntimePackageVersion>$(AspNetCoreRuntimePackageVersion)</AspNetCoreRuntimePackageVersion>
|
||||
<AspNetCoreRuntimeRpmInstallerFileName>$(AspNetCoreRuntimePackageBrandName)-$(AspNetCoreRuntimePackageVersion)-$(HostRid).rpm</AspNetCoreRuntimeRpmInstallerFileName>
|
||||
<AfterInstallHostScriptTemplateFile>$(ScriptsDir)/$(AfterInstallHostScriptName)</AfterInstallHostScriptTemplateFile>
|
||||
<AfterInstallHostScriptDestinationFile>$(RpmLayoutScripts)/$(AfterInstallHostScriptName)</AfterInstallHostScriptDestinationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<EndToEndTestProject>$(RepoRoot)/test/EndToEnd/EndToEnd.csproj</EndToEndTestProject>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="DownloadAspNetCoreRuntimeRpmInstaller"
|
||||
DependsOnTargets="SetupDebProps">
|
||||
DependsOnTargets="SetupRpmProps">
|
||||
<PropertyGroup>
|
||||
<DownloadedSharedAspNetCoreRuntime>$(PackagesDirectory)/$(AspNetCoreRuntimeRpmInstallerFileName)</DownloadedSharedAspNetCoreRuntime>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<SdkDebianUploadUrl>$(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</SdkDebianUploadUrl>
|
||||
<SdkDebianUploadUrl>$(DotnetBlobRootUrl)/$(Product)/$(FullNugetVersion)/$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)-$(Architecture)$(InstallerExtension)</SdkDebianUploadUrl>
|
||||
<DebianUploadJsonFile>$(SdkDebianIntermediateDirectory)/package_upload.json</DebianUploadJsonFile>
|
||||
<DebianRevisionNumber>1</DebianRevisionNumber>
|
||||
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.WindowsAzure.Storage.Blob;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.DotNet.Build.CloudTestTasks
|
||||
{
|
||||
public class EnsureFileExistsOnAzureBlobStorage : Microsoft.Build.Utilities.Task
|
||||
{
|
||||
[Required]
|
||||
public string FileUrl{ get; set; }
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
if (!ExecuteAsync().GetAwaiter().GetResult())
|
||||
{
|
||||
throw new FileDoesNotExistOnAzureBlobStorageException(FileUrl);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private Task<bool> ExecuteAsync()
|
||||
{
|
||||
var blobClient = new CloudBlockBlob(new Uri(FileUrl));
|
||||
return blobClient.ExistsAsync();
|
||||
}
|
||||
|
||||
public class FileDoesNotExistOnAzureBlobStorageException : Exception
|
||||
{
|
||||
public FileDoesNotExistOnAzureBlobStorageException(string message) : base(message + " cannot be found on Azure Blob Storage")
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
test/MsBuildScript.Tests/runtests.target
Normal file
16
test/MsBuildScript.Tests/runtests.target
Normal file
|
@ -0,0 +1,16 @@
|
|||
<Project DefaultTargets="RunMsBuildScriptTests">
|
||||
<Import Project="../../dir.props" />
|
||||
<Import Project="$(RepoRoot)/build/compile/LzmaArchive.targets" />
|
||||
|
||||
<UsingTask TaskName="DownloadFile" AssemblyFile="$(CLIBuildDll)" />
|
||||
<UsingTask TaskName="EnsureFileExistsOnAzureBlobStorage" AssemblyFile="$(CLIBuildDll)" />
|
||||
|
||||
<Target Name="RunMsBuildScriptTests" DependsOnTargets="EnsureAllDependencyFilesExist"></Target>
|
||||
|
||||
<Target Name="EnsureAllDependencyFilesExist">
|
||||
<EnsureFileExistsOnAzureBlobStorage Condition="$(HostRid.StartsWith('win'))" FileUrl="$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerWixLibFileName)" />
|
||||
<EnsureFileExistsOnAzureBlobStorage FileUrl="$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreRuntimeInstallerArchiveFileName)" />
|
||||
<EnsureFileExistsOnAzureBlobStorage FileUrl="$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(AspNetCoreSharedRuntimeVersionFileName)" />
|
||||
<EnsureFileExistsOnAzureBlobStorage FileUrl="$(AspNetCoreRuntimeInstallerBlobRootUrl)/$(NugetPackagesArchiveName)" />
|
||||
</Target>
|
||||
</Project>
|
Loading…
Reference in a new issue