Merge branch 'release/5.0.1xx-preview1' into merge/release/3.1.2xx-to-master
This commit is contained in:
commit
03963a5788
97 changed files with 2409 additions and 1864 deletions
58
.vsts-ci.yml
58
.vsts-ci.yml
|
@ -46,30 +46,21 @@ stages:
|
|||
_BuildConfig: Debug
|
||||
_BuildArchitecture: x86
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_DropSuffix: ''
|
||||
Build_ES_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_BuildArchitecture: x64
|
||||
_DOTNET_CLI_UI_LANGUAGE: es
|
||||
_DropSuffix: ''
|
||||
Build_DropSuffix_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_BuildArchitecture: x64
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_DropSuffix: true
|
||||
# Internal-only builds
|
||||
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
Build_Release_x86:
|
||||
_BuildConfig: Release
|
||||
_BuildArchitecture: x86
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_DropSuffix: ''
|
||||
# Always run builds
|
||||
Build_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_BuildArchitecture: x64
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_DropSuffix: ''
|
||||
_AdditionalBuildParameters: '/p:PublishInternalAsset=true
|
||||
/p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
|
||||
/p:DotNetPublishBlobFeedUrl=$(_ArcadePublishBlobFeedUrl)'
|
||||
|
@ -77,7 +68,6 @@ stages:
|
|||
_BuildConfig: Release
|
||||
_BuildArchitecture: arm
|
||||
_DOTNET_CLI_UI_LANGUAGE: ''
|
||||
_DropSuffix: ''
|
||||
|
||||
- template: /eng/build.yml
|
||||
parameters:
|
||||
|
@ -94,84 +84,54 @@ stages:
|
|||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_Ubuntu_18_04_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker ubuntu.18.04'
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_Fedora_29_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker fedora.29'
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_CentOS_7_1_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker centos'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_Debian_Stretch_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker debian'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_Rhel_7_2_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: '--docker rhel'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_Rhel_6_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker rhel.6'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: '--runtime-id rhel.6-x64'
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_Arm_Debug:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: ''
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: '--runtime-id linux-arm'
|
||||
_BuildArchitecture: 'arm'
|
||||
_DropSuffix: ''
|
||||
Build_Arm64_Debug:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: ''
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: '--runtime-id linux-arm64'
|
||||
_BuildArchitecture: 'arm64'
|
||||
_DropSuffix: ''
|
||||
Build_Linux_musl_Debug_x64:
|
||||
_BuildConfig: Debug
|
||||
_DockerParameter: '--docker alpine.3.6'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: '--runtime-id linux-musl-x64'
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_LinuxPortable_NoSuffix_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: ''
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: true
|
||||
Build_Arm_NoSuffix_Release:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: ''
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: '--runtime-id linux-arm'
|
||||
_BuildArchitecture: 'arm'
|
||||
_DropSuffix: true
|
||||
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
Build_Arm_Release:
|
||||
_BuildConfig: Release
|
||||
|
@ -179,35 +139,24 @@ stages:
|
|||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: '--runtime-id linux-arm'
|
||||
_BuildArchitecture: 'arm'
|
||||
_DropSuffix: ''
|
||||
Build_Arm64_Release:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: ''
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: '--runtime-id linux-arm64'
|
||||
_BuildArchitecture: 'arm64'
|
||||
_DropSuffix: ''
|
||||
Build_Rhel_6_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: '--docker rhel.6'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: '--runtime-id rhel.6-x64'
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_Linux_musl_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: '--docker alpine.3.6'
|
||||
_LinuxPortable: ''
|
||||
_RuntimeIdentifier: '--runtime-id linux-musl-x64'
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
Build_Linux_Portable_Deb_Release_x64:
|
||||
_BuildConfig: Release
|
||||
_DockerParameter: '--docker ubuntu.16.04'
|
||||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
# Do not publish zips and tarballs. The linux-x64 binaries are
|
||||
# already published by Build_LinuxPortable_Release_x64
|
||||
_AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false'
|
||||
|
@ -217,7 +166,6 @@ stages:
|
|||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
# Do not publish zips and tarballs. The linux-x64 binaries are
|
||||
# already published by Build_LinuxPortable_Release_x64
|
||||
_AdditionalBuildParameters: '/p:PublishBinariesAndBadge=false'
|
||||
|
@ -227,7 +175,6 @@ stages:
|
|||
_LinuxPortable: '--linux-portable'
|
||||
_RuntimeIdentifier: ''
|
||||
_BuildArchitecture: 'x64'
|
||||
_DropSuffix: ''
|
||||
|
||||
- template: /eng/build.yml
|
||||
parameters:
|
||||
|
@ -277,7 +224,9 @@ stages:
|
|||
- stage: copy_to_latest
|
||||
displayName: Copy to latest
|
||||
dependsOn:
|
||||
- NETCore_SDK_312xx_Publishing
|
||||
# This will run only after all the publishing stages have run.
|
||||
# These stages are introduced in the eng/common/templates/post-build/channels YAML templates
|
||||
- NetCore_Dev5_Publish
|
||||
jobs:
|
||||
- job: Copy_SDK_To_Latest
|
||||
pool:
|
||||
|
@ -287,6 +236,7 @@ stages:
|
|||
- group: DotNet-DotNetCli-Storage
|
||||
steps:
|
||||
- script: eng/CopyToLatest.cmd
|
||||
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
|
||||
/p:DotnetPublishSdkAssetsBlobFeedUrl=https://dotnetcli.blob.core.windows.net/dotnet/index.json
|
||||
/p:DotNetPublishSdkAssetsBlobFeedKey=$(dotnetcli-storage-key)
|
||||
/p:DotnetPublishChecksumsBlobFeedUrl=https://dotnetclichecksums.blob.core.windows.net/dotnet/index.json
|
||||
|
|
|
@ -7,13 +7,19 @@
|
|||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<BuildArchitecture>$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant())</BuildArchitecture>
|
||||
<Architecture Condition="'$(Architecture)' == '' AND '$(BuildArchitecture)' == 'arm64'">$(BuildArchitecture)</Architecture>
|
||||
<Architecture Condition="'$(Architecture)' == ''">x64</Architecture>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
|
||||
<DebugType>embedded</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
||||
<IsShipping>true</IsShipping>
|
||||
<CoreSdkTargetFramework>netcoreapp3.1</CoreSdkTargetFramework>
|
||||
<CoreSdkTargetFramework>netcoreapp5.0</CoreSdkTargetFramework>
|
||||
|
||||
<NoWarn>NU5125;NU5105;NU1701</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
|
11
NuGet.config
11
NuGet.config
|
@ -3,22 +3,17 @@
|
|||
<solution>
|
||||
<add key="disableSourceControlIntegration" value="true" />
|
||||
</solution>
|
||||
<!-- Only specify feed for Arcade SDK (see https://github.com/Microsoft/msbuild/issues/2982) -->
|
||||
<packageSources>
|
||||
<clear />
|
||||
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
||||
<add key="darc-pub-dotnet-corefx-0f7f38c" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-corefx-0f7f38c4/nuget/v3/index.json" />
|
||||
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
|
||||
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
|
||||
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
|
||||
<add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="msbuild" value="https://dotnet.myget.org/F/msbuild/api/v3/index.json" />
|
||||
<add key="nuget-build" value="https://dotnet.myget.org/F/nuget-build/api/v3/index.json" />
|
||||
<add key="dotnet3" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json" />
|
||||
<add key="dotnet3-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json" />
|
||||
<add key="dotnet3.1" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json" />
|
||||
<add key="dotnet3.1-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json" />
|
||||
<add key="darc-pub-dotnet-templating-247f60e9" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-templating-247f60e9/nuget/v3/index.json" />
|
||||
<add key="dotnet5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json" />
|
||||
<add key="dotnet5-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json" />
|
||||
</packageSources>
|
||||
<disabledPackageSources>
|
||||
<clear />
|
||||
|
|
|
@ -30,7 +30,7 @@ Installers and Binaries
|
|||
|
||||
You can download the .NET Core SDK as either an installer (MSI, PKG) or a zip (zip, tar.gz). The .NET Core SDK contains both the .NET Core runtime and CLI tools.
|
||||
|
||||
To download the .NET Core runtime **without** the SDK, visit https://github.com/dotnet/core-setup#daily-builds.
|
||||
To download the .NET Core runtime **without** the SDK, visit https://github.com/dotnet/runtime#daily-builds.
|
||||
|
||||
**Note:** Be aware that the following installers are the **latest bits**. If you
|
||||
want to install the latest released versions, check out the [preceding section](#looking-for-v2-of-the-net-core-tooling).
|
||||
|
@ -67,7 +67,7 @@ With development builds, internal NuGet feeds are necessary for some scenarios (
|
|||
|
||||
Reference notes:
|
||||
> **1**: Our Debian packages are put together slightly differently than the other OS specific installers. Instead of combining everything, we have separate component packages that depend on each other. If you're installing the SDK from the .deb file (via dpkg or similar), then you'll need to install the corresponding dependencies first:
|
||||
> * [Host, Host FX Resolver, and Shared Framework](https://github.com/dotnet/core-setup#daily-builds)
|
||||
> * [Host, Host FX Resolver, and Shared Framework](https://github.com/dotnet/runtime#daily-builds)
|
||||
> * [ASP.NET Core Shared Framework](https://github.com/aspnet/AspNetCore/blob/master/docs/DailyBuilds.md)
|
||||
|
||||
[win-x64-badge-master]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/master/win_x64_Release_version_badge.svg
|
||||
|
@ -460,9 +460,6 @@ Reference notes:
|
|||
[freebsd-x64-zip-3.0.1XX]: https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.0.1xx/dotnet-sdk-latest-freebsd-x64.tar.gz
|
||||
[freebsd-x64-zip-checksum-3.0.1XX]: https://dotnetclichecksums.blob.core.windows.net/dotnet/Sdk/release/3.0.1xx/dotnet-sdk-latest-freebsd-x64.tar.gz.sha
|
||||
|
||||
[sdk-shas-2.2.1XX]: https://github.com/dotnet/versions/tree/master/build-info/dotnet/product/cli/release/2.2#built-repositories
|
||||
|
||||
|
||||
Questions & Comments
|
||||
--------------------
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
|
||||
<Project>
|
||||
|
||||
<Import Project="$(RepoRoot)\src\redist\targets\Versions.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Product>Sdk</Product>
|
||||
<BlobStoragePartialRelativePath>$(Product)</BlobStoragePartialRelativePath>
|
||||
|
@ -56,19 +53,24 @@
|
|||
|
||||
<Target Name="PublishSdkAssetsAndChecksums"
|
||||
BeforeTargets="Publish"
|
||||
DependsOnTargets="SetSdkVersionInfo"
|
||||
Condition=" '$(PublishSdkAssetsAndChecksumsToBlob)' == 'true' ">
|
||||
|
||||
<ReadLinesFromFile File="$(ArtifactsTmpDir)FullNugetVersion.version">
|
||||
<Output
|
||||
TaskParameter="Lines"
|
||||
PropertyName="FullNugetVersion"/>
|
||||
</ReadLinesFromFile>
|
||||
|
||||
<!-- If the sdk version is stabilized, then we should double publish the binaries to suffixed file names.
|
||||
To do this, create new copies of the blobs, replacing the SdkVersion string in the file name with the
|
||||
FullNugetVersion, except if the FullNuGetVersion is already in the file name (which would end up
|
||||
publishing the same exact file name twice). -->
|
||||
<ItemGroup Condition="'$(DropSuffix)'== 'true'">
|
||||
<SdkAssetsToCopyWithSuffix Include="@(SdkAssetsToPublish)" Condition="'$([System.String]::Copy(`%(Filename)`).Contains(`$(SdkVersion)`))' == 'true'">
|
||||
<SuffixedPath>$(ArtifactsShippingPackagesDir)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('$(SdkVersion)' ,'$(FullNuGetVersion)'))</SuffixedPath>
|
||||
<ItemGroup Condition="'$(DotNetFinalVersionKind)'== 'release'">
|
||||
<SdkAssetsToCopyWithSuffix Include="@(SdkAssetsToPublish)" Condition="'$([System.String]::Copy(`%(Filename)`).Contains(`$(Version)`))' == 'true'">
|
||||
<SuffixedPath>$(ArtifactsShippingPackagesDir)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('$(Version)' ,'$(FullNuGetVersion)'))</SuffixedPath>
|
||||
</SdkAssetsToCopyWithSuffix>
|
||||
<CheckSumsToCopyWithSuffix Include="@(CheckSumsToPublish)" Condition="'$([System.String]::Copy(`%(Filename)`).Contains(`$(SdkVersion)`))' == 'true'">
|
||||
<SuffixedPath>$(ArtifactsShippingPackagesDir)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('$(SdkVersion)' ,'$(FullNuGetVersion)'))</SuffixedPath>
|
||||
<CheckSumsToCopyWithSuffix Include="@(CheckSumsToPublish)" Condition="'$([System.String]::Copy(`%(Filename)`).Contains(`$(Version)`))' == 'true'">
|
||||
<SuffixedPath>$(ArtifactsShippingPackagesDir)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('$(Version)' ,'$(FullNuGetVersion)'))</SuffixedPath>
|
||||
</CheckSumsToCopyWithSuffix>
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -103,7 +105,7 @@
|
|||
<ManifestArtifactData>NonShipping=true</ManifestArtifactData>
|
||||
</SdkAssetsWithSuffixToPushToBlobFeed>
|
||||
|
||||
<ChecksumsWithSuffixToPushToBlobFeed Include="@(CheckSumsToPublishWithSuffix)" Condition="'$(DropSuffix)'== 'true'">
|
||||
<ChecksumsWithSuffixToPushToBlobFeed Include="@(CheckSumsToPublishWithSuffix)" Condition="'$(DotNetFinalVersionKind)'== 'release'">
|
||||
<RelativeBlobPath>$(BlobStoragePartialRelativePath)/$(FullNugetVersion)/$([System.String]::Copy('%(Filename)%(Extension)'))</RelativeBlobPath>
|
||||
<ManifestArtifactData>NonShipping=true</ManifestArtifactData>
|
||||
</ChecksumsWithSuffixToPushToBlobFeed>
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<NuGetFrameworksPackageVersion>5.0.0-preview1.5663</NuGetFrameworksPackageVersion>
|
||||
<MicrosoftDotNetCliUtilsPackageVersion>3.0.100-preview.18580.6</MicrosoftDotNetCliUtilsPackageVersion>
|
||||
<NuGetFrameworksPackageVersion>5.3.0</NuGetFrameworksPackageVersion>
|
||||
<MicrosoftDotNetCliUtilsPackageVersion>$(MicrosoftDotnetToolsetInternalPackageVersion)</MicrosoftDotNetCliUtilsPackageVersion>
|
||||
<MicrosoftDotNetCliCommandLinePackageVersion>0.1.1</MicrosoftDotNetCliCommandLinePackageVersion>
|
||||
<MicrosoftNETTestSdkPackageVersion>15.8.0</MicrosoftNETTestSdkPackageVersion>
|
||||
<MicrosoftDotNetPlatformAbstractionsPackageVersion>3.0.0-preview-27218-01</MicrosoftDotNetPlatformAbstractionsPackageVersion>
|
||||
<MicrosoftDotNetProjectJsonMigrationPackageVersion>1.3.1</MicrosoftDotNetProjectJsonMigrationPackageVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,25 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Dependencies>
|
||||
<ProductDependencies>
|
||||
<Dependency Name="Microsoft.WindowsDesktop.App.Runtime.win-x64" Version="3.1.1">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup</Uri>
|
||||
<Sha>a1388f194c30cb21b36b75982962cb5e35954e4e</Sha>
|
||||
<Dependency Name="Microsoft.WindowsDesktop.App.Ref" Version="5.0.0-preview.1.20118.1">
|
||||
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
|
||||
<Sha>1e824b0c81d6c2ed682534e4ec1262c5a943fc8e</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App.Internal" Version="3.1.1-servicing.19608.4">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup</Uri>
|
||||
<Sha>a1388f194c30cb21b36b75982962cb5e35954e4e</Sha>
|
||||
<Dependency Name="Microsoft.WindowsDesktop.App" Version="5.0.0-preview.1.20118.1">
|
||||
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
|
||||
<Sha>1e824b0c81d6c2ed682534e4ec1262c5a943fc8e</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="3.1.1">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup</Uri>
|
||||
<Sha>a1388f194c30cb21b36b75982962cb5e35954e4e</Sha>
|
||||
<Dependency Name="Microsoft.WindowsDesktop.App.Runtime.win-x64" Version="5.0.0-preview.1.20118.1">
|
||||
<Uri>https://github.com/dotnet/windowsdesktop</Uri>
|
||||
<Sha>1e824b0c81d6c2ed682534e4ec1262c5a943fc8e</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App.Host.win-x64" Version="3.1.1">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup</Uri>
|
||||
<Sha>a1388f194c30cb21b36b75982962cb5e35954e4e</Sha>
|
||||
<Dependency Name="Microsoft.NETCore.App.Ref" Version="5.0.0-preview.1.20117.8">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>4225fd10fef47bbcd859f7e4134a7500108dc9b6</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="3.1.1">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-core-setup</Uri>
|
||||
<Sha>a1388f194c30cb21b36b75982962cb5e35954e4e</Sha>
|
||||
<Dependency Name="Microsoft.NETCore.App.Internal" Version="5.0.0-preview.1.20117.8">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>4225fd10fef47bbcd859f7e4134a7500108dc9b6</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App.Runtime.win-x64" Version="5.0.0-preview.1.20117.8">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>4225fd10fef47bbcd859f7e4134a7500108dc9b6</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App.Host.win-x64" Version="5.0.0-preview.1.20117.8">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>4225fd10fef47bbcd859f7e4134a7500108dc9b6</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.DotNetHostResolver" Version="5.0.0-preview.1.20117.8">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>4225fd10fef47bbcd859f7e4134a7500108dc9b6</Sha>
|
||||
</Dependency>
|
||||
<!-- Change blob version in GenerateLayout.targets if this is unpinned to service targeting pack -->
|
||||
<!-- No new netstandard.library planned for 3.1 timeframe at this time. -->
|
||||
|
@ -27,84 +39,70 @@
|
|||
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||
<Sha>7d57652f33493fa022125b7f63aad0d70c52d810</Sha>
|
||||
</Dependency>
|
||||
<!-- Change blob version in GenerateLayout.targets if this is unpinned to service targeting pack -->
|
||||
<Dependency Name="Microsoft.WindowsDesktop.App.Ref" Version="3.1.0" Pinned="true">
|
||||
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||
<Sha>65f04fb6db7a5e198d05dbebd5c4ad21eb018f89</Sha>
|
||||
<Dependency Name="Microsoft.NETCore.Platforms" Version="5.0.0-preview.1.20117.8">
|
||||
<Uri>https://github.com/dotnet/runtime</Uri>
|
||||
<Sha>4225fd10fef47bbcd859f7e4134a7500108dc9b6</Sha>
|
||||
</Dependency>
|
||||
<!-- Change blob version in GenerateLayout.targets if this is unpinned to service targeting pack -->
|
||||
<Dependency Name="Microsoft.NETCore.App.Ref" Version="3.1.0" Pinned="true">
|
||||
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||
<Sha>65f04fb6db7a5e198d05dbebd5c4ad21eb018f89</Sha>
|
||||
<Dependency Name="Microsoft.AspNetCore.App.Ref" Version="5.0.0-preview.1.20116.1">
|
||||
<Uri>https://github.com/dotnet/aspnetcore</Uri>
|
||||
<Sha>2a521681156cfd8b297572a7fb19e96812c92d7b</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.Platforms" Version="3.1.0" CoherentParentDependency="Microsoft.NetCore.App.Internal">
|
||||
<Uri>https://github.com/dotnet/corefx</Uri>
|
||||
<Sha>0f7f38c4fd323b26da10cce95f857f77f0f09b48</Sha>
|
||||
<Dependency Name="Microsoft.AspNetCore.App.Runtime.win-x64" Version="5.0.0-preview.1.20116.1">
|
||||
<Uri>https://github.com/dotnet/aspnetcore</Uri>
|
||||
<Sha>2a521681156cfd8b297572a7fb19e96812c92d7b</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.AspNetCore.App.Ref" Version="3.1.0">
|
||||
<Uri>https://github.com/aspnet/AspNetCore</Uri>
|
||||
<Sha>2b7e994b8a304700a09617ffc5052f0d943bbcba</Sha>
|
||||
<Dependency Name="VS.Redist.Common.AspNetCore.TargetingPack.x64.5.0" Version="5.0.0-preview.1.20116.1">
|
||||
<Uri>https://github.com/dotnet/aspnetcore</Uri>
|
||||
<Sha>2a521681156cfd8b297572a7fb19e96812c92d7b</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.AspNetCore.App.Runtime.win-x64" Version="3.1.1">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/aspnet-AspNetCore</Uri>
|
||||
<Sha>e276c8174b8bfdeb70efceafa81c75f8badbc8db</Sha>
|
||||
<Dependency Name="dotnet-dev-certs" Version="5.0.0-preview.1.20116.1">
|
||||
<Uri>https://github.com/dotnet/aspnetcore</Uri>
|
||||
<Sha>2a521681156cfd8b297572a7fb19e96812c92d7b</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.AspNetCore.DeveloperCertificates.XPlat" Version="3.1.1-servicing.19615.10">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/aspnet-AspNetCore</Uri>
|
||||
<Sha>e276c8174b8bfdeb70efceafa81c75f8badbc8db</Sha>
|
||||
<Dependency Name="dotnet-user-secrets" Version="5.0.0-preview.1.20116.1">
|
||||
<Uri>https://github.com/dotnet/aspnetcore</Uri>
|
||||
<Sha>2a521681156cfd8b297572a7fb19e96812c92d7b</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="dotnet-dev-certs" Version="3.1.1-servicing.19615.10">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/aspnet-AspNetCore</Uri>
|
||||
<Sha>e276c8174b8bfdeb70efceafa81c75f8badbc8db</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="dotnet-user-secrets" Version="3.1.1-servicing.19615.10">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/aspnet-AspNetCore</Uri>
|
||||
<Sha>e276c8174b8bfdeb70efceafa81c75f8badbc8db</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="dotnet-watch" Version="3.1.1-servicing.19615.10">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/aspnet-AspNetCore</Uri>
|
||||
<Sha>e276c8174b8bfdeb70efceafa81c75f8badbc8db</Sha>
|
||||
<Dependency Name="dotnet-watch" Version="5.0.0-preview.1.20116.1">
|
||||
<Uri>https://github.com/dotnet/aspnetcore</Uri>
|
||||
<Sha>2a521681156cfd8b297572a7fb19e96812c92d7b</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.3.1" Version="1.0.2-beta4.19570.1">
|
||||
<Uri>https://github.com/dotnet/test-templates</Uri>
|
||||
<Sha>5117d3d9d7dfd3583f0c42a639efaf092f957b7b</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Common.ItemTemplates" Version="3.1.1-servicing.19605.2" CoherentParentDependency="Microsoft.Dotnet.Toolset.Internal">
|
||||
<Dependency Name="Microsoft.DotNet.Common.ItemTemplates" Version="5.0.0-alpha.1.20117.1">
|
||||
<Uri>https://github.com/dotnet/templating</Uri>
|
||||
<Sha>13abe7e2749d95337e8d72efdc5b71611815fd43</Sha>
|
||||
<Sha>26aafdde253e308c8a470439eeb56167be9bf720</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Dotnet.Toolset.Internal" Version="3.1.200-preview.20118.13">
|
||||
<Uri>https://github.com/dotnet/toolset</Uri>
|
||||
<Sha>e8dfcaf6d27640aea0af2ee4623f9a5e3c9cd407</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NET.Sdk" Version="3.1.200-preview.20113.2" CoherentParentDependency="Microsoft.Dotnet.Toolset.Internal">
|
||||
<Dependency Name="Microsoft.NET.Sdk" Version="5.0.100-preview.1.20116.1">
|
||||
<Uri>https://github.com/dotnet/sdk</Uri>
|
||||
<Sha>0bc67530cef6dd771a8750d1747926eca2dcb845</Sha>
|
||||
<Sha>0a35238b580c1e7c8de409837d994b6a7bb5097d</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.MSBuildSdkResolver" Version="3.1.200-preview.20118.2" CoherentParentDependency="Microsoft.Dotnet.Toolset.Internal">
|
||||
<Uri>https://github.com/dotnet/cli</Uri>
|
||||
<Sha>003454db824f0bd58d0b7a967e42f11f20692a48</Sha>
|
||||
<Dependency Name="Microsoft.DotNet.MSBuildSdkResolver" Version="5.0.100-preview.1.20116.1">
|
||||
<Uri>https://github.com/dotnet/sdk</Uri>
|
||||
<Sha>0a35238b580c1e7c8de409837d994b6a7bb5097d</Sha>
|
||||
</Dependency>
|
||||
<!-- For coherency purposes, these versions should be gated by the versions of winforms and wpf routed via core setup -->
|
||||
<Dependency Name="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="4.8.1-servicing.19605.5" CoherentParentDependency="Microsoft.WindowsDesktop.App.Runtime.win-x64">
|
||||
<!-- For coherency purposes, these versions should be gated by the versions of winforms and wpf routed via windowsdesktop -->
|
||||
<Dependency Name="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="5.0.0-preview.1.20117.4" CoherentParentDependency="Microsoft.WindowsDesktop.App.Runtime.win-x64">
|
||||
<Uri>https://github.com/dotnet/winforms</Uri>
|
||||
<Sha>9483a88b7764a74d71cbd449de6c56c1d5e0af21</Sha>
|
||||
<Sha>4271daf3be65f56c2fce5a9006c88449c3d3fb0e</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Wpf.ProjectTemplates" Version="3.1.0-rtm.19605.7" CoherentParentDependency="Microsoft.WindowsDesktop.App.Runtime.win-x64">
|
||||
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-wpf</Uri>
|
||||
<Sha>a8e48616c8d8e56469a456eb1ee263268316b827</Sha>
|
||||
<Dependency Name="Microsoft.DotNet.Wpf.ProjectTemplates" Version="5.0.0-preview.1.20117.5" CoherentParentDependency="Microsoft.WindowsDesktop.App.Runtime.win-x64">
|
||||
<Uri>https://github.com/dotnet/wpf</Uri>
|
||||
<Sha>f57cbfdc019eddef1f1c723d6699e4a8a6a39a99</Sha>
|
||||
</Dependency>
|
||||
<!-- This is so that WCF packages are included in the final drop for official releases. -->
|
||||
<!-- Replace with better solution, see https://github.com/dotnet/arcade/issues/4162 -->
|
||||
<Dependency Name="System.ServiceModel.Primitives" Version="4.7.0-rtm.20072.1">
|
||||
<Dependency Name="System.ServiceModel.Primitives" Version="5.0.0-preview1.20104.1">
|
||||
<Uri>https://github.com/dotnet/wcf</Uri>
|
||||
<Sha>406acaa61fb99736eed7384af5170eb6eac321c5</Sha>
|
||||
<Sha>d08484b1422ee45195adff528d6c65c7c788d7fa</Sha>
|
||||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.20113.5">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20117.3">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>15f00efd583eab4372b2e9ca25bd80ace5b119ad</Sha>
|
||||
<Sha>bd2a2b09716ddb54cb1e40f087beaaeeef859118</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
||||
|
|
|
@ -4,31 +4,36 @@
|
|||
<PropertyGroup>
|
||||
<UsingToolNetFrameworkReferenceAssemblies>true</UsingToolNetFrameworkReferenceAssemblies>
|
||||
</PropertyGroup>
|
||||
<!-- This is a fake version to fool arcade. In this repo, we handle the versioning
|
||||
of assets ourselves, since all we do is generate zips/tarballs and native installers.
|
||||
To actually update the version for this repo, look at src/redist/targets/Versions.targets -->
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<VersionMajor>5</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<VersionSDKMinor>1</VersionSDKMinor>
|
||||
<VersionFeature>00</VersionFeature>
|
||||
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature)</VersionPrefix>
|
||||
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
|
||||
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
|
||||
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>
|
||||
<CliProductBandVersion>$(MajorMinorVersion).$(VersionSDKMinor)</CliProductBandVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<MicrosoftDotnetToolsetInternalPackageVersion>3.1.200-preview.20118.13</MicrosoftDotnetToolsetInternalPackageVersion>
|
||||
<!-- Dependencies from https://github.com/dotnet/toolset -->
|
||||
<MicrosoftDotnetToolsetInternalPackageVersion>5.0.100-preview.1.20109.3</MicrosoftDotnetToolsetInternalPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/winforms -->
|
||||
<MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>4.8.1-servicing.19605.5</MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>
|
||||
<MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>5.0.0-preview.1.20117.4</MicrosoftDotnetWinFormsProjectTemplatesPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/wpf -->
|
||||
<MicrosoftDotNetWpfProjectTemplatesPackageVersion>3.1.0-rtm.19605.7</MicrosoftDotNetWpfProjectTemplatesPackageVersion>
|
||||
<MicrosoftDotNetWpfProjectTemplatesPackageVersion>5.0.0-preview.1.20117.5</MicrosoftDotNetWpfProjectTemplatesPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/templating -->
|
||||
<MicrosoftDotNetCommonItemTemplatesPackageVersion>3.1.1-servicing.19605.2</MicrosoftDotNetCommonItemTemplatesPackageVersion>
|
||||
<MicrosoftDotNetCommonItemTemplatesPackageVersion>5.0.0-alpha.1.20117.1</MicrosoftDotNetCommonItemTemplatesPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependency from https://github.com/dotnet/test-templates -->
|
||||
<MicrosoftDotNetTestProjectTemplates31PackageVersion>1.0.2-beta4.20105.2</MicrosoftDotNetTestProjectTemplates31PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates31PackageVersion>1.0.2-beta4.19570.1</MicrosoftDotNetTestProjectTemplates31PackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- NUnit3.DotNetNew.Template versions do not 'flow in' -->
|
||||
|
@ -36,40 +41,44 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependencies from https://github.com/aspnet/AspNetCore -->
|
||||
<MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>3.1.1</MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>
|
||||
<MicrosoftAspNetCoreAppRefPackageVersion>3.1.0</MicrosoftAspNetCoreAppRefPackageVersion>
|
||||
<MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion>3.1.1-servicing.19615.10</MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion>
|
||||
<dotnetdevcertsPackageVersion>3.1.1-servicing.19615.10</dotnetdevcertsPackageVersion>
|
||||
<dotnetusersecretsPackageVersion>3.1.1-servicing.19615.10</dotnetusersecretsPackageVersion>
|
||||
<dotnetwatchPackageVersion>3.1.1-servicing.19615.10</dotnetwatchPackageVersion>
|
||||
<MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>5.0.0-preview.1.20116.1</MicrosoftAspNetCoreAppRuntimewinx64PackageVersion>
|
||||
<MicrosoftAspNetCoreAppRefPackageVersion>5.0.0-preview.1.20116.1</MicrosoftAspNetCoreAppRefPackageVersion>
|
||||
<VSRedistCommonAspNetCoreTargetingPackx6450PackageVersion>5.0.0-preview.1.20116.1</VSRedistCommonAspNetCoreTargetingPackx6450PackageVersion>
|
||||
<dotnetdevcertsPackageVersion>5.0.0-preview.1.20116.1</dotnetdevcertsPackageVersion>
|
||||
<dotnetusersecretsPackageVersion>5.0.0-preview.1.20116.1</dotnetusersecretsPackageVersion>
|
||||
<dotnetwatchPackageVersion>5.0.0-preview.1.20116.1</dotnetwatchPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependencies from https://github.com/dotnet/cli -->
|
||||
<MicrosoftDotNetMSBuildSdkResolverPackageVersion>3.1.200-preview.20118.2</MicrosoftDotNetMSBuildSdkResolverPackageVersion>
|
||||
<MicrosoftDotNetMSBuildSdkResolverPackageVersion>5.0.100-preview.1.20116.1</MicrosoftDotNetMSBuildSdkResolverPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<MicroBuildCorePackageVersion>0.2.0</MicroBuildCorePackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependencies from https://github.com/dotnet/sdk (to run tests) -->
|
||||
<MicrosoftNETSdkPackageVersion>3.1.200-preview.20113.2</MicrosoftNETSdkPackageVersion>
|
||||
<MicrosoftNETSdkPackageVersion>5.0.100-preview.1.20116.1</MicrosoftNETSdkPackageVersion>
|
||||
<MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependencies from https://github.com/dotnet/corefx -->
|
||||
<MicrosoftNETCorePlatformsPackageVersion>3.1.0</MicrosoftNETCorePlatformsPackageVersion>
|
||||
<MicrosoftNETCorePlatformsPackageVersion>5.0.0-preview.1.20117.8</MicrosoftNETCorePlatformsPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependencies from https://github.com/dotnet/core-setup -->
|
||||
<MicrosoftNETCoreAppInternalPackageVersion>3.1.1-servicing.19608.4</MicrosoftNETCoreAppInternalPackageVersion>
|
||||
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>3.1.1</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
|
||||
<MicrosoftNETCoreAppHostwinx64PackageVersion>3.1.1</MicrosoftNETCoreAppHostwinx64PackageVersion>
|
||||
<MicrosoftNETCoreAppRefPackageVersion>3.1.0</MicrosoftNETCoreAppRefPackageVersion>
|
||||
<MicrosoftNETCoreDotNetHostResolverPackageVersion>3.1.1</MicrosoftNETCoreDotNetHostResolverPackageVersion>
|
||||
<MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion>3.1.1</MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion>
|
||||
<MicrosoftWindowsDesktopAppRefPackageVersion>3.1.0</MicrosoftWindowsDesktopAppRefPackageVersion>
|
||||
<MicrosoftNETCoreAppInternalPackageVersion>5.0.0-preview.1.20117.8</MicrosoftNETCoreAppInternalPackageVersion>
|
||||
<MicrosoftNETCoreAppRuntimewinx64PackageVersion>5.0.0-preview.1.20117.8</MicrosoftNETCoreAppRuntimewinx64PackageVersion>
|
||||
<MicrosoftNETCoreAppHostwinx64PackageVersion>5.0.0-preview.1.20117.8</MicrosoftNETCoreAppHostwinx64PackageVersion>
|
||||
<MicrosoftNETCoreAppRefPackageVersion>5.0.0-preview.1.20117.8</MicrosoftNETCoreAppRefPackageVersion>
|
||||
<MicrosoftNETCoreDotNetHostResolverPackageVersion>5.0.0-preview.1.20117.8</MicrosoftNETCoreDotNetHostResolverPackageVersion>
|
||||
<NETStandardLibraryRefPackageVersion>2.1.0</NETStandardLibraryRefPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Dependencies from https://github.com/dotnet/windowsdesktop -->
|
||||
<MicrosoftWindowsDesktopAppPackageVersion>5.0.0-preview.1.20118.1</MicrosoftWindowsDesktopAppPackageVersion>
|
||||
<MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion>5.0.0-preview.1.20118.1</MicrosoftWindowsDesktopAppRuntimewinx64PackageVersion>
|
||||
<MicrosoftWindowsDesktopAppRefPackageVersion>5.0.0-preview.1.20118.1</MicrosoftWindowsDesktopAppRefPackageVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Runtime and Apphost pack versions are the same for all RIDs. We flow the x64 -->
|
||||
<!-- version above and create aliases without the winx64 here for clarity elsewhere. -->
|
||||
|
@ -88,7 +97,7 @@
|
|||
<MicrosoftDotNetWpfProjectTemplates31PackageVersion>$(MicrosoftDotNetWpfProjectTemplatesPackageVersion)</MicrosoftDotNetWpfProjectTemplates31PackageVersion>
|
||||
<NUnit3Templates31PackageVersion>$(NUnit3DotNetNewTemplatePackageVersion)</NUnit3Templates31PackageVersion>
|
||||
<MicrosoftDotNetCommonItemTemplates31PackageVersion>$(MicrosoftDotNetCommonItemTemplatesPackageVersion)</MicrosoftDotNetCommonItemTemplates31PackageVersion>
|
||||
<MicrosoftDotNetCommonProjectTemplates31PackageVersion>$(MicrosoftDotNetCommonItemTemplates31PackageVersion)</MicrosoftDotNetCommonProjectTemplates31PackageVersion>
|
||||
<MicrosoftDotNetCommonProjectTemplates31PackageVersion>3.1.0-preview1.19475.1</MicrosoftDotNetCommonProjectTemplates31PackageVersion>
|
||||
<AspNetCorePackageVersionFor31Templates>$(MicrosoftAspNetCoreAppRuntimePackageVersion)</AspNetCorePackageVersionFor31Templates>
|
||||
<!-- 3.0 Template versions -->
|
||||
<MicrosoftDotnetWinFormsProjectTemplates30PackageVersion>4.8.0-rc2.19462.10</MicrosoftDotnetWinFormsProjectTemplates30PackageVersion>
|
||||
|
@ -96,13 +105,19 @@
|
|||
<NUnit3Templates30PackageVersion>1.6.5</NUnit3Templates30PackageVersion>
|
||||
<MicrosoftDotNetCommonItemTemplates30PackageVersion>2.0.0-preview8.19373.1</MicrosoftDotNetCommonItemTemplates30PackageVersion>
|
||||
<MicrosoftDotNetCommonProjectTemplates30PackageVersion>$(MicrosoftDotNetCommonItemTemplates30PackageVersion)</MicrosoftDotNetCommonProjectTemplates30PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates30PackageVersion>1.0.2-beta4.20105.2</MicrosoftDotNetTestProjectTemplates30PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates30PackageVersion>1.0.2-beta4.19354.2</MicrosoftDotNetTestProjectTemplates30PackageVersion>
|
||||
<AspNetCorePackageVersionFor30Templates>3.0.1</AspNetCorePackageVersionFor30Templates>
|
||||
<!-- 2.2 Template versions -->
|
||||
<NUnit3Templates22PackageVersion>1.6.0</NUnit3Templates22PackageVersion>
|
||||
<MicrosoftDotNetCommonItemTemplates22PackageVersion>1.0.2-beta4</MicrosoftDotNetCommonItemTemplates22PackageVersion>
|
||||
<MicrosoftDotNetCommonProjectTemplates22PackageVersion>$(MicrosoftDotNetCommonItemTemplates22PackageVersion)</MicrosoftDotNetCommonProjectTemplates22PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates22PackageVersion>1.0.2-beta4.19155.2</MicrosoftDotNetTestProjectTemplates22PackageVersion>
|
||||
<AspNetCorePackageVersionFor22Templates>2.2.8</AspNetCorePackageVersionFor22Templates>
|
||||
<!-- 2.1 Template versions -->
|
||||
<NUnit3Templates21PackageVersion>1.5.3</NUnit3Templates21PackageVersion>
|
||||
<MicrosoftDotNetCommonItemTemplates21PackageVersion>1.0.2-beta3</MicrosoftDotNetCommonItemTemplates21PackageVersion>
|
||||
<MicrosoftDotNetCommonProjectTemplates21PackageVersion>$(MicrosoftDotNetCommonItemTemplates21PackageVersion)</MicrosoftDotNetCommonProjectTemplates21PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates21PackageVersion>1.0.2-beta4.20105.2</MicrosoftDotNetTestProjectTemplates21PackageVersion>
|
||||
<MicrosoftDotNetTestProjectTemplates21PackageVersion>1.0.2-beta4.19511.1</MicrosoftDotNetTestProjectTemplates21PackageVersion>
|
||||
<AspNetCorePackageVersionFor21Templates>2.1.14</AspNetCorePackageVersionFor21Templates>
|
||||
</PropertyGroup>
|
||||
<!-- infrastructure and test only dependencies -->
|
||||
|
@ -111,7 +126,6 @@
|
|||
<VersionToolsVersion>$(BuildTasksFeedToolVersion)</VersionToolsVersion>
|
||||
<DotnetDebToolVersion>2.0.0</DotnetDebToolVersion>
|
||||
<MicrosoftNETTestSdkVersion>15.8.0</MicrosoftNETTestSdkVersion>
|
||||
<MicrosoftSourceLinkVersion>1.0.0-beta2-18618-05</MicrosoftSourceLinkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- pinned dependency. This package is not being produced outside of the 2.0 branch of corefx and should not change. -->
|
||||
|
|
|
@ -24,9 +24,10 @@ phases:
|
|||
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
|
||||
${{ if eq(parameters.agentOs, 'Windows_NT') }}:
|
||||
enableMicrobuild: true
|
||||
enablePublishBuildArtifacts: true
|
||||
enablePublishBuildAssets: true
|
||||
enablePublishTestResults: true
|
||||
# Don't use built-in arcade logic for publishing artifacts and test results, as we manually do this and give better names
|
||||
#enablePublishBuildArtifacts: true
|
||||
#enablePublishTestResults: true
|
||||
enablePublishUsingPipelines: ${{parameters.enablePublishUsingPipelines}}
|
||||
enableTelemetry: true
|
||||
helixRepo: dotnet/core-sdk
|
||||
|
@ -92,7 +93,6 @@ phases:
|
|||
displayName: Build
|
||||
env:
|
||||
DOTNET_CLI_UI_LANGUAGE: $(_DOTNET_CLI_UI_LANGUAGE)
|
||||
DropSuffix: $(_DropSuffix)
|
||||
DOTNETCLIMSRC_READ_SAS_TOKEN: $(_DOTNETCLIMSRC_READ_SAS_TOKEN)
|
||||
|
||||
- ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
|
||||
|
@ -120,7 +120,6 @@ phases:
|
|||
$(_AdditionalBuildParameters)
|
||||
displayName: Build
|
||||
env:
|
||||
DropSuffix: $(_DropSuffix)
|
||||
DOTNETCLIMSRC_READ_SAS_TOKEN: $(_DOTNETCLIMSRC_READ_SAS_TOKEN)
|
||||
|
||||
- ${{ if or(eq(parameters.agentOs, 'Darwin'), eq(parameters.agentOs, 'FreeBSD')) }}:
|
||||
|
|
|
@ -5,11 +5,12 @@ param(
|
|||
)
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
|
||||
function FirstMatchingSymbolDescriptionOrDefault {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
[string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
|
||||
[string] $TargetServerParameter, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
|
||||
[string] $SymbolsPath
|
||||
)
|
||||
|
||||
|
@ -21,36 +22,36 @@ function FirstMatchingSymbolDescriptionOrDefault {
|
|||
# checking and which type of file was uploaded.
|
||||
|
||||
# The file itself is returned
|
||||
$SymbolPath = $SymbolsPath + "\" + $FileName
|
||||
$SymbolPath = $SymbolsPath + '\' + $FileName
|
||||
|
||||
# PDB file for the module
|
||||
$PdbPath = $SymbolPath.Replace($Extension, ".pdb")
|
||||
$PdbPath = $SymbolPath.Replace($Extension, '.pdb')
|
||||
|
||||
# PDB file for R2R module (created by crossgen)
|
||||
$NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
|
||||
$NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')
|
||||
|
||||
# DBG file for a .so library
|
||||
$SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
|
||||
$SODbg = $SymbolPath.Replace($Extension, '.so.dbg')
|
||||
|
||||
# DWARF file for a .dylib
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')
|
||||
|
||||
.\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
|
||||
.\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParameter $FullPath -o $SymbolsPath | Out-Null
|
||||
|
||||
if (Test-Path $PdbPath) {
|
||||
return "PDB"
|
||||
return 'PDB'
|
||||
}
|
||||
elseif (Test-Path $NGenPdb) {
|
||||
return "NGen PDB"
|
||||
return 'NGen PDB'
|
||||
}
|
||||
elseif (Test-Path $SODbg) {
|
||||
return "DBG for SO"
|
||||
return 'DBG for SO'
|
||||
}
|
||||
elseif (Test-Path $DylibDwarf) {
|
||||
return "Dwarf for Dylib"
|
||||
return 'Dwarf for Dylib'
|
||||
}
|
||||
elseif (Test-Path $SymbolPath) {
|
||||
return "Module"
|
||||
return 'Module'
|
||||
}
|
||||
else {
|
||||
return $null
|
||||
|
@ -68,7 +69,7 @@ function CountMissingSymbols {
|
|||
}
|
||||
|
||||
# Extensions for which we'll look for symbols
|
||||
$RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
|
||||
$RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')
|
||||
|
||||
# How many files are missing symbol information
|
||||
$MissingSymbols = 0
|
||||
|
@ -76,7 +77,7 @@ function CountMissingSymbols {
|
|||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$PackageGuid = New-Guid
|
||||
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
|
||||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
|
||||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'
|
||||
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
|
||||
|
||||
|
@ -86,31 +87,31 @@ function CountMissingSymbols {
|
|||
Get-ChildItem -Recurse $ExtractPath |
|
||||
Where-Object {$RelevantExtensions -contains $_.Extension} |
|
||||
ForEach-Object {
|
||||
if ($_.FullName -Match "\\ref\\") {
|
||||
if ($_.FullName -Match '\\ref\\') {
|
||||
Write-Host "`t Ignoring reference assembly file" $_.FullName
|
||||
return
|
||||
}
|
||||
|
||||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
|
||||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
|
||||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--microsoft-symbol-server' -SymbolsPath $SymbolsPath
|
||||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--internal-server' -SymbolsPath $SymbolsPath
|
||||
|
||||
Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
|
||||
|
||||
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
|
||||
Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
|
||||
Write-Host "Symbols found on MSDL (${$SymbolsOnMSDL}) and SymWeb (${$SymbolsOnSymWeb})"
|
||||
}
|
||||
else {
|
||||
$MissingSymbols++
|
||||
|
||||
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
|
||||
Write-Host "No symbols found on MSDL or SymWeb!"
|
||||
Write-Host 'No symbols found on MSDL or SymWeb!'
|
||||
}
|
||||
else {
|
||||
if ($SymbolsOnMSDL -eq $null) {
|
||||
Write-Host "No symbols found on MSDL!"
|
||||
Write-Host 'No symbols found on MSDL!'
|
||||
}
|
||||
else {
|
||||
Write-Host "No symbols found on SymWeb!"
|
||||
Write-Host 'No symbols found on SymWeb!'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -129,26 +130,26 @@ function CheckSymbolsAvailable {
|
|||
Get-ChildItem "$InputPath\*.nupkg" |
|
||||
ForEach-Object {
|
||||
$FileName = $_.Name
|
||||
|
||||
|
||||
# These packages from Arcade-Services include some native libraries that
|
||||
# our current symbol uploader can't handle. Below is a workaround until
|
||||
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
|
||||
if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
|
||||
if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
|
||||
elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Write-Host "Validating $FileName "
|
||||
$Status = CountMissingSymbols "$InputPath\$FileName"
|
||||
|
||||
if ($Status -ne 0) {
|
||||
Write-Error "Missing symbols for $Status modules in the package $FileName"
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName"
|
||||
}
|
||||
|
||||
Write-Host
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
<PropertyGroup>
|
||||
<DotNetSymbolExpirationInDays Condition="'$(DotNetSymbolExpirationInDays)' == ''">3650</DotNetSymbolExpirationInDays>
|
||||
<PublishToSymbolServer>true</PublishToSymbolServer>
|
||||
<PublishToSymWeb Condition="'$(PublishToSymWeb)' == ''">true</PublishToSymWeb>
|
||||
<PublishToMSDL Condition="'$(PublishToMSDL)' == ''">true</PublishToMSDL>
|
||||
<PublishToSymbolServer Condition="'@(FilesToPublishToSymbolServer)' == '' and '@(PackagesToPublishToSymbolServer)' == ''">false</PublishToSymbolServer>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -56,7 +58,7 @@
|
|||
DryRun="false"
|
||||
ConvertPortablePdbsToWindowsPdbs="false"
|
||||
PdbConversionTreatAsWarning=""
|
||||
Condition="$(PublishToSymbolServer)"/>
|
||||
Condition="$(PublishToSymbolServer) and $(PublishToMSDL)"/>
|
||||
|
||||
<!--
|
||||
Symbol Uploader: SymWeb
|
||||
|
@ -73,7 +75,7 @@
|
|||
DryRun="false"
|
||||
ConvertPortablePdbsToWindowsPdbs="false"
|
||||
PdbConversionTreatAsWarning=""
|
||||
Condition="$(PublishToSymbolServer)"/>
|
||||
Condition="$(PublishToSymbolServer) and $(PublishToSymWeb)"/>
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -83,7 +83,7 @@ function AddCredential($creds, $source, $username, $password) {
|
|||
$passwordElement.SetAttribute("value", $Password)
|
||||
}
|
||||
|
||||
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Username, $Password) {
|
||||
function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
|
||||
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")
|
||||
|
||||
Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."
|
||||
|
@ -123,21 +123,19 @@ if ($creds -eq $null) {
|
|||
$doc.DocumentElement.AppendChild($creds) | Out-Null
|
||||
}
|
||||
|
||||
$userName = "dn-bot"
|
||||
|
||||
# Insert credential nodes for Maestro's private feeds
|
||||
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
|
||||
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
|
||||
|
||||
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
|
||||
if ($dotnet3Source -ne $null) {
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
}
|
||||
|
||||
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
|
||||
if ($dotnet31Source -ne $null) {
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
}
|
||||
|
||||
$doc.Save($filename)
|
||||
$doc.Save($filename)
|
||||
|
|
|
@ -146,4 +146,4 @@ for FeedName in ${PackageSources[@]} ; do
|
|||
|
||||
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
|
|
@ -6,140 +6,15 @@ param(
|
|||
[Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages
|
||||
)
|
||||
|
||||
# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
|
||||
# in the repository at a specific commit point. This is populated by inserting
|
||||
# all files present in the repo at a specific commit point.
|
||||
$global:RepoFiles = @{}
|
||||
|
||||
$ValidatePackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a Symbols.NuGet package
|
||||
)
|
||||
|
||||
# Ensure input file exist
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
throw "Input file does not exist: $PackagePath"
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for SourceLink information
|
||||
# For now we'll only care about Portable & Embedded PDBs
|
||||
$RelevantExtensions = @(".dll", ".exe", ".pdb")
|
||||
|
||||
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
$FailedFiles = 0
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
|
||||
$zip.Entries |
|
||||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
|
||||
ForEach-Object {
|
||||
$FileName = $_.FullName
|
||||
$Extension = [System.IO.Path]::GetExtension($_.Name)
|
||||
$FakeName = -Join((New-Guid), $Extension)
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
|
||||
|
||||
# We ignore resource DLLs
|
||||
if ($FileName.EndsWith(".resources.dll")) {
|
||||
return
|
||||
}
|
||||
|
||||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
|
||||
|
||||
$ValidateFile = {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
[string] $RealPath,
|
||||
[ref] $FailedFiles
|
||||
)
|
||||
|
||||
# Makes easier to reference `sourcelink cli`
|
||||
Push-Location $using:SourceLinkToolPath
|
||||
|
||||
$SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
|
||||
|
||||
if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
|
||||
$NumFailedLinks = 0
|
||||
|
||||
# We only care about Http addresses
|
||||
$Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
|
||||
|
||||
if ($Matches.Count -ne 0) {
|
||||
$Matches.Value |
|
||||
ForEach-Object {
|
||||
$Link = $_
|
||||
$CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
|
||||
$FilePath = $Link.Replace($CommitUrl, "")
|
||||
$Status = 200
|
||||
$Cache = $using:RepoFiles
|
||||
|
||||
if ( !($Cache.ContainsKey($FilePath)) ) {
|
||||
try {
|
||||
$Uri = $Link -as [System.URI]
|
||||
|
||||
# Only GitHub links are valid
|
||||
if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
|
||||
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
|
||||
}
|
||||
else {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
|
||||
if ($Status -ne 200) {
|
||||
if ($NumFailedLinks -eq 0) {
|
||||
if ($FailedFiles.Value -eq 0) {
|
||||
Write-Host
|
||||
}
|
||||
|
||||
Write-Host "`tFile $RealPath has broken links:"
|
||||
}
|
||||
|
||||
Write-Host "`t`tFailed to retrieve $Link"
|
||||
|
||||
$NumFailedLinks++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($NumFailedLinks -ne 0) {
|
||||
$FailedFiles.value++
|
||||
$global:LASTEXITCODE = 1
|
||||
}
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
&$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
|
||||
}
|
||||
|
||||
$zip.Dispose()
|
||||
|
||||
if ($FailedFiles -eq 0) {
|
||||
Write-Host "Passed."
|
||||
}
|
||||
}
|
||||
|
||||
function ValidateSourceLinkLinks {
|
||||
if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
|
||||
Write-Host "GHRepoName should be in the format <org>/<repo>"
|
||||
Write-PipelineTelemetryError -Category "Build" -Message "GHRepoName should be in the format <org>/<repo>"
|
||||
$global:LASTEXITCODE = 1
|
||||
return
|
||||
}
|
||||
|
||||
if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
|
||||
Write-Host "GHCommit should be a 40 chars hexadecimal string"
|
||||
Write-PipelineTelemetryError -Category "Build" -Message "GHCommit should be a 40 chars hexadecimal string"
|
||||
$global:LASTEXITCODE = 1
|
||||
return
|
||||
}
|
||||
|
@ -160,7 +35,7 @@ function ValidateSourceLinkLinks {
|
|||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
|
||||
Write-PipelineTelemetryError -Category "Build" -Message "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
|
||||
$global:LASTEXITCODE = 1
|
||||
return
|
||||
}
|
||||
|
@ -181,4 +56,140 @@ function ValidateSourceLinkLinks {
|
|||
}
|
||||
}
|
||||
|
||||
Measure-Command { ValidateSourceLinkLinks }
|
||||
try {
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
|
||||
# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
|
||||
# in the repository at a specific commit point. This is populated by inserting
|
||||
# all files present in the repo at a specific commit point.
|
||||
$global:RepoFiles = @{}
|
||||
|
||||
$ValidatePackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a Symbols.NuGet package
|
||||
)
|
||||
|
||||
# Ensure input file exist
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
throw "Input file does not exist: $PackagePath"
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for SourceLink information
|
||||
# For now we'll only care about Portable & Embedded PDBs
|
||||
$RelevantExtensions = @(".dll", ".exe", ".pdb")
|
||||
|
||||
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
$FailedFiles = 0
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
|
||||
$zip.Entries |
|
||||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
|
||||
ForEach-Object {
|
||||
$FileName = $_.FullName
|
||||
$Extension = [System.IO.Path]::GetExtension($_.Name)
|
||||
$FakeName = -Join((New-Guid), $Extension)
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
|
||||
|
||||
# We ignore resource DLLs
|
||||
if ($FileName.EndsWith(".resources.dll")) {
|
||||
return
|
||||
}
|
||||
|
||||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
|
||||
|
||||
$ValidateFile = {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
[string] $RealPath,
|
||||
[ref] $FailedFiles
|
||||
)
|
||||
|
||||
# Makes easier to reference `sourcelink cli`
|
||||
Push-Location $using:SourceLinkToolPath
|
||||
|
||||
$SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
|
||||
|
||||
if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
|
||||
$NumFailedLinks = 0
|
||||
|
||||
# We only care about Http addresses
|
||||
$Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
|
||||
|
||||
if ($Matches.Count -ne 0) {
|
||||
$Matches.Value |
|
||||
ForEach-Object {
|
||||
$Link = $_
|
||||
$CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
|
||||
$FilePath = $Link.Replace($CommitUrl, "")
|
||||
$Status = 200
|
||||
$Cache = $using:RepoFiles
|
||||
|
||||
if ( !($Cache.ContainsKey($FilePath)) ) {
|
||||
try {
|
||||
$Uri = $Link -as [System.URI]
|
||||
|
||||
# Only GitHub links are valid
|
||||
if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
|
||||
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
|
||||
}
|
||||
else {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
|
||||
if ($Status -ne 200) {
|
||||
if ($NumFailedLinks -eq 0) {
|
||||
if ($FailedFiles.Value -eq 0) {
|
||||
Write-Host
|
||||
}
|
||||
|
||||
Write-Host "`tFile $RealPath has broken links:"
|
||||
}
|
||||
|
||||
Write-Host "`t`tFailed to retrieve $Link"
|
||||
|
||||
$NumFailedLinks++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($NumFailedLinks -ne 0) {
|
||||
$FailedFiles.value++
|
||||
$global:LASTEXITCODE = 1
|
||||
}
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
&$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
|
||||
}
|
||||
|
||||
$zip.Dispose()
|
||||
|
||||
if ($FailedFiles -eq 0) {
|
||||
Write-Host "Passed."
|
||||
}
|
||||
}
|
||||
|
||||
Measure-Command { ValidateSourceLinkLinks }
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ Param(
|
|||
[switch] $sign,
|
||||
[switch] $pack,
|
||||
[switch] $publish,
|
||||
[switch] $clean,
|
||||
[switch][Alias('bl')]$binaryLog,
|
||||
[switch] $ci,
|
||||
[switch] $prepareMachine,
|
||||
|
@ -25,49 +26,50 @@ Param(
|
|||
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function Print-Usage() {
|
||||
Write-Host "Common settings:"
|
||||
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
|
||||
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
|
||||
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
Write-Host " -binaryLog Output binary log (short: -bl)"
|
||||
Write-Host " -help Print help and exit"
|
||||
Write-Host ""
|
||||
Write-Host "Common settings:"
|
||||
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
|
||||
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
|
||||
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
Write-Host " -binaryLog Output binary log (short: -bl)"
|
||||
Write-Host " -help Print help and exit"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Actions:"
|
||||
Write-Host " -restore Restore dependencies (short: -r)"
|
||||
Write-Host " -build Build solution (short: -b)"
|
||||
Write-Host " -rebuild Rebuild solution"
|
||||
Write-Host " -deploy Deploy built VSIXes"
|
||||
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
|
||||
Write-Host " -test Run all unit tests in the solution (short: -t)"
|
||||
Write-Host " -integrationTest Run all integration tests in the solution"
|
||||
Write-Host " -performanceTest Run all performance tests in the solution"
|
||||
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
|
||||
Write-Host " -sign Sign build outputs"
|
||||
Write-Host " -publish Publish artifacts (e.g. symbols)"
|
||||
Write-Host ""
|
||||
Write-Host "Actions:"
|
||||
Write-Host " -restore Restore dependencies (short: -r)"
|
||||
Write-Host " -build Build solution (short: -b)"
|
||||
Write-Host " -rebuild Rebuild solution"
|
||||
Write-Host " -deploy Deploy built VSIXes"
|
||||
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
|
||||
Write-Host " -test Run all unit tests in the solution (short: -t)"
|
||||
Write-Host " -integrationTest Run all integration tests in the solution"
|
||||
Write-Host " -performanceTest Run all performance tests in the solution"
|
||||
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
|
||||
Write-Host " -sign Sign build outputs"
|
||||
Write-Host " -publish Publish artifacts (e.g. symbols)"
|
||||
Write-Host " -clean Clean the solution"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Advanced settings:"
|
||||
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
|
||||
Write-Host " -ci Set when running on CI server"
|
||||
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
|
||||
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
|
||||
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
|
||||
Write-Host ""
|
||||
Write-Host "Advanced settings:"
|
||||
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
|
||||
Write-Host " -ci Set when running on CI server"
|
||||
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
|
||||
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
|
||||
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Command line arguments not listed above are passed thru to msbuild."
|
||||
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
|
||||
Write-Host "Command line arguments not listed above are passed thru to msbuild."
|
||||
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
|
||||
}
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function InitializeCustomToolset {
|
||||
if (-not $restore) {
|
||||
return
|
||||
}
|
||||
|
||||
$script = Join-Path $EngRoot "restore-toolset.ps1"
|
||||
$script = Join-Path $EngRoot 'restore-toolset.ps1'
|
||||
|
||||
if (Test-Path $script) {
|
||||
. $script
|
||||
|
@ -78,8 +80,8 @@ function Build {
|
|||
$toolsetBuildProj = InitializeToolset
|
||||
InitializeCustomToolset
|
||||
|
||||
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
|
||||
$platformArg = if ($platform) { "/p:Platform=$platform" } else { "" }
|
||||
$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
|
||||
$platformArg = if ($platform) { "/p:Platform=$platform" } else { '' }
|
||||
|
||||
if ($projects) {
|
||||
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
|
||||
|
@ -113,7 +115,15 @@ function Build {
|
|||
}
|
||||
|
||||
try {
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
|
||||
if ($clean) {
|
||||
if (Test-Path $ArtifactsDir) {
|
||||
Remove-Item -Recurse -Force $ArtifactsDir
|
||||
Write-Host 'Artifacts directory deleted.'
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
|
||||
Print-Usage
|
||||
exit 0
|
||||
}
|
||||
|
@ -123,14 +133,7 @@ try {
|
|||
$nodeReuse = $false
|
||||
}
|
||||
|
||||
# Import custom tools configuration, if present in the repo.
|
||||
# Note: Import in global scope so that the script set top-level variables without qualification.
|
||||
$configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1"
|
||||
if (Test-Path $configureToolsetScript) {
|
||||
. $configureToolsetScript
|
||||
}
|
||||
|
||||
if (($restore) -and ($null -eq $env:DisableNativeToolsetInstalls)) {
|
||||
if ($restore) {
|
||||
InitializeNativeTools
|
||||
}
|
||||
|
||||
|
@ -138,7 +141,7 @@ try {
|
|||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ usage()
|
|||
echo " --pack Package build outputs into NuGet packages and Willow components"
|
||||
echo " --sign Sign build outputs"
|
||||
echo " --publish Publish artifacts (e.g. symbols)"
|
||||
echo " --clean Clean the solution"
|
||||
echo ""
|
||||
|
||||
echo "Advanced settings:"
|
||||
|
@ -62,6 +63,7 @@ publish=false
|
|||
sign=false
|
||||
public=false
|
||||
ci=false
|
||||
clean=false
|
||||
|
||||
warn_as_error=true
|
||||
node_reuse=true
|
||||
|
@ -82,6 +84,9 @@ while [[ $# > 0 ]]; do
|
|||
usage
|
||||
exit 0
|
||||
;;
|
||||
-clean)
|
||||
clean=true
|
||||
;;
|
||||
-configuration|-c)
|
||||
configuration=$2
|
||||
shift
|
||||
|
@ -196,20 +201,15 @@ function Build {
|
|||
ExitWithExitCode 0
|
||||
}
|
||||
|
||||
# Import custom tools configuration, if present in the repo.
|
||||
configure_toolset_script="$eng_root/configure-toolset.sh"
|
||||
if [[ -a "$configure_toolset_script" ]]; then
|
||||
. "$configure_toolset_script"
|
||||
if [[ "$clean" == true ]]; then
|
||||
if [ -d "$artifacts_dir" ]; then
|
||||
rm -rf $artifacts_dir
|
||||
echo "Artifacts directory deleted."
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# TODO: https://github.com/dotnet/arcade/issues/1468
|
||||
# Temporary workaround to avoid breaking change.
|
||||
# Remove once repos are updated.
|
||||
if [[ -n "${useInstalledDotNetCli:-}" ]]; then
|
||||
use_installed_dotnet_cli="$useInstalledDotNetCli"
|
||||
fi
|
||||
|
||||
if [[ "$restore" == true && -z ${DisableNativeToolsetInstalls:-} ]]; then
|
||||
if [[ "$restore" == true ]]; then
|
||||
InitializeNativeTools
|
||||
fi
|
||||
|
||||
|
|
|
@ -25,8 +25,9 @@ __UbuntuPackages="build-essential"
|
|||
__AlpinePackages="alpine-base"
|
||||
__AlpinePackages+=" build-base"
|
||||
__AlpinePackages+=" linux-headers"
|
||||
__AlpinePackages+=" lldb-dev"
|
||||
__AlpinePackages+=" llvm-dev"
|
||||
__AlpinePackagesEdgeTesting=" lldb-dev"
|
||||
__AlpinePackagesEdgeMain=" llvm9-libs"
|
||||
__AlpinePackagesEdgeMain+=" python3"
|
||||
|
||||
# symlinks fixer
|
||||
__UbuntuPackages+=" symlinks"
|
||||
|
@ -193,19 +194,29 @@ fi
|
|||
|
||||
if [[ "$__LinuxCodeName" == "alpine" ]]; then
|
||||
__ApkToolsVersion=2.9.1
|
||||
__AlpineVersion=3.7
|
||||
__AlpineVersion=3.9
|
||||
__ApkToolsDir=$(mktemp -d)
|
||||
wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir
|
||||
tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir
|
||||
mkdir -p $__RootfsDir/usr/bin
|
||||
cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin
|
||||
|
||||
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
||||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackages
|
||||
|
||||
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
||||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackagesEdgeMain
|
||||
|
||||
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackagesEdgeTesting
|
||||
|
||||
rm -r $__ApkToolsDir
|
||||
elif [[ -n $__LinuxCodeName ]]; then
|
||||
qemu-debootstrap --arch $__UbuntuArch $__LinuxCodeName $__RootfsDir $__UbuntuRepo
|
||||
|
|
|
@ -31,6 +31,10 @@ else()
|
|||
message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!")
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{TOOLCHAIN})
|
||||
set(TOOLCHAIN $ENV{TOOLCHAIN})
|
||||
endif()
|
||||
|
||||
# Specify include paths
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
if(DEFINED TIZEN_TOOLCHAIN)
|
||||
|
@ -39,48 +43,25 @@ if(TARGET_ARCH_NAME STREQUAL "armel")
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# add_compile_param - adds only new options without duplicates.
|
||||
# arg0 - list with result options, arg1 - list with new options.
|
||||
# arg2 - optional argument, quick summary string for optional using CACHE FORCE mode.
|
||||
macro(add_compile_param)
|
||||
if(NOT ${ARGC} MATCHES "^(2|3)$")
|
||||
message(FATAL_ERROR "Wrong using add_compile_param! Two or three parameters must be given! See add_compile_param description.")
|
||||
endif()
|
||||
foreach(OPTION ${ARGV1})
|
||||
if(NOT ${ARGV0} MATCHES "${OPTION}($| )")
|
||||
set(${ARGV0} "${${ARGV0}} ${OPTION}")
|
||||
if(${ARGC} EQUAL "3") # CACHE FORCE mode
|
||||
set(${ARGV0} "${${ARGV0}}" CACHE STRING "${ARGV2}" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
|
||||
set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
|
||||
set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
|
||||
set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "${CROSS_ROOTFS}/usr")
|
||||
|
||||
# Specify link flags
|
||||
add_compile_param(CROSS_LINK_FLAGS "--sysroot=${CROSS_ROOTFS}")
|
||||
add_compile_param(CROSS_LINK_FLAGS "--gcc-toolchain=${CROSS_ROOTFS}/usr")
|
||||
add_compile_param(CROSS_LINK_FLAGS "--target=${TOOLCHAIN}")
|
||||
add_compile_param(CROSS_LINK_FLAGS "-fuse-ld=gold")
|
||||
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
|
||||
add_compile_param(CROSS_LINK_FLAGS "-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
||||
add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/lib")
|
||||
add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib")
|
||||
add_compile_param(CROSS_LINK_FLAGS "-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
||||
add_link_options("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
||||
add_link_options("-L${CROSS_ROOTFS}/lib")
|
||||
add_link_options("-L${CROSS_ROOTFS}/usr/lib")
|
||||
add_link_options("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
|
||||
endif()
|
||||
elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
add_compile_param(CROSS_LINK_FLAGS "-m32")
|
||||
add_link_options(-m32)
|
||||
endif()
|
||||
|
||||
add_compile_param(CMAKE_EXE_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
|
||||
add_compile_param(CMAKE_SHARED_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
|
||||
add_compile_param(CMAKE_MODULE_LINKER_FLAGS "${CROSS_LINK_FLAGS}" "TOOLCHAIN_EXE_LINKER_FLAGS")
|
||||
|
||||
# Specify compile options
|
||||
add_compile_options("--sysroot=${CROSS_ROOTFS}")
|
||||
add_compile_options("--target=${TOOLCHAIN}")
|
||||
add_compile_options("--gcc-toolchain=${CROSS_ROOTFS}/usr")
|
||||
|
||||
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64)$")
|
||||
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
|
||||
|
@ -90,7 +71,17 @@ endif()
|
|||
|
||||
if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
|
||||
add_compile_options(-mthumb)
|
||||
add_compile_options(-mfpu=vfpv3)
|
||||
if (NOT DEFINED CLR_ARM_FPU_TYPE)
|
||||
set (CLR_ARM_FPU_TYPE vfpv3)
|
||||
endif (NOT DEFINED CLR_ARM_FPU_TYPE)
|
||||
|
||||
add_compile_options (-mfpu=${CLR_ARM_FPU_TYPE})
|
||||
if (NOT DEFINED CLR_ARM_FPU_CAPABILITY)
|
||||
set (CLR_ARM_FPU_CAPABILITY 0x7)
|
||||
endif (NOT DEFINED CLR_ARM_FPU_CAPABILITY)
|
||||
|
||||
add_definitions (-DCLR_ARM_FPU_CAPABILITY=${CLR_ARM_FPU_CAPABILITY})
|
||||
|
||||
if(TARGET_ARCH_NAME STREQUAL "armel")
|
||||
add_compile_options(-mfloat-abi=softfp)
|
||||
if(DEFINED TIZEN_TOOLCHAIN)
|
||||
|
@ -103,7 +94,7 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86")
|
|||
add_compile_options(-Wno-error=unused-command-line-argument)
|
||||
endif()
|
||||
|
||||
# Set LLDB include and library paths
|
||||
# Set LLDB include and library paths for builds that need lldb.
|
||||
if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$")
|
||||
if(TARGET_ARCH_NAME STREQUAL "x86")
|
||||
set(LLVM_CROSS_DIR "$ENV{LLVM_CROSS_HOME}")
|
||||
|
@ -131,7 +122,7 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel|x86)$")
|
|||
endif()
|
||||
endif()
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH "${CROSS_ROOTFS}")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
param (
|
||||
$darcVersion = $null,
|
||||
$versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16",
|
||||
$verbosity = "m"
|
||||
$versionEndpoint = 'https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16',
|
||||
$verbosity = 'minimal',
|
||||
$toolpath = $null
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function InstallDarcCli ($darcVersion) {
|
||||
$darcCliPackageName = "microsoft.dotnet.darc"
|
||||
$darcCliPackageName = 'microsoft.dotnet.darc'
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
|
@ -23,11 +24,24 @@ function InstallDarcCli ($darcVersion) {
|
|||
$darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content
|
||||
}
|
||||
|
||||
$arcadeServicesSource = 'https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json'
|
||||
$arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
|
||||
Write-Host "Installing Darc CLI version $darcVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g --framework netcoreapp2.1
|
||||
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
|
||||
if (-not $toolpath) {
|
||||
Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g"
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
|
||||
}else {
|
||||
Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g --tool-path '$toolpath'"
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
|
||||
}
|
||||
}
|
||||
|
||||
InstallDarcCli $darcVersion
|
||||
try {
|
||||
InstallDarcCli $darcVersion
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Darc' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
darcVersion=''
|
||||
versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
|
||||
verbosity=m
|
||||
versionEndpoint='https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16'
|
||||
verbosity='minimal'
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "$1" | awk '{print tolower($0)}')"
|
||||
|
@ -20,6 +20,10 @@ while [[ $# > 0 ]]; do
|
|||
verbosity=$2
|
||||
shift
|
||||
;;
|
||||
--toolpath)
|
||||
toolpath=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
usage
|
||||
|
@ -52,17 +56,27 @@ function InstallDarcCli {
|
|||
InitializeDotNetCli
|
||||
local dotnet_root=$_InitializeDotNetCli
|
||||
|
||||
local uninstall_command=`$dotnet_root/dotnet tool uninstall $darc_cli_package_name -g`
|
||||
local tool_list=$($dotnet_root/dotnet tool list -g)
|
||||
if [[ $tool_list = *$darc_cli_package_name* ]]; then
|
||||
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
|
||||
if [ -z "$toolpath" ]; then
|
||||
local tool_list=$($dotnet_root/dotnet tool list -g)
|
||||
if [[ $tool_list = *$darc_cli_package_name* ]]; then
|
||||
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name -g)
|
||||
fi
|
||||
else
|
||||
local tool_list=$($dotnet_root/dotnet tool list --tool-path "$toolpath")
|
||||
if [[ $tool_list = *$darc_cli_package_name* ]]; then
|
||||
echo $($dotnet_root/dotnet tool uninstall $darc_cli_package_name --tool-path "$toolpath")
|
||||
fi
|
||||
fi
|
||||
|
||||
local arcadeServicesSource="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json"
|
||||
local arcadeServicesSource="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"
|
||||
|
||||
echo "Installing Darc CLI version $darcVersion..."
|
||||
echo "You may need to restart your command shell if this is the first dotnet tool you have installed."
|
||||
echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
|
||||
if [ -z "$toolpath" ]; then
|
||||
echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g)
|
||||
else
|
||||
echo $($dotnet_root/dotnet tool install $darc_cli_package_name --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath")
|
||||
fi
|
||||
}
|
||||
|
||||
InstallDarcCli
|
||||
|
|
25
eng/common/dotnet-install.ps1
vendored
25
eng/common/dotnet-install.ps1
vendored
|
@ -1,28 +1,27 @@
|
|||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string] $verbosity = "minimal",
|
||||
[string] $architecture = "",
|
||||
[string] $version = "Latest",
|
||||
[string] $runtime = "dotnet",
|
||||
[string] $RuntimeSourceFeed = "",
|
||||
[string] $RuntimeSourceFeedKey = ""
|
||||
[string] $verbosity = 'minimal',
|
||||
[string] $architecture = '',
|
||||
[string] $version = 'Latest',
|
||||
[string] $runtime = 'dotnet',
|
||||
[string] $RuntimeSourceFeed = '',
|
||||
[string] $RuntimeSourceFeedKey = ''
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
|
||||
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
|
||||
|
||||
$installdir = $dotnetRoot
|
||||
try {
|
||||
if ($architecture -and $architecture.Trim() -eq "x86") {
|
||||
$installdir = Join-Path $installdir "x86"
|
||||
if ($architecture -and $architecture.Trim() -eq 'x86') {
|
||||
$installdir = Join-Path $installdir 'x86'
|
||||
}
|
||||
InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
|
||||
}
|
||||
InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
|
37
eng/common/dotnet-install.sh
vendored
37
eng/common/dotnet-install.sh
vendored
|
@ -11,6 +11,8 @@ while [[ -h "$source" ]]; do
|
|||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
version='Latest'
|
||||
architecture=''
|
||||
runtime='dotnet'
|
||||
|
@ -40,18 +42,47 @@ while [[ $# > 0 ]]; do
|
|||
runtimeSourceFeedKey="$1"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
# Use uname to determine what the CPU is.
|
||||
cpuname=$(uname -p)
|
||||
# Some Linux platforms report unknown for platform, but the arch for machine.
|
||||
if [[ "$cpuname" == "unknown" ]]; then
|
||||
cpuname=$(uname -m)
|
||||
fi
|
||||
|
||||
case $cpuname in
|
||||
aarch64)
|
||||
buildarch=arm64
|
||||
;;
|
||||
amd64|x86_64)
|
||||
buildarch=x64
|
||||
;;
|
||||
armv7l)
|
||||
buildarch=arm
|
||||
;;
|
||||
i686)
|
||||
buildarch=x86
|
||||
;;
|
||||
*)
|
||||
echo "Unknown CPU $cpuname detected, treating it as x64"
|
||||
buildarch=x64
|
||||
;;
|
||||
esac
|
||||
|
||||
dotnetRoot="$repo_root/.dotnet"
|
||||
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
|
||||
dotnetRoot="$dotnetRoot/$architecture"
|
||||
fi
|
||||
|
||||
InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
|
||||
local exit_code=$?
|
||||
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
|
||||
|
|
|
@ -2,5 +2,12 @@ param(
|
|||
[string] $token
|
||||
)
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=VSS_NUGET_ACCESSTOKEN]$token"
|
||||
Write-Host "##vso[task.setvariable variable=VSS_NUGET_URI_PREFIXES]https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/"
|
||||
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
|
||||
# Write-PipelineSetVariable will no-op if a variable named $ci is not defined
|
||||
# Since this script is only ever called in AzDO builds, just universally set it
|
||||
$ci = $true
|
||||
|
||||
Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false
|
||||
|
|
|
@ -3,39 +3,39 @@ Param(
|
|||
[Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed)
|
||||
[Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed)
|
||||
[Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created
|
||||
[string] $darcVersion = '1.1.0-beta.19175.6', # darc's version
|
||||
[string] $darcVersion, # darc's version
|
||||
[string] $graphvizVersion = '2.38', # GraphViz version
|
||||
[switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about
|
||||
# toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
|
||||
|
||||
function CheckExitCode ([string]$stage)
|
||||
{
|
||||
$exitCode = $LASTEXITCODE
|
||||
if ($exitCode -ne 0) {
|
||||
Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
|
||||
ExitWithExitCode $exitCode
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$ErrorActionPreference = 'Stop'
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
|
||||
|
||||
Push-Location $PSScriptRoot
|
||||
|
||||
Write-Host "Installing darc..."
|
||||
Write-Host 'Installing darc...'
|
||||
. .\darc-init.ps1 -darcVersion $darcVersion
|
||||
CheckExitCode "Running darc-init"
|
||||
CheckExitCode 'Running darc-init'
|
||||
|
||||
$engCommonBaseDir = Join-Path $PSScriptRoot "native\"
|
||||
$engCommonBaseDir = Join-Path $PSScriptRoot 'native\'
|
||||
$graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory
|
||||
$nativeToolBaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external"
|
||||
$installBin = Join-Path $graphvizInstallDir "bin"
|
||||
$nativeToolBaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external'
|
||||
$installBin = Join-Path $graphvizInstallDir 'bin'
|
||||
|
||||
Write-Host "Installing dot..."
|
||||
Write-Host 'Installing dot...'
|
||||
.\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose
|
||||
|
||||
$darcExe = "$env:USERPROFILE\.dotnet\tools"
|
||||
|
@ -51,37 +51,36 @@ try {
|
|||
$graphVizImageFilePath = "$outputFolder\graph.png"
|
||||
$normalGraphFilePath = "$outputFolder\graph-full.txt"
|
||||
$flatGraphFilePath = "$outputFolder\graph-flat.txt"
|
||||
$baseOptions = @( "--github-pat", "$gitHubPat", "--azdev-pat", "$azdoPat", "--password", "$barToken" )
|
||||
$baseOptions = @( '--github-pat', "$gitHubPat", '--azdev-pat', "$azdoPat", '--password', "$barToken" )
|
||||
|
||||
if ($includeToolset) {
|
||||
Write-Host "Toolsets will be included in the graph..."
|
||||
$baseOptions += @( "--include-toolset" )
|
||||
Write-Host 'Toolsets will be included in the graph...'
|
||||
$baseOptions += @( '--include-toolset' )
|
||||
}
|
||||
|
||||
Write-Host "Generating standard dependency graph..."
|
||||
Write-Host 'Generating standard dependency graph...'
|
||||
& "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath
|
||||
CheckExitCode "Generating normal dependency graph"
|
||||
CheckExitCode 'Generating normal dependency graph'
|
||||
|
||||
Write-Host "Generating flat dependency graph and graphviz file..."
|
||||
Write-Host 'Generating flat dependency graph and graphviz file...'
|
||||
& "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath
|
||||
CheckExitCode "Generating flat and graphviz dependency graph"
|
||||
CheckExitCode 'Generating flat and graphviz dependency graph'
|
||||
|
||||
Write-Host "Generating graph image $graphVizFilePath"
|
||||
$dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe"
|
||||
& "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath"
|
||||
CheckExitCode "Generating graphviz image"
|
||||
CheckExitCode 'Generating graphviz image'
|
||||
|
||||
Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!"
|
||||
}
|
||||
catch {
|
||||
if (!$includeToolset) {
|
||||
Write-Host "This might be a toolset repo which includes only toolset dependencies. " -NoNewline -ForegroundColor Yellow
|
||||
Write-Host "Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again..." -ForegroundColor Yellow
|
||||
Write-Host 'This might be a toolset repo which includes only toolset dependencies. ' -NoNewline -ForegroundColor Yellow
|
||||
Write-Host 'Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again...' -ForegroundColor Yellow
|
||||
}
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message $_
|
||||
ExitWithExitCode 1
|
||||
} finally {
|
||||
Pop-Location
|
||||
Pop-Location
|
||||
}
|
|
@ -35,7 +35,7 @@ File path to global.json file
|
|||
#>
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param (
|
||||
[string] $BaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external",
|
||||
[string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external',
|
||||
[string] $InstallDirectory,
|
||||
[switch] $Clean = $False,
|
||||
[switch] $Force = $False,
|
||||
|
@ -45,26 +45,27 @@ Param (
|
|||
)
|
||||
|
||||
if (!$GlobalJsonFile) {
|
||||
$GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
|
||||
$GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json'
|
||||
}
|
||||
|
||||
Set-StrictMode -version 2.0
|
||||
$ErrorActionPreference="Stop"
|
||||
$ErrorActionPreference='Stop'
|
||||
|
||||
Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
|
||||
|
||||
try {
|
||||
# Define verbose switch if undefined
|
||||
$Verbose = $VerbosePreference -Eq "Continue"
|
||||
$Verbose = $VerbosePreference -Eq 'Continue'
|
||||
|
||||
$EngCommonBaseDir = Join-Path $PSScriptRoot "native\"
|
||||
$EngCommonBaseDir = Join-Path $PSScriptRoot 'native\'
|
||||
$NativeBaseDir = $InstallDirectory
|
||||
if (!$NativeBaseDir) {
|
||||
$NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory
|
||||
}
|
||||
$Env:CommonLibrary_NativeInstallDir = $NativeBaseDir
|
||||
$InstallBin = Join-Path $NativeBaseDir "bin"
|
||||
$InstallerPath = Join-Path $EngCommonBaseDir "install-tool.ps1"
|
||||
$InstallBin = Join-Path $NativeBaseDir 'bin'
|
||||
$InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1'
|
||||
|
||||
# Process tools list
|
||||
Write-Host "Processing $GlobalJsonFile"
|
||||
|
@ -74,7 +75,7 @@ try {
|
|||
}
|
||||
$NativeTools = Get-Content($GlobalJsonFile) -Raw |
|
||||
ConvertFrom-Json |
|
||||
Select-Object -Expand "native-tools" -ErrorAction SilentlyContinue
|
||||
Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue
|
||||
if ($NativeTools) {
|
||||
$NativeTools.PSObject.Properties | ForEach-Object {
|
||||
$ToolName = $_.Name
|
||||
|
@ -112,18 +113,21 @@ try {
|
|||
}
|
||||
$toolInstallationFailure = $true
|
||||
} else {
|
||||
Write-Error $errMsg
|
||||
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
|
||||
Write-Host $errMsg
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
|
||||
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
|
||||
Write-Host 'Native tools bootstrap failed'
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "No native tools defined in global.json"
|
||||
Write-Host 'No native tools defined in global.json'
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -131,17 +135,18 @@ try {
|
|||
exit 0
|
||||
}
|
||||
if (Test-Path $InstallBin) {
|
||||
Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin)
|
||||
Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin)
|
||||
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
|
||||
return $InstallBin
|
||||
}
|
||||
else {
|
||||
Write-Error "Native tools install directory does not exist, installation failed"
|
||||
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed'
|
||||
exit 1
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
exit 1
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ retry_wait_time_seconds=30
|
|||
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
|
||||
declare -A native_assets
|
||||
|
||||
. $scriptroot/pipeline-logging-functions.sh
|
||||
. $scriptroot/native/common-library.sh
|
||||
|
||||
while (($# > 0)); do
|
||||
|
@ -120,7 +121,7 @@ else
|
|||
$installer_command
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Execution Failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
@ -134,7 +135,7 @@ if [[ -d $install_bin ]]; then
|
|||
echo "Native tools are available from $install_bin"
|
||||
echo "##vso[task.prependpath]$install_bin"
|
||||
else
|
||||
echo "Native tools install directory does not exist, installation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Native tools install directory does not exist, installation failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
@ -6,9 +6,8 @@ param(
|
|||
[switch] $IsFeedPrivate
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed
|
||||
|
@ -21,7 +20,7 @@ function SetupCredProvider {
|
|||
)
|
||||
|
||||
# Install the Cred Provider NuGet plugin
|
||||
Write-Host "Setting up Cred Provider NuGet plugin in the agent..."
|
||||
Write-Host 'Setting up Cred Provider NuGet plugin in the agent...'
|
||||
Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..."
|
||||
|
||||
$url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'
|
||||
|
@ -29,18 +28,18 @@ function SetupCredProvider {
|
|||
Write-Host "Writing the contents of 'installcredprovider.ps1' locally..."
|
||||
Invoke-WebRequest $url -OutFile installcredprovider.ps1
|
||||
|
||||
Write-Host "Installing plugin..."
|
||||
Write-Host 'Installing plugin...'
|
||||
.\installcredprovider.ps1 -Force
|
||||
|
||||
Write-Host "Deleting local copy of 'installcredprovider.ps1'..."
|
||||
Remove-Item .\installcredprovider.ps1
|
||||
|
||||
if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) {
|
||||
Write-Host "CredProvider plugin was not installed correctly!"
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
Write-Host "CredProvider plugin was installed correctly!"
|
||||
Write-Host 'CredProvider plugin was installed correctly!'
|
||||
}
|
||||
|
||||
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
|
||||
|
@ -49,7 +48,7 @@ function SetupCredProvider {
|
|||
$nugetConfigPath = "$RepoRoot\NuGet.config"
|
||||
|
||||
if (-Not (Test-Path -Path $nugetConfigPath)) {
|
||||
Write-Host "NuGet.config file not found in repo's root!"
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
@ -81,7 +80,7 @@ function SetupCredProvider {
|
|||
}
|
||||
else
|
||||
{
|
||||
Write-Host "No internal endpoints found in NuGet.config"
|
||||
Write-Host 'No internal endpoints found in NuGet.config'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +98,7 @@ function InstallDotNetSdkAndRestoreArcade {
|
|||
|
||||
& $dotnet restore $restoreProjPath
|
||||
|
||||
Write-Host "Arcade SDK restored!"
|
||||
Write-Host 'Arcade SDK restored!'
|
||||
|
||||
if (Test-Path -Path $restoreProjPath) {
|
||||
Remove-Item $restoreProjPath
|
||||
|
@ -113,23 +112,22 @@ function InstallDotNetSdkAndRestoreArcade {
|
|||
try {
|
||||
Push-Location $PSScriptRoot
|
||||
|
||||
if ($Operation -like "setup") {
|
||||
if ($Operation -like 'setup') {
|
||||
SetupCredProvider $AuthToken
|
||||
}
|
||||
elseif ($Operation -like "install-restore") {
|
||||
elseif ($Operation -like 'install-restore') {
|
||||
InstallDotNetSdkAndRestoreArcade
|
||||
}
|
||||
else {
|
||||
Write-Host "Unknown operation '$Operation'!"
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message "Unknown operation '$Operation'!"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
Pop-Location
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ function SetupCredProvider {
|
|||
rm installcredprovider.sh
|
||||
|
||||
if [ ! -d "$HOME/.nuget/plugins" ]; then
|
||||
echo "CredProvider plugin was not installed correctly!"
|
||||
Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!'
|
||||
ExitWithExitCode 1
|
||||
else
|
||||
echo "CredProvider plugin was installed correctly!"
|
||||
|
@ -42,7 +42,7 @@ function SetupCredProvider {
|
|||
local nugetConfigPath="$repo_root/NuGet.config"
|
||||
|
||||
if [ ! "$nugetConfigPath" ]; then
|
||||
echo "NuGet.config file not found in repo's root!"
|
||||
Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string] $verbosity = "minimal",
|
||||
[string] $verbosity = 'minimal',
|
||||
[bool] $warnAsError = $true,
|
||||
[bool] $nodeReuse = $true,
|
||||
[switch] $ci,
|
||||
|
@ -18,9 +18,8 @@ try {
|
|||
MSBuild @extraArgs
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ function ExpandZip {
|
|||
echo "'Force flag enabled, but '$output_directory' exists. Removing directory"
|
||||
rm -rf $output_directory
|
||||
if [[ $? != 0 ]]; then
|
||||
echo Unable to remove '$output_directory'>&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to remove '$output_directory'"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
@ -45,7 +45,7 @@ function ExpandZip {
|
|||
echo "Extracting archive"
|
||||
tar -xf $zip_path -C $output_directory
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Unable to extract '$zip_path'" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to extract '$zip_path'"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
@ -117,7 +117,7 @@ function DownloadAndExtract {
|
|||
# Download file
|
||||
GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Failed to download '$uri' to '$temp_tool_path'." >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to download '$uri' to '$temp_tool_path'."
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
@ -125,7 +125,7 @@ function DownloadAndExtract {
|
|||
echo "extracting from $temp_tool_path to $installDir"
|
||||
ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Failed to extract '$temp_tool_path' to '$installDir'." >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to extract '$temp_tool_path' to '$installDir'."
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
@ -148,7 +148,7 @@ function NewScriptShim {
|
|||
fi
|
||||
|
||||
if [[ ! -f $tool_file_path ]]; then
|
||||
echo "Specified tool file path:'$tool_file_path' does not exist" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
|
4
eng/common/native/install-cmake-test.sh
Normal file → Executable file
4
eng/common/native/install-cmake-test.sh
Normal file → Executable file
|
@ -101,7 +101,7 @@ fi
|
|||
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Installation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -110,7 +110,7 @@ fi
|
|||
NewScriptShim $shim_path $tool_file_path true
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Shim generation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ fi
|
|||
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Installation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -110,7 +110,7 @@ fi
|
|||
NewScriptShim $shim_path $tool_file_path true
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Shim generation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@ Param (
|
|||
[int] $RetryWaitTimeInSeconds = 30
|
||||
)
|
||||
|
||||
. $PSScriptRoot\..\pipeline-logging-functions.ps1
|
||||
|
||||
# Import common library modules
|
||||
Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1")
|
||||
|
||||
|
@ -93,7 +95,7 @@ try {
|
|||
-Verbose:$Verbose
|
||||
|
||||
if ($InstallStatus -Eq $False) {
|
||||
Write-Error "Installation failed"
|
||||
Write-PipelineTelemetryError "Installation failed" -Category "NativeToolsetBootstrapping"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +105,7 @@ try {
|
|||
Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))"
|
||||
exit 1
|
||||
} elseif (@($ToolFilePath).Length -Lt 1) {
|
||||
Write-Error "$ToolName was not found in $ToolFilePath."
|
||||
Write-Host "$ToolName was not found in $ToolFilePath."
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -117,14 +119,14 @@ try {
|
|||
-Verbose:$Verbose
|
||||
|
||||
if ($GenerateShimStatus -Eq $False) {
|
||||
Write-Error "Generate shim failed"
|
||||
Write-PipelineTelemetryError "Generate shim failed" -Category "NativeToolsetBootstrapping"
|
||||
return 1
|
||||
}
|
||||
|
||||
exit 0
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category "NativeToolsetBootstrapping" -Message $_
|
||||
exit 1
|
||||
}
|
||||
|
|
|
@ -9,12 +9,12 @@ Param(
|
|||
[string] $Branch=$env:BUILD_SOURCEBRANCH,
|
||||
[string] $CommitSha=$env:BUILD_SOURCEVERSION,
|
||||
[string] $BuildNumber=$env:BUILD_BUILDNUMBER,
|
||||
[string] $RunCategories="coreclr corefx",
|
||||
[string] $RunCategories="Libraries Runtime",
|
||||
[string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj",
|
||||
[string] $Kind="micro",
|
||||
[switch] $Internal,
|
||||
[switch] $Compare,
|
||||
[string] $Configurations="CompilationMode=$CompilationMode"
|
||||
[string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind"
|
||||
)
|
||||
|
||||
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
|
||||
|
@ -49,7 +49,8 @@ if ($Internal) {
|
|||
$HelixSourcePrefix = "official"
|
||||
}
|
||||
|
||||
$CommonSetupArguments="--frameworks $Framework --queue $Queue --build-number $BuildNumber --build-configs $Configurations"
|
||||
# FIX ME: This is a workaround until we get this from the actual pipeline
|
||||
$CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture"
|
||||
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
|
||||
|
||||
if ($RunFromPerformanceRepo) {
|
||||
|
|
|
@ -13,9 +13,9 @@ build_number=$BUILD_BUILDNUMBER
|
|||
internal=false
|
||||
compare=false
|
||||
kind="micro"
|
||||
run_categories="coreclr corefx"
|
||||
run_categories="Libraries Runtime"
|
||||
csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
|
||||
configurations=
|
||||
configurations="CompliationMode=$compilation_mode RunKind=$kind"
|
||||
run_from_perf_repo=false
|
||||
use_core_run=true
|
||||
use_baseline_core_run=true
|
||||
|
@ -164,7 +164,7 @@ if [[ "$internal" == true ]]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
common_setup_arguments="--frameworks $framework --queue $queue --build-number $build_number --build-configs $configurations"
|
||||
common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture"
|
||||
setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
|
||||
|
||||
if [[ "$run_from_perf_repo" = true ]]; then
|
||||
|
|
|
@ -12,6 +12,7 @@ $script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"
|
|||
# TODO: BUG: Escape % ???
|
||||
# TODO: Add test to verify don't need to escape "=".
|
||||
|
||||
# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
|
||||
function Write-PipelineTelemetryError {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
|
@ -25,49 +26,53 @@ function Write-PipelineTelemetryError {
|
|||
[string]$SourcePath,
|
||||
[string]$LineNumber,
|
||||
[string]$ColumnNumber,
|
||||
[switch]$AsOutput)
|
||||
[switch]$AsOutput,
|
||||
[switch]$Force)
|
||||
|
||||
$PSBoundParameters.Remove("Category") | Out-Null
|
||||
$PSBoundParameters.Remove('Category') | Out-Null
|
||||
|
||||
$Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message"
|
||||
$PSBoundParameters.Remove("Message") | Out-Null
|
||||
$PSBoundParameters.Add("Message", $Message)
|
||||
|
||||
$PSBoundParameters.Remove('Message') | Out-Null
|
||||
$PSBoundParameters.Add('Message', $Message)
|
||||
Write-PipelineTaskError @PSBoundParameters
|
||||
}
|
||||
|
||||
# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
|
||||
function Write-PipelineTaskError {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Message,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$Type = 'error',
|
||||
[string]$ErrCode,
|
||||
[string]$SourcePath,
|
||||
[string]$LineNumber,
|
||||
[string]$ColumnNumber,
|
||||
[switch]$AsOutput)
|
||||
|
||||
if(!$ci) {
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Message,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$Type = 'error',
|
||||
[string]$ErrCode,
|
||||
[string]$SourcePath,
|
||||
[string]$LineNumber,
|
||||
[string]$ColumnNumber,
|
||||
[switch]$AsOutput,
|
||||
[switch]$Force
|
||||
)
|
||||
|
||||
if(!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) {
|
||||
if($Type -eq 'error') {
|
||||
Write-Host $Message -ForegroundColor Red
|
||||
return
|
||||
Write-Host $Message -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
elseif ($Type -eq 'warning') {
|
||||
Write-Host $Message -ForegroundColor Yellow
|
||||
return
|
||||
Write-Host $Message -ForegroundColor Yellow
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
|
||||
Write-Host $Message
|
||||
return
|
||||
}
|
||||
if(-not $PSBoundParameters.ContainsKey('Type')) {
|
||||
$PSBoundParameters.Add('Type', 'error')
|
||||
}
|
||||
Write-LogIssue @PSBoundParameters
|
||||
}
|
||||
|
||||
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
|
||||
Write-Host $Message
|
||||
return
|
||||
}
|
||||
$PSBoundParameters.Remove('Force') | Out-Null
|
||||
if(-not $PSBoundParameters.ContainsKey('Type')) {
|
||||
$PSBoundParameters.Add('Type', 'error')
|
||||
}
|
||||
Write-LogIssue @PSBoundParameters
|
||||
}
|
||||
|
||||
function Write-PipelineSetVariable {
|
||||
|
@ -80,7 +85,7 @@ function Write-PipelineTaskError {
|
|||
[switch]$AsOutput,
|
||||
[bool]$IsMultiJobVariable=$true)
|
||||
|
||||
if($ci) {
|
||||
if((Test-Path variable:ci) -And $ci) {
|
||||
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
|
||||
'variable' = $Name
|
||||
'isSecret' = $Secret
|
||||
|
@ -95,7 +100,8 @@ function Write-PipelineTaskError {
|
|||
[Parameter(Mandatory=$true)]
|
||||
[string]$Path,
|
||||
[switch]$AsOutput)
|
||||
if($ci) {
|
||||
|
||||
if((Test-Path variable:ci) -And $ci) {
|
||||
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
|
||||
}
|
||||
}
|
||||
|
@ -231,4 +237,4 @@ function Write-LogIssue {
|
|||
}
|
||||
|
||||
Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
function Write-PipelineTelemetryError {
|
||||
local telemetry_category=''
|
||||
local force=false
|
||||
local function_args=()
|
||||
local message=''
|
||||
while [[ $# -gt 0 ]]; do
|
||||
|
@ -11,6 +12,9 @@ function Write-PipelineTelemetryError {
|
|||
telemetry_category=$2
|
||||
shift
|
||||
;;
|
||||
-force|-f)
|
||||
force=true
|
||||
;;
|
||||
-*)
|
||||
function_args+=("$1 $2")
|
||||
shift
|
||||
|
@ -22,19 +26,22 @@ function Write-PipelineTelemetryError {
|
|||
shift
|
||||
done
|
||||
|
||||
if [[ "$ci" != true ]]; then
|
||||
if [[ $force != true ]] && [[ "$ci" != true ]]; then
|
||||
echo "$message" >&2
|
||||
return
|
||||
fi
|
||||
|
||||
message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message"
|
||||
function_args+=("$message")
|
||||
if [[ $force == true ]]; then
|
||||
function_args+=("-force")
|
||||
fi
|
||||
|
||||
Write-PipelineTaskError $function_args
|
||||
}
|
||||
|
||||
function Write-PipelineTaskError {
|
||||
if [[ "$ci" != true ]]; then
|
||||
if [[ $force != true ]] && [[ "$ci" != true ]]; then
|
||||
echo "$@" >&2
|
||||
return
|
||||
fi
|
||||
|
|
|
@ -2,26 +2,26 @@ param(
|
|||
[Parameter(Mandatory=$true)][int] $BuildId,
|
||||
[Parameter(Mandatory=$true)][int] $ChannelId,
|
||||
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
try {
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
# Check that the channel we are going to promote the build to exist
|
||||
$channelInfo = Get-MaestroChannel -ChannelId $ChannelId
|
||||
|
||||
if (!$channelInfo) {
|
||||
Write-Host "Channel with BAR ID $ChannelId was not found in BAR!"
|
||||
Write-PipelineTelemetryCategory -Category 'PromoteBuild' -Message "Channel with BAR ID $ChannelId was not found in BAR!"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
# Get info about which channels the build has already been promoted to
|
||||
# Get info about which channel(s) the build has already been promoted to
|
||||
$buildInfo = Get-MaestroBuild -BuildId $BuildId
|
||||
|
||||
if (!$buildInfo) {
|
||||
Write-Host "Build with BAR ID $BuildId was not found in BAR!"
|
||||
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "Build with BAR ID $BuildId was not found in BAR!"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,10 @@ try {
|
|||
|
||||
Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId
|
||||
|
||||
Write-Host "done."
|
||||
Write-Host 'done.'
|
||||
}
|
||||
catch {
|
||||
Write-Host "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
|
||||
Write-Host $_
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
|
||||
ExitWithExitCode 1
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
param(
|
||||
[Parameter(Mandatory=$true)][int] $BarBuildId, # ID of the build which assets should be downloaded
|
||||
[Parameter(Mandatory=$true)][string] $DropLocation, # Where the assets should be downloaded to
|
||||
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, # Token used to access Maestro API
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com", # Maestro API URL
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16" # Version of Maestro API to use
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
try {
|
||||
Write-Host "Installing DARC ..."
|
||||
|
||||
. $PSScriptRoot\..\darc-init.ps1
|
||||
$exitCode = $LASTEXITCODE
|
||||
|
||||
if ($exitCode -ne 0) {
|
||||
Write-PipelineTaskError "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..."
|
||||
ExitWithExitCode $exitCode
|
||||
}
|
||||
|
||||
# For now, only use a dry run.
|
||||
# Ideally we would change darc to enable a quick request that
|
||||
# would check whether the file exists that you can download it,
|
||||
# and that it won't conflict with other files.
|
||||
# https://github.com/dotnet/arcade/issues/3674
|
||||
# Right now we can't remove continue-on-error because we ocassionally will have
|
||||
# dependencies that have no associated builds (e.g. an old dependency).
|
||||
# We need to add an option to baseline specific dependencies away, or add them manually
|
||||
# to the BAR.
|
||||
darc gather-drop --non-shipping `
|
||||
--dry-run `
|
||||
--continue-on-error `
|
||||
--id $BarBuildId `
|
||||
--output-dir $DropLocation `
|
||||
--bar-uri $MaestroApiEndpoint `
|
||||
--password $MaestroApiAccessToken `
|
||||
--latest-location
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
ExitWithExitCode 1
|
||||
}
|
|
@ -6,20 +6,19 @@ param(
|
|||
[Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
try {
|
||||
$url = "https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1"
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
New-Item -ItemType "directory" -Path ${ToolDestinationPath} -Force
|
||||
$url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/3e25ad135146676bcab0050a516939d9958bfa5d/src/VerifyMicrosoftPackage/verify.ps1'
|
||||
|
||||
New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force
|
||||
|
||||
Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1
|
||||
|
||||
& ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTaskError "NuGet package validation failed. Please check error logs."
|
||||
Write-Host $_
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
# Most of the functions in this file require the variables `MaestroApiEndPoint`,
|
||||
# `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available.
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
# `tools.ps1` checks $ci to perform some actions. Since the post-build
|
||||
# scripts don't necessarily execute in the same agent that run the
|
||||
# build.ps1/sh script this variable isn't automatically set.
|
||||
$ci = $true
|
||||
$disableConfigureToolsetImport = $true
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
function Create-MaestroApiRequestHeaders([string]$ContentType = "application/json") {
|
||||
function Create-MaestroApiRequestHeaders([string]$ContentType = 'application/json') {
|
||||
Validate-MaestroVars
|
||||
|
||||
$headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
|
||||
|
@ -50,14 +51,6 @@ function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) {
|
|||
return $result
|
||||
}
|
||||
|
||||
function Trigger-Subscription([string]$SubscriptionId) {
|
||||
Validate-MaestroVars
|
||||
|
||||
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
|
||||
$apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion"
|
||||
Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
|
||||
}
|
||||
|
||||
function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
|
||||
Validate-MaestroVars
|
||||
|
||||
|
@ -66,24 +59,32 @@ function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
|
|||
Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
|
||||
}
|
||||
|
||||
function Trigger-Subscription([string]$SubscriptionId) {
|
||||
Validate-MaestroVars
|
||||
|
||||
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
|
||||
$apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion"
|
||||
Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
|
||||
}
|
||||
|
||||
function Validate-MaestroVars {
|
||||
try {
|
||||
Get-Variable MaestroApiEndPoint -Scope Global | Out-Null
|
||||
Get-Variable MaestroApiVersion -Scope Global | Out-Null
|
||||
Get-Variable MaestroApiAccessToken -Scope Global | Out-Null
|
||||
|
||||
if (!($MaestroApiEndPoint -Match "^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$")) {
|
||||
Write-PipelineTaskError "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'"
|
||||
if (!($MaestroApiEndPoint -Match '^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$')) {
|
||||
Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if (!($MaestroApiVersion -Match "^[0-9]{4}-[0-9]{2}-[0-9]{2}$")) {
|
||||
Write-PipelineTaskError "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
|
||||
if (!($MaestroApiVersion -Match '^[0-9]{4}-[0-9]{2}-[0-9]{2}$')) {
|
||||
Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTaskError "Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script."
|
||||
Write-PipelineTelemetryError -Category 'MaestroVars' -Message 'Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script.'
|
||||
Write-Host $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
param(
|
||||
[Parameter(Mandatory=$true)][string] $ReleaseConfigsPath # Full path to ReleaseConfigs.txt asset
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
try {
|
||||
$Content = Get-Content $ReleaseConfigsPath
|
||||
|
||||
$BarId = $Content | Select -Index 0
|
||||
|
||||
$Channels = ""
|
||||
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
|
||||
|
||||
$IsStableBuild = $Content | Select -Index 2
|
||||
|
||||
Write-PipelineSetVariable -Name 'BARBuildId' -Value $BarId
|
||||
Write-PipelineSetVariable -Name 'InitialChannels' -Value "$Channels"
|
||||
Write-PipelineSetVariable -Name 'IsStableBuild' -Value $IsStableBuild
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
ExitWithExitCode 1
|
||||
}
|
|
@ -34,9 +34,9 @@ $ValidatePackage = {
|
|||
|
||||
# Extensions for which we'll look for SourceLink information
|
||||
# For now we'll only care about Portable & Embedded PDBs
|
||||
$RelevantExtensions = @(".dll", ".exe", ".pdb")
|
||||
$RelevantExtensions = @('.dll', '.exe', '.pdb')
|
||||
|
||||
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
|
||||
Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
|
@ -58,7 +58,7 @@ $ValidatePackage = {
|
|||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
|
||||
|
||||
# We ignore resource DLLs
|
||||
if ($FileName.EndsWith(".resources.dll")) {
|
||||
if ($FileName.EndsWith('.resources.dll')) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ $ValidatePackage = {
|
|||
$Uri = $Link -as [System.URI]
|
||||
|
||||
# Only GitHub links are valid
|
||||
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match "github" -or $Uri.Host -match "githubusercontent")) {
|
||||
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
|
||||
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
|
||||
}
|
||||
else {
|
||||
|
@ -143,19 +143,19 @@ $ValidatePackage = {
|
|||
}
|
||||
|
||||
if ($FailedFiles -eq 0) {
|
||||
Write-Host "Passed."
|
||||
Write-Host 'Passed.'
|
||||
return 0
|
||||
}
|
||||
else {
|
||||
Write-Host "$PackagePath has broken SourceLink links."
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links."
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
function ValidateSourceLinkLinks {
|
||||
if ($GHRepoName -ne "" -and !($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
|
||||
if (!($GHRepoName -Match "^[^\s-]+-[^\s]+$")) {
|
||||
Write-PipelineTaskError "GHRepoName should be in the format <org>/<repo> or <org>-<repo>. '$GHRepoName'"
|
||||
if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) {
|
||||
if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) {
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format <org>/<repo> or <org>-<repo>. '$GHRepoName'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
|
@ -163,14 +163,14 @@ function ValidateSourceLinkLinks {
|
|||
}
|
||||
}
|
||||
|
||||
if ($GHCommit -ne "" -and !($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
|
||||
Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
|
||||
if ($GHCommit -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) {
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if ($GHRepoName -ne "" -and $GHCommit -ne "") {
|
||||
$RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
|
||||
$CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
|
||||
if ($GHRepoName -ne '' -and $GHCommit -ne '') {
|
||||
$RepoTreeURL = -Join('http://api.github.com/repos/', $GHRepoName, '/git/trees/', $GHCommit, '?recursive=1')
|
||||
$CodeExtensions = @('.cs', '.vb', '.fs', '.fsi', '.fsx', '.fsscript')
|
||||
|
||||
try {
|
||||
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
|
||||
|
@ -188,8 +188,8 @@ function ValidateSourceLinkLinks {
|
|||
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching."
|
||||
}
|
||||
}
|
||||
elseif ($GHRepoName -ne "" -or $GHCommit -ne "") {
|
||||
Write-Host "For using the http caching mechanism both GHRepoName and GHCommit should be informed."
|
||||
elseif ($GHRepoName -ne '' -or $GHCommit -ne '') {
|
||||
Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.'
|
||||
}
|
||||
|
||||
if (Test-Path $ExtractPath) {
|
||||
|
@ -217,18 +217,18 @@ function ValidateSourceLinkLinks {
|
|||
$ValidationFailures = 0
|
||||
foreach ($Job in @(Get-Job)) {
|
||||
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
|
||||
if ($jobResult -ne "0") {
|
||||
if ($jobResult -ne '0') {
|
||||
$ValidationFailures++
|
||||
}
|
||||
}
|
||||
if ($ValidationFailures -gt 0) {
|
||||
Write-PipelineTaskError " $ValidationFailures package(s) failed validation."
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
|
||||
function InstallSourcelinkCli {
|
||||
$sourcelinkCliPackageName = "sourcelink"
|
||||
$sourcelinkCliPackageName = 'sourcelink'
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
|
@ -239,7 +239,7 @@ function InstallSourcelinkCli {
|
|||
}
|
||||
else {
|
||||
Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
|
||||
& "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global
|
||||
}
|
||||
}
|
||||
|
@ -250,8 +250,8 @@ try {
|
|||
ValidateSourceLinkLinks
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
|
|
@ -4,10 +4,6 @@ param(
|
|||
[Parameter(Mandatory=$true)][string] $DotnetSymbolVersion # Version of dotnet symbol to use
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
function FirstMatchingSymbolDescriptionOrDefault {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
|
@ -23,19 +19,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
|
|||
# checking and which type of file was uploaded.
|
||||
|
||||
# The file itself is returned
|
||||
$SymbolPath = $SymbolsPath + "\" + $FileName
|
||||
$SymbolPath = $SymbolsPath + '\' + $FileName
|
||||
|
||||
# PDB file for the module
|
||||
$PdbPath = $SymbolPath.Replace($Extension, ".pdb")
|
||||
$PdbPath = $SymbolPath.Replace($Extension, '.pdb')
|
||||
|
||||
# PDB file for R2R module (created by crossgen)
|
||||
$NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
|
||||
$NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')
|
||||
|
||||
# DBG file for a .so library
|
||||
$SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
|
||||
$SODbg = $SymbolPath.Replace($Extension, '.so.dbg')
|
||||
|
||||
# DWARF file for a .dylib
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')
|
||||
|
||||
$dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools"
|
||||
$dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe"
|
||||
|
@ -43,19 +39,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
|
|||
& $dotnetSymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
|
||||
|
||||
if (Test-Path $PdbPath) {
|
||||
return "PDB"
|
||||
return 'PDB'
|
||||
}
|
||||
elseif (Test-Path $NGenPdb) {
|
||||
return "NGen PDB"
|
||||
return 'NGen PDB'
|
||||
}
|
||||
elseif (Test-Path $SODbg) {
|
||||
return "DBG for SO"
|
||||
return 'DBG for SO'
|
||||
}
|
||||
elseif (Test-Path $DylibDwarf) {
|
||||
return "Dwarf for Dylib"
|
||||
return 'Dwarf for Dylib'
|
||||
}
|
||||
elseif (Test-Path $SymbolPath) {
|
||||
return "Module"
|
||||
return 'Module'
|
||||
}
|
||||
else {
|
||||
return $null
|
||||
|
@ -74,7 +70,7 @@ function CountMissingSymbols {
|
|||
}
|
||||
|
||||
# Extensions for which we'll look for symbols
|
||||
$RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
|
||||
$RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')
|
||||
|
||||
# How many files are missing symbol information
|
||||
$MissingSymbols = 0
|
||||
|
@ -82,38 +78,38 @@ function CountMissingSymbols {
|
|||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$PackageGuid = New-Guid
|
||||
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
|
||||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
|
||||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'
|
||||
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
|
||||
|
||||
Get-ChildItem -Recurse $ExtractPath |
|
||||
Where-Object {$RelevantExtensions -contains $_.Extension} |
|
||||
ForEach-Object {
|
||||
if ($_.FullName -Match "\\ref\\") {
|
||||
Write-Host "`t Ignoring reference assembly file" $_.FullName
|
||||
if ($_.FullName -Match '\\ref\\') {
|
||||
Write-Host "`t Ignoring reference assembly file " $_.FullName
|
||||
return
|
||||
}
|
||||
|
||||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
|
||||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
|
||||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--microsoft-symbol-server' $SymbolsPath
|
||||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--internal-server' $SymbolsPath
|
||||
|
||||
Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
|
||||
Write-Host -NoNewLine "`t Checking file " $_.FullName "... "
|
||||
|
||||
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
|
||||
Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
|
||||
Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)"
|
||||
}
|
||||
else {
|
||||
$MissingSymbols++
|
||||
|
||||
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
|
||||
Write-Host "No symbols found on MSDL or SymWeb!"
|
||||
Write-Host 'No symbols found on MSDL or SymWeb!'
|
||||
}
|
||||
else {
|
||||
if ($SymbolsOnMSDL -eq $null) {
|
||||
Write-Host "No symbols found on MSDL!"
|
||||
Write-Host 'No symbols found on MSDL!'
|
||||
}
|
||||
else {
|
||||
Write-Host "No symbols found on SymWeb!"
|
||||
Write-Host 'No symbols found on SymWeb!'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -132,27 +128,27 @@ function CheckSymbolsAvailable {
|
|||
Get-ChildItem "$InputPath\*.nupkg" |
|
||||
ForEach-Object {
|
||||
$FileName = $_.Name
|
||||
|
||||
|
||||
# These packages from Arcade-Services include some native libraries that
|
||||
# our current symbol uploader can't handle. Below is a workaround until
|
||||
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
|
||||
if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
|
||||
if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
|
||||
elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Write-Host "Validating $FileName "
|
||||
$Status = CountMissingSymbols "$InputPath\$FileName"
|
||||
|
||||
|
||||
if ($Status -ne 0) {
|
||||
Write-PipelineTaskError "Missing symbols for $Status modules in the package $FileName"
|
||||
ExitWithExitCode $exitCode
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName"
|
||||
ExitWithExitCode $exitCode
|
||||
}
|
||||
|
||||
Write-Host
|
||||
|
@ -160,7 +156,7 @@ function CheckSymbolsAvailable {
|
|||
}
|
||||
|
||||
function InstallDotnetSymbol {
|
||||
$dotnetSymbolPackageName = "dotnet-symbol"
|
||||
$dotnetSymbolPackageName = 'dotnet-symbol'
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
|
@ -171,19 +167,22 @@ function InstallDotnetSymbol {
|
|||
}
|
||||
else {
|
||||
Write-Host "Installing dotnet-symbol version $dotnetSymbolVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
|
||||
& "$dotnet" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity "minimal" --global
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
InstallDotnetSymbol
|
||||
|
||||
CheckSymbolsAvailable
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
|
|
@ -2,56 +2,63 @@ param(
|
|||
[Parameter(Mandatory=$true)][string] $SourceRepo,
|
||||
[Parameter(Mandatory=$true)][int] $ChannelId,
|
||||
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
try {
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
# Get all the $SourceRepo subscriptions
|
||||
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
|
||||
$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
|
||||
# Get all the $SourceRepo subscriptions
|
||||
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
|
||||
$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
|
||||
|
||||
if (!$subscriptions) {
|
||||
Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
if (!$subscriptions) {
|
||||
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
|
||||
$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
|
||||
$failedTriggeredSubscription = $false
|
||||
$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
|
||||
$failedTriggeredSubscription = $false
|
||||
|
||||
# Get all enabled subscriptions that need dependency flow on 'everyBuild'
|
||||
foreach ($subscription in $subscriptions) {
|
||||
if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
|
||||
Write-Host "Should trigger this subscription: $subscription.id"
|
||||
[void]$subscriptionsToTrigger.Add($subscription.id)
|
||||
# Get all enabled subscriptions that need dependency flow on 'everyBuild'
|
||||
foreach ($subscription in $subscriptions) {
|
||||
if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
|
||||
Write-Host "Should trigger this subscription: ${$subscription.id}"
|
||||
[void]$subscriptionsToTrigger.Add($subscription.id)
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
|
||||
try {
|
||||
Write-Host "Triggering subscription '$subscriptionToTrigger'."
|
||||
|
||||
Trigger-Subscription -SubscriptionId $subscriptionToTrigger
|
||||
|
||||
Write-Host 'done.'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
|
||||
Write-Host $_
|
||||
Write-Host $_.ScriptStackTrace
|
||||
$failedTriggeredSubscription = $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($subscriptionsToTrigger.Count -eq 0) {
|
||||
Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
|
||||
}
|
||||
elseif ($failedTriggeredSubscription) {
|
||||
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message 'At least one subscription failed to be triggered...'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
Write-Host 'All subscriptions were triggered successfully!'
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
|
||||
try {
|
||||
Write-Host "Triggering subscription '$subscriptionToTrigger'."
|
||||
|
||||
Trigger-Subscription -SubscriptionId $subscriptionToTrigger
|
||||
|
||||
Write-Host "done."
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
|
||||
Write-Host $_
|
||||
Write-Host $_.ScriptStackTrace
|
||||
$failedTriggeredSubscription = $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($subscriptionsToTrigger.Count -eq 0) {
|
||||
Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
|
||||
}
|
||||
elseif ($failedTriggeredSubscription) {
|
||||
Write-Host "At least one subscription failed to be triggered..."
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
Write-Host "All subscriptions were triggered successfully!"
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string] $configuration = "Debug",
|
||||
[string] $configuration = 'Debug',
|
||||
[string] $task,
|
||||
[string] $verbosity = "minimal",
|
||||
[string] $verbosity = 'minimal',
|
||||
[string] $msbuildEngine = $null,
|
||||
[switch] $restore,
|
||||
[switch] $prepareMachine,
|
||||
|
@ -32,7 +32,7 @@ function Print-Usage() {
|
|||
}
|
||||
|
||||
function Build([string]$target) {
|
||||
$logSuffix = if ($target -eq "Execute") { "" } else { ".$target" }
|
||||
$logSuffix = if ($target -eq 'Execute') { '' } else { ".$target" }
|
||||
$log = Join-Path $LogDir "$task$logSuffix.binlog"
|
||||
$outputPath = Join-Path $ToolsetDir "$task\\"
|
||||
|
||||
|
@ -46,33 +46,32 @@ function Build([string]$target) {
|
|||
}
|
||||
|
||||
try {
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
|
||||
Print-Usage
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($task -eq "") {
|
||||
Write-Host "Missing required parameter '-task <value>'" -ForegroundColor Red
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Missing required parameter '-task <value>'" -ForegroundColor Red
|
||||
Print-Usage
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$taskProject = GetSdkTaskProject $task
|
||||
if (!(Test-Path $taskProject)) {
|
||||
Write-Host "Unknown task: $task" -ForegroundColor Red
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Unknown task: $task" -ForegroundColor Red
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if ($restore) {
|
||||
Build "Restore"
|
||||
Build 'Restore'
|
||||
}
|
||||
|
||||
Build "Execute"
|
||||
Build 'Execute'
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
|
|
@ -1,100 +1,110 @@
|
|||
Param(
|
||||
[string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified)
|
||||
[string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified)
|
||||
[string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified
|
||||
[string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade)
|
||||
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
|
||||
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
|
||||
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_SOURCESDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located
|
||||
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
|
||||
[string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code
|
||||
[string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts
|
||||
[bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber)
|
||||
[bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed
|
||||
[bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
|
||||
[string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1")
|
||||
[string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
|
||||
[string] $GuardianPackageName, # Required: the name of guardian CLI package (not needed if GuardianCliLocation is specified)
|
||||
[string] $NugetPackageDirectory, # Required: directory where NuGet packages are installed (not needed if GuardianCliLocation is specified)
|
||||
[string] $GuardianCliLocation, # Optional: Direct location of Guardian CLI executable if GuardianPackageName & NugetPackageDirectory are not specified
|
||||
[string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade)
|
||||
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
|
||||
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
|
||||
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located
|
||||
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
|
||||
[string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code
|
||||
[string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts
|
||||
[bool] $TsaPublish=$False, # Optional: true will publish results to TSA; only set to true after onboarding to TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaBranchName=$env:BUILD_SOURCEBRANCH, # Optional: required for TSA publish; defaults to $(Build.SourceBranchName); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaRepositoryName=$env:BUILD_REPOSITORY_NAME, # Optional: TSA repository name; will be generated automatically if not submitted; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $BuildNumber=$env:BUILD_BUILDNUMBER, # Optional: required for TSA publish; defaults to $(Build.BuildNumber)
|
||||
[bool] $UpdateBaseline=$False, # Optional: if true, will update the baseline in the repository; should only be run after fixing any issues which need to be fixed
|
||||
[bool] $TsaOnboard=$False, # Optional: if true, will onboard the repository to TSA; should only be run once; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaInstanceUrl, # Optional: only needed if TsaOnboard or TsaPublish is true; the instance-url registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaCodebaseName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the codebase registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaProjectName, # Optional: only needed if TsaOnboard or TsaPublish is true; the name of the project registered with TSA; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaNotificationEmail, # Optional: only needed if TsaOnboard is true; the email(s) which will receive notifications of TSA bug filings (e.g. alias@microsoft.com); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
|
||||
[string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1")
|
||||
[string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
$LASTEXITCODE = 0
|
||||
try {
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
#Replace repo names to the format of org/repo
|
||||
if (!($Repository.contains('/'))) {
|
||||
$RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
#Replace repo names to the format of org/repo
|
||||
if (!($Repository.contains('/'))) {
|
||||
$RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
|
||||
}
|
||||
else{
|
||||
$RepoName = $Repository;
|
||||
}
|
||||
|
||||
if ($GuardianPackageName) {
|
||||
$guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd'))
|
||||
} else {
|
||||
$guardianCliLocation = $GuardianCliLocation
|
||||
}
|
||||
|
||||
$workingDirectory = (Split-Path $SourceDirectory -Parent)
|
||||
$ValidPath = Test-Path $guardianCliLocation
|
||||
|
||||
if ($ValidPath -eq $False)
|
||||
{
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
|
||||
$gdnFolder = Join-Path $workingDirectory '.gdn'
|
||||
|
||||
if ($TsaOnboard) {
|
||||
if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
|
||||
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
|
||||
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
|
||||
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
}
|
||||
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
|
||||
& $(Join-Path $PSScriptRoot 'run-sdl.ps1') -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
}
|
||||
|
||||
if ($UpdateBaseline) {
|
||||
& (Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Update baseline'
|
||||
}
|
||||
|
||||
if ($TsaPublish) {
|
||||
if ($TsaBranchName -and $BuildNumber) {
|
||||
if (-not $TsaRepositoryName) {
|
||||
$TsaRepositoryName = "$($Repository)-$($BranchName)"
|
||||
}
|
||||
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
$RepoName = $Repository;
|
||||
}
|
||||
|
||||
if ($GuardianPackageName) {
|
||||
$guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path "tools" "guardian.cmd"))
|
||||
} else {
|
||||
$guardianCliLocation = $GuardianCliLocation
|
||||
}
|
||||
|
||||
$workingDirectory = (Split-Path $SourceDirectory -Parent)
|
||||
$ValidPath = Test-Path $guardianCliLocation
|
||||
|
||||
if ($ValidPath -eq $False)
|
||||
{
|
||||
Write-Host "Invalid Guardian CLI Location."
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
|
||||
exit 1
|
||||
}
|
||||
|
||||
& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
|
||||
$gdnFolder = Join-Path $workingDirectory ".gdn"
|
||||
|
||||
if ($TsaOnboard) {
|
||||
if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
|
||||
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
} else {
|
||||
Write-Host "Could not onboard to TSA -- not all required values ($$TsaCodebaseName, $$TsaNotificationEmail, $$TsaCodebaseAdmin, $$TsaBugAreaPath) were specified."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
}
|
||||
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
}
|
||||
|
||||
if ($UpdateBaseline) {
|
||||
& (Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Update baseline"
|
||||
}
|
||||
|
||||
if ($TsaPublish) {
|
||||
if ($TsaBranchName -and $BuildNumber) {
|
||||
if (-not $TsaRepositoryName) {
|
||||
$TsaRepositoryName = "$($Repository)-$($BranchName)"
|
||||
}
|
||||
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian tsa-publish failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
} else {
|
||||
Write-Host "Could not publish to TSA -- not all required values ($$TsaBranchName, $$BuildNumber) were specified."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,54 +3,16 @@ param(
|
|||
[Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
# `tools.ps1` checks $ci to perform some actions. Since the post-build
|
||||
# scripts don't necessarily execute in the same agent that run the
|
||||
# build.ps1/sh script this variable isn't automatically set.
|
||||
$ci = $true
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
$disableConfigureToolsetImport = $true
|
||||
|
||||
$ExtractPackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a NuGet package
|
||||
)
|
||||
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
Write-PipelineTaskError "Input file does not exist: $PackagePath"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$RelevantExtensions = @(".dll", ".exe", ".pdb")
|
||||
Write-Host -NoNewLine "Extracting" ([System.IO.Path]::GetFileName($PackagePath)) "... "
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
try {
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
|
||||
$zip.Entries |
|
||||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
|
||||
ForEach-Object {
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
|
||||
|
||||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
||||
}
|
||||
finally {
|
||||
$zip.Dispose()
|
||||
}
|
||||
}
|
||||
function ExtractArtifacts {
|
||||
function ExtractArtifacts {
|
||||
if (!(Test-Path $InputPath)) {
|
||||
Write-Host "Input Path does not exist: $InputPath"
|
||||
ExitWithExitCode 0
|
||||
|
@ -67,11 +29,52 @@ $ExtractPackage = {
|
|||
}
|
||||
|
||||
try {
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
$ExtractPackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a NuGet package
|
||||
)
|
||||
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$RelevantExtensions = @('.dll', '.exe', '.pdb')
|
||||
Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
try {
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
|
||||
$zip.Entries |
|
||||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
|
||||
ForEach-Object {
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
|
||||
|
||||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
finally {
|
||||
$zip.Dispose()
|
||||
}
|
||||
}
|
||||
Measure-Command { ExtractArtifacts }
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
|
|
@ -1,16 +1,19 @@
|
|||
Param(
|
||||
[string] $GuardianCliLocation,
|
||||
[string] $Repository,
|
||||
[string] $BranchName="master",
|
||||
[string] $BranchName='master',
|
||||
[string] $WorkingDirectory,
|
||||
[string] $AzureDevOpsAccessToken,
|
||||
[string] $GuardianLoggerLevel="Standard"
|
||||
[string] $GuardianLoggerLevel='Standard'
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
# Don't display the console progress UI - it's a huge perf hit
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
|
@ -21,11 +24,10 @@ $uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cf
|
|||
$zipFile = "$WorkingDirectory/gdn.zip"
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
$gdnFolder = (Join-Path $WorkingDirectory ".gdn")
|
||||
Try
|
||||
{
|
||||
$gdnFolder = (Join-Path $WorkingDirectory '.gdn')
|
||||
try {
|
||||
# We try to download the zip; if the request fails (e.g. the file doesn't exist), we catch it and init guardian instead
|
||||
Write-Host "Downloading gdn folder from internal config repostiory..."
|
||||
Write-Host 'Downloading gdn folder from internal config repostiory...'
|
||||
Invoke-WebRequest -Headers @{ "Accept"="application/zip"; "Authorization"="Basic $encodedPat" } -Uri $uri -OutFile $zipFile
|
||||
if (Test-Path $gdnFolder) {
|
||||
# Remove the gdn folder if it exists (it shouldn't unless there's too much caching; this is just in case)
|
||||
|
@ -33,19 +35,29 @@ Try
|
|||
}
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $WorkingDirectory)
|
||||
Write-Host $gdnFolder
|
||||
} Catch [System.Net.WebException] {
|
||||
ExitWithExitCode 0
|
||||
} catch [System.Net.WebException] { } # Catch and ignore webexception
|
||||
try {
|
||||
# if the folder does not exist, we'll do a guardian init and push it to the remote repository
|
||||
Write-Host "Initializing Guardian..."
|
||||
Write-Host 'Initializing Guardian...'
|
||||
Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Guardian init failed with exit code $LASTEXITCODE."
|
||||
Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
# We create the mainbaseline so it can be edited later
|
||||
Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline"
|
||||
& $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Guardian baseline failed with exit code $LASTEXITCODE."
|
||||
Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
& $(Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Initialize gdn folder"
|
||||
}
|
||||
& $(Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Initialize gdn folder'
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
|
|
@ -1,51 +1,65 @@
|
|||
Param(
|
||||
[string] $Repository,
|
||||
[string] $BranchName="master",
|
||||
[string] $BranchName='master',
|
||||
[string] $GdnFolder,
|
||||
[string] $AzureDevOpsAccessToken,
|
||||
[string] $PushReason
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
# We create the temp directory where we'll store the sdl-config repository
|
||||
$sdlDir = Join-Path $env:TEMP "sdl"
|
||||
if (Test-Path $sdlDir) {
|
||||
Remove-Item -Force -Recurse $sdlDir
|
||||
}
|
||||
try {
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir"
|
||||
git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Git clone failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
# We copy the .gdn folder from our local run into the git repository so it can be committed
|
||||
$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) ".gdn"
|
||||
if (Get-Command Robocopy) {
|
||||
Robocopy /S $GdnFolder $sdlRepositoryFolder
|
||||
} else {
|
||||
rsync -r $GdnFolder $sdlRepositoryFolder
|
||||
}
|
||||
# cd to the sdl-config directory so we can run git there
|
||||
Push-Location $sdlDir
|
||||
# git add . --> git commit --> git push
|
||||
Write-Host "git add ."
|
||||
git add .
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Git add failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`""
|
||||
git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Git commit failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
Write-Host "git push"
|
||||
git push
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Git push failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
# We create the temp directory where we'll store the sdl-config repository
|
||||
$sdlDir = Join-Path $env:TEMP 'sdl'
|
||||
if (Test-Path $sdlDir) {
|
||||
Remove-Item -Force -Recurse $sdlDir
|
||||
}
|
||||
|
||||
# Return to the original directory
|
||||
Pop-Location
|
||||
Write-Host "git clone https://dnceng:`$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir"
|
||||
git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git clone failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
# We copy the .gdn folder from our local run into the git repository so it can be committed
|
||||
$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) '.gdn'
|
||||
if (Get-Command Robocopy) {
|
||||
Robocopy /S $GdnFolder $sdlRepositoryFolder
|
||||
} else {
|
||||
rsync -r $GdnFolder $sdlRepositoryFolder
|
||||
}
|
||||
# cd to the sdl-config directory so we can run git there
|
||||
Push-Location $sdlDir
|
||||
# git add . --> git commit --> git push
|
||||
Write-Host 'git add .'
|
||||
git add .
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git add failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
Write-Host "git -c user.email=`"dn-bot@microsoft.com`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`""
|
||||
git -c user.email="dn-bot@microsoft.com" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git commit failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
Write-Host 'git push'
|
||||
git push
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git push failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
|
||||
# Return to the original directory
|
||||
Pop-Location
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
|
@ -5,55 +5,65 @@ Param(
|
|||
[string] $GdnFolder,
|
||||
[string[]] $ToolsList,
|
||||
[string] $UpdateBaseline,
|
||||
[string] $GuardianLoggerLevel="Standard",
|
||||
[string] $GuardianLoggerLevel='Standard',
|
||||
[string[]] $CrScanAdditionalRunConfigParams,
|
||||
[string[]] $PoliCheckAdditionalRunConfigParams
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
# We store config files in the r directory of .gdn
|
||||
Write-Host $ToolsList
|
||||
$gdnConfigPath = Join-Path $GdnFolder "r"
|
||||
$ValidPath = Test-Path $GuardianCliLocation
|
||||
try {
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
if ($ValidPath -eq $False)
|
||||
{
|
||||
Write-Host "Invalid Guardian CLI Location."
|
||||
exit 1
|
||||
}
|
||||
# We store config files in the r directory of .gdn
|
||||
Write-Host $ToolsList
|
||||
$gdnConfigPath = Join-Path $GdnFolder 'r'
|
||||
$ValidPath = Test-Path $GuardianCliLocation
|
||||
|
||||
$configParam = @("--config")
|
||||
|
||||
foreach ($tool in $ToolsList) {
|
||||
$gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
|
||||
Write-Host $tool
|
||||
# We have to manually configure tools that run on source to look at the source directory only
|
||||
if ($tool -eq "credscan") {
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
if ($tool -eq "policheck") {
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
if ($ValidPath -eq $False)
|
||||
{
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$configParam+=$gdnConfigFile
|
||||
}
|
||||
$configParam = @('--config')
|
||||
|
||||
Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
|
||||
& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
foreach ($tool in $ToolsList) {
|
||||
$gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
|
||||
Write-Host $tool
|
||||
# We have to manually configure tools that run on source to look at the source directory only
|
||||
if ($tool -eq 'credscan') {
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
if ($tool -eq 'policheck') {
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
|
||||
$configParam+=$gdnConfigFile
|
||||
}
|
||||
|
||||
Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
|
||||
& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
parameters:
|
||||
enable: 'false' # Whether the SDL validation job should execute or not
|
||||
overrideParameters: '' # Optional: to override values for parameters.
|
||||
additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")'
|
||||
# There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named
|
||||
|
@ -16,8 +17,15 @@ jobs:
|
|||
- job: Run_SDL
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
displayName: Run SDL tool
|
||||
condition: eq( ${{ parameters.enable }}, 'true')
|
||||
variables:
|
||||
- group: DotNet-VSTS-Bot
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
name: Hosted VS2017
|
||||
steps:
|
||||
|
@ -28,25 +36,33 @@ jobs:
|
|||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Build Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: ${{ artifactName }}
|
||||
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||
- ${{ if eq(parameters.artifactNames, '') }}:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Build Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: specific files
|
||||
itemPattern: "**"
|
||||
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||
- powershell: eng/common/sdl/extract-artifact-packages.ps1
|
||||
-InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
||||
-ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
||||
-InputPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
|
||||
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\BlobArtifacts
|
||||
displayName: Extract Blob Artifacts
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
- powershell: eng/common/sdl/extract-artifact-packages.ps1
|
||||
-InputPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
|
||||
-ExtractPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
|
||||
-InputPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts
|
||||
-ExtractPath $(Build.ArtifactStagingDirectory)\artifacts\PackageArtifacts
|
||||
displayName: Extract Package Artifacts
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
- task: NuGetToolInstaller@1
|
||||
|
|
|
@ -1,67 +1,33 @@
|
|||
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
|
||||
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
|
||||
|
||||
parameters:
|
||||
# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
|
||||
cancelTimeoutInMinutes: ''
|
||||
|
||||
condition: ''
|
||||
|
||||
continueOnError: false
|
||||
|
||||
container: ''
|
||||
|
||||
continueOnError: false
|
||||
dependsOn: ''
|
||||
|
||||
displayName: ''
|
||||
|
||||
steps: []
|
||||
|
||||
pool: ''
|
||||
|
||||
steps: []
|
||||
strategy: ''
|
||||
|
||||
timeoutInMinutes: ''
|
||||
|
||||
variables: []
|
||||
|
||||
workspace: ''
|
||||
|
||||
# Job base template specific parameters
|
||||
# Optional: Enable installing Microbuild plugin
|
||||
# if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
|
||||
# _TeamName - the name of your team
|
||||
# _SignType - 'test' or 'real'
|
||||
# Job base template specific parameters
|
||||
# See schema documentation - https://github.com/dotnet/arcade/blob/master/Documentation/AzureDevOps/TemplateSchema.md
|
||||
artifacts: ''
|
||||
enableMicrobuild: false
|
||||
|
||||
# Optional: Include PublishBuildArtifacts task
|
||||
enablePublishBuildArtifacts: false
|
||||
|
||||
# Optional: Enable publishing to the build asset registry
|
||||
enablePublishBuildAssets: false
|
||||
|
||||
# Optional: Prevent gather/push manifest from executing when using publishing pipelines
|
||||
enablePublishUsingPipelines: false
|
||||
|
||||
# Optional: Include PublishTestResults task
|
||||
enablePublishTestResults: false
|
||||
|
||||
# Optional: enable sending telemetry
|
||||
enableTelemetry: false
|
||||
|
||||
# Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
|
||||
helixRepo: ''
|
||||
|
||||
# Optional: define the helix type for telemetry (example: 'build/product/')
|
||||
helixType: ''
|
||||
|
||||
# Required: name of the job
|
||||
enablePublishUsingPipelines: false
|
||||
name: ''
|
||||
|
||||
# Optional: should run as a public build even in the internal project
|
||||
# if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
|
||||
preSteps: []
|
||||
runAsPublic: false
|
||||
|
||||
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
|
||||
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.name }}
|
||||
|
||||
|
@ -93,7 +59,7 @@ jobs:
|
|||
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
|
||||
|
||||
variables:
|
||||
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
|
||||
- ${{ if ne(parameters.enableTelemetry, 'false') }}:
|
||||
- name: DOTNET_CLI_TELEMETRY_PROFILE
|
||||
value: '$(Build.Repository.Uri)'
|
||||
- ${{ each variable in parameters.variables }}:
|
||||
|
@ -125,21 +91,12 @@ jobs:
|
|||
workspace: ${{ parameters.workspace }}
|
||||
|
||||
steps:
|
||||
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
|
||||
# Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
|
||||
- task: sendStartTelemetry@0
|
||||
displayName: 'Send Helix Start Telemetry'
|
||||
inputs:
|
||||
helixRepo: ${{ parameters.helixRepo }}
|
||||
${{ if ne(parameters.helixType, '') }}:
|
||||
helixType: ${{ parameters.helixType }}
|
||||
buildConfig: $(_BuildConfig)
|
||||
runAsPublic: ${{ parameters.runAsPublic }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: always()
|
||||
- ${{ if ne(parameters.preSteps, '') }}:
|
||||
- ${{ each preStep in parameters.preSteps }}:
|
||||
- ${{ preStep }}
|
||||
|
||||
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
|
||||
- task: MicroBuildSigningPlugin@2
|
||||
displayName: Install MicroBuild plugin
|
||||
inputs:
|
||||
|
@ -151,9 +108,16 @@ jobs:
|
|||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
|
||||
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: NuGetAuthenticate@0
|
||||
|
||||
- ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }}
|
||||
targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }}
|
||||
itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }}
|
||||
|
||||
- ${{ each step in parameters.steps }}:
|
||||
- ${{ step }}
|
||||
|
||||
|
@ -166,20 +130,60 @@ jobs:
|
|||
env:
|
||||
TeamName: $(_TeamName)
|
||||
|
||||
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
|
||||
# Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
|
||||
- task: sendEndTelemetry@0
|
||||
displayName: 'Send Helix End Telemetry'
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: always()
|
||||
- ${{ if ne(parameters.artifacts.publish, '') }}:
|
||||
- ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}:
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather binaries for publish to artifacts
|
||||
inputs:
|
||||
SourceFolder: 'artifacts/bin'
|
||||
Contents: '**'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin'
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather packages for publish to artifacts
|
||||
inputs:
|
||||
SourceFolder: 'artifacts/packages'
|
||||
Contents: '**'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish pipeline artifacts
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts'
|
||||
PublishLocation: Container
|
||||
ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
- ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}:
|
||||
- publish: artifacts/log
|
||||
artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }}
|
||||
displayName: Publish logs
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
- ${{ if or(eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
|
||||
- ${{ if and(ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather Asset Manifests
|
||||
inputs:
|
||||
SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)/AssetManifests'
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
|
||||
|
||||
- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Push Asset Manifests
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)/AssetManifests'
|
||||
PublishLocation: Container
|
||||
ArtifactName: AssetManifests
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
|
||||
|
||||
- ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}:
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Logs
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
|
||||
PublishLocation: Container
|
||||
ArtifactName: $(Agent.Os)_$(Agent.JobName)
|
||||
ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }}
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
|
||||
|
|
|
@ -1,19 +1,10 @@
|
|||
parameters:
|
||||
# Optional: 'true' if failures in job.yml job should not fail the job
|
||||
# See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
|
||||
continueOnError: false
|
||||
|
||||
# Optional: Enable installing Microbuild plugin
|
||||
# if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
|
||||
# _TeamName - the name of your team
|
||||
# _SignType - 'test' or 'real'
|
||||
enableMicrobuild: false
|
||||
|
||||
# Optional: Include PublishBuildArtifacts task
|
||||
enablePublishBuildArtifacts: false
|
||||
|
||||
# Optional: Enable publishing to the build asset registry
|
||||
enablePublishBuildAssets: false
|
||||
|
||||
# Optional: Enable publishing using release pipelines
|
||||
enablePublishUsingPipelines: false
|
||||
|
||||
|
@ -23,19 +14,9 @@ parameters:
|
|||
# Optional: Include toolset dependencies in the generated graph files
|
||||
includeToolset: false
|
||||
|
||||
# Optional: Include PublishTestResults task
|
||||
enablePublishTestResults: false
|
||||
|
||||
# Optional: enable sending telemetry
|
||||
# if enabled then the 'helixRepo' parameter should also be specified
|
||||
enableTelemetry: false
|
||||
|
||||
# Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
|
||||
jobs: []
|
||||
|
||||
# Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
|
||||
helixRepo: ''
|
||||
|
||||
# Optional: Override automatically derived dependsOn value for "publish build assets" job
|
||||
publishBuildAssetsDependsOn: ''
|
||||
|
||||
|
@ -62,29 +43,30 @@ jobs:
|
|||
|
||||
name: ${{ job.job }}
|
||||
|
||||
- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- template: ../job/publish-build-assets.yml
|
||||
parameters:
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
dependsOn:
|
||||
- ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}:
|
||||
- ${{ each job in parameters.publishBuildAssetsDependsOn }}:
|
||||
- ${{ job.job }}
|
||||
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
|
||||
- ${{ each job in parameters.jobs }}:
|
||||
- ${{ job.job }}
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
runAsPublic: ${{ parameters.runAsPublic }}
|
||||
publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
|
||||
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
|
||||
|
||||
- ${{ if and(eq(parameters.graphFileGeneration.enabled, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- template: ../job/generate-graph-files.yml
|
||||
parameters:
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
includeToolset: ${{ parameters.graphFileGeneration.includeToolset }}
|
||||
dependsOn:
|
||||
- Asset_Registry_Publish
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
|
||||
- template: ../job/publish-build-assets.yml
|
||||
parameters:
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
dependsOn:
|
||||
- ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}:
|
||||
- ${{ each job in parameters.publishBuildAssetsDependsOn }}:
|
||||
- ${{ job.job }}
|
||||
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
|
||||
- ${{ each job in parameters.jobs }}:
|
||||
- ${{ job.job }}
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
runAsPublic: ${{ parameters.runAsPublic }}
|
||||
publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
|
||||
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
|
||||
|
||||
- ${{ if eq(parameters.graphFileGeneration.enabled, true) }}:
|
||||
- template: ../job/generate-graph-files.yml
|
||||
parameters:
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
includeToolset: ${{ parameters.graphFileGeneration.includeToolset }}
|
||||
dependsOn:
|
||||
- Asset_Registry_Publish
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
dependsOn:
|
||||
- Validate
|
||||
publishInstallersAndChecksums: false
|
||||
symbolPublishingAdditionalParameters: ''
|
||||
stageName: ''
|
||||
|
@ -10,37 +13,54 @@ parameters:
|
|||
|
||||
stages:
|
||||
- stage: ${{ parameters.stageName }}
|
||||
dependsOn: validate
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: ${{ parameters.channelName }} Publishing
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
- job: publish_symbols
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PdbArtifacts/**
|
||||
BlobArtifacts/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
||||
# otherwise it'll complain about accessing a private feed.
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
|
@ -53,39 +73,47 @@ stages:
|
|||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
||||
/p:Configuration=Release
|
||||
/p:PublishToMSDL=false
|
||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/publish-logs.yml
|
||||
parameters:
|
||||
StageLabel: '${{ parameters.stageName }}'
|
||||
JobLabel: 'SymbolPublishing'
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PackageArtifacts/**
|
||||
BlobArtifacts/**
|
||||
AssetManifests/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
@ -124,7 +152,6 @@ stages:
|
|||
/p:ChecksumsAzureAccountKey=$(InternalChecksumsBlobFeedKey)
|
||||
/p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl)
|
||||
/p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey)
|
||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||
/p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}'
|
||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}'
|
||||
|
@ -134,6 +161,11 @@ stages:
|
|||
/p:PublishToMSDL=false
|
||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
- template: ../../steps/publish-logs.yml
|
||||
parameters:
|
||||
StageLabel: '${{ parameters.stageName }}'
|
||||
JobLabel: 'AssetsPublishing'
|
||||
|
||||
- template: ../../steps/add-build-to-channel.yml
|
||||
parameters:
|
||||
ChannelId: ${{ parameters.channelId }}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
dependsOn:
|
||||
- Validate
|
||||
publishInstallersAndChecksums: false
|
||||
symbolPublishingAdditionalParameters: ''
|
||||
stageName: ''
|
||||
|
@ -11,33 +13,42 @@ parameters:
|
|||
|
||||
stages:
|
||||
- stage: ${{ parameters.stageName }}
|
||||
dependsOn: validate
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: ${{ parameters.channelName }} Publishing
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
- job: publish_symbols
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PdbArtifacts/**
|
||||
BlobArtifacts/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
||||
|
@ -64,6 +75,11 @@ stages:
|
|||
/p:Configuration=Release
|
||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/publish-logs.yml
|
||||
parameters:
|
||||
StageLabel: '${{ parameters.stageName }}'
|
||||
JobLabel: 'SymbolPublishing'
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
|
@ -72,29 +88,31 @@ stages:
|
|||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PackageArtifacts/**
|
||||
BlobArtifacts/**
|
||||
AssetManifests/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
@ -134,7 +152,6 @@ stages:
|
|||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||
/p:AzureDevOpsStaticShippingFeed='${{ parameters.shippingFeed }}'
|
||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticTransportFeed='${{ parameters.transportFeed }}'
|
||||
|
@ -143,6 +160,11 @@ stages:
|
|||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
- template: ../../steps/publish-logs.yml
|
||||
parameters:
|
||||
StageLabel: '${{ parameters.stageName }}'
|
||||
JobLabel: 'AssetsPublishing'
|
||||
|
||||
- template: ../../steps/add-build-to-channel.yml
|
||||
parameters:
|
||||
ChannelId: ${{ parameters.channelId }}
|
||||
|
|
|
@ -4,7 +4,7 @@ variables:
|
|||
- group: DotNet-DotNetCli-Storage
|
||||
- group: DotNet-MSRC-Storage
|
||||
- group: Publish-Build-Assets
|
||||
|
||||
|
||||
# .NET Core 3.1 Dev
|
||||
- name: PublicDevRelease_31_Channel_Id
|
||||
value: 128
|
||||
|
@ -49,6 +49,10 @@ variables:
|
|||
- name: NetCore_31_Blazor_Features_Channel_Id
|
||||
value: 531
|
||||
|
||||
# .NET Core Experimental
|
||||
- name: NetCore_Experimental_Channel_Id
|
||||
value: 562
|
||||
|
||||
# Whether the build is internal or not
|
||||
- name: IsInternalBuild
|
||||
value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
parameters:
|
||||
ChannelId: 0
|
||||
|
||||
jobs:
|
||||
- job: gatherDrop
|
||||
displayName: Gather Drop
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
|
||||
variables:
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Darc gather-drop
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/darc-gather-drop.ps1
|
||||
arguments: -BarBuildId $(BARBuildId)
|
||||
-DropLocation $(Agent.BuildDirectory)/Temp/Drop/
|
||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
|
@ -17,95 +17,150 @@ parameters:
|
|||
signingValidationAdditionalParameters: ''
|
||||
|
||||
# Which stages should finish execution before post-build stages start
|
||||
dependsOn: [build]
|
||||
validateDependsOn:
|
||||
- build
|
||||
publishDependsOn:
|
||||
- Validate
|
||||
|
||||
stages:
|
||||
- stage: validate
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
- stage: Validate
|
||||
dependsOn: ${{ parameters.validateDependsOn }}
|
||||
displayName: Validate
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
jobs:
|
||||
- ${{ if eq(parameters.enableNugetValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: NuGet Validation
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
- template: setup-maestro-vars.yml
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
||||
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
||||
-ToolDestinationPath $(Agent.BuildDirectory)/Extract/
|
||||
- job:
|
||||
displayName: NuGet Validation
|
||||
dependsOn: setupMaestroVars
|
||||
condition: eq( ${{ parameters.enableNugetValidation }}, 'true')
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
variables:
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- ${{ if eq(parameters.enableSigningValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: Signing Validation
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
||||
# otherwise it'll complain about accessing a private feed.
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
||||
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
||||
-ToolDestinationPath $(Agent.BuildDirectory)/Extract/
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
- job:
|
||||
displayName: Signing Validation
|
||||
dependsOn: setupMaestroVars
|
||||
condition: eq( ${{ parameters.enableSigningValidation }}, 'true')
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task SigningValidation -restore -msbuildEngine dotnet
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
|
||||
/p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
|
||||
/p:Configuration=Release
|
||||
${{ parameters.signingValidationAdditionalParameters }}
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
||||
# otherwise it'll complain about accessing a private feed.
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: SourceLink Validation
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
|
||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-ExtractPath $(Agent.BuildDirectory)/Extract/
|
||||
-GHRepoName $(Build.Repository.Name)
|
||||
-GHCommit $(Build.SourceVersion)
|
||||
-SourcelinkCliVersion $(SourceLinkCLIVersion)
|
||||
continueOnError: true
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task SigningValidation -restore -msbuildEngine dotnet
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
|
||||
/p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
|
||||
${{ parameters.signingValidationAdditionalParameters }}
|
||||
|
||||
- ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}:
|
||||
- template: /eng/common/templates/job/execute-sdl.yml
|
||||
parameters:
|
||||
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
|
||||
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
|
||||
artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
|
||||
- template: ../steps/publish-logs.yml
|
||||
parameters:
|
||||
StageLabel: 'Validation'
|
||||
JobLabel: 'Signing'
|
||||
|
||||
- job:
|
||||
displayName: SourceLink Validation
|
||||
dependsOn: setupMaestroVars
|
||||
condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true')
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
|
||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-ExtractPath $(Agent.BuildDirectory)/Extract/
|
||||
-GHRepoName $(Build.Repository.Name)
|
||||
-GHCommit $(Build.SourceVersion)
|
||||
-SourcelinkCliVersion $(SourceLinkCLIVersion)
|
||||
continueOnError: true
|
||||
|
||||
- template: /eng/common/templates/job/execute-sdl.yml
|
||||
parameters:
|
||||
enable: ${{ parameters.SDLValidationParameters.enable }}
|
||||
dependsOn: setupMaestroVars
|
||||
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
|
||||
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
|
||||
artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Dev5_Publish'
|
||||
|
@ -118,18 +173,33 @@ stages:
|
|||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Dev31_Publish'
|
||||
channelName: '.NET Core 3.1 Dev'
|
||||
channelId: 128
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||
stageName: 'Net5_Preview1_Publish'
|
||||
channelName: '.NET 5 Preview 1'
|
||||
channelId: 737
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'Net5_Preview2_Publish'
|
||||
channelName: '.NET 5 Preview 2'
|
||||
channelId: 738
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'Net_Eng_Latest_Publish'
|
||||
|
@ -142,6 +212,7 @@ stages:
|
|||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'Net_Eng_Validation_Publish'
|
||||
|
@ -154,90 +225,7 @@ stages:
|
|||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_3_Tools_Validation_Publish'
|
||||
channelName: '.NET 3 Tools - Validation'
|
||||
channelId: 390
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_3_Tools_Publish'
|
||||
channelName: '.NET 3 Tools'
|
||||
channelId: 344
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Release30_Publish'
|
||||
channelName: '.NET Core 3.0 Release'
|
||||
channelId: 19
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Release31_Publish'
|
||||
channelName: '.NET Core 3.1 Release'
|
||||
channelId: 129
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Blazor31_Features_Publish'
|
||||
channelName: '.NET Core 3.1 Blazor Features'
|
||||
channelId: 531
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_30_Internal_Servicing_Publishing'
|
||||
channelName: '.NET Core 3.0 Internal Servicing'
|
||||
channelId: 184
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_31_Internal_Servicing_Publishing'
|
||||
channelName: '.NET Core 3.1 Internal Servicing'
|
||||
channelId: 550
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'General_Testing_Publish'
|
||||
|
@ -250,6 +238,7 @@ stages:
|
|||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_Tooling_Dev_Publishing'
|
||||
|
@ -262,6 +251,7 @@ stages:
|
|||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_Tooling_Release_Publishing'
|
||||
|
@ -271,98 +261,54 @@ stages:
|
|||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_SDK_301xx_Publishing'
|
||||
channelName: '.NET Core SDK 3.0.1xx'
|
||||
channelId: 556
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_SDK_301xx_Internal_Publishing'
|
||||
channelName: '.NET Core SDK 3.0.1xx Internal'
|
||||
channelId: 555
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
|
||||
stageName: 'NET_Internal_Tooling_Publishing'
|
||||
channelName: '.NET Internal Tooling'
|
||||
channelId: 551
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_SDK_311xx_Publishing'
|
||||
channelName: '.NET Core SDK 3.1.1xx'
|
||||
channelId: 560
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_SDK_311xx_Internal_Publishing'
|
||||
channelName: '.NET Core SDK 3.1.1xx Internal'
|
||||
channelId: 559
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
|
||||
stageName: 'NETCore_Experimental_Publishing'
|
||||
channelName: '.NET Core Experimental'
|
||||
channelId: 562
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_SDK_312xx_Publishing'
|
||||
channelName: '.NET Core SDK 3.1.2xx'
|
||||
channelId: 558
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_SDK_312xx_Internal_Publishing'
|
||||
channelName: '.NET Core SDK 3.1.2xx Internal'
|
||||
channelId: 557
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
|
||||
stageName: 'Net_Eng_Services_Int_Publish'
|
||||
channelName: '.NET Eng Services - Int'
|
||||
channelId: 678
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_SDK_313xx_Publishing'
|
||||
channelName: '.NET Core SDK 3.1.3xx'
|
||||
channelId: 759
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_SDK_313xx_Internal_Publishing'
|
||||
channelName: '.NET Core SDK 3.1.3xx Internal'
|
||||
channelId: 760
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-symbols/nuget/v3/index.json'
|
||||
stageName: 'Net_Eng_Services_Prod_Publish'
|
||||
channelName: '.NET Eng Services - Prod'
|
||||
channelId: 679
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
parameters:
|
||||
ChannelId: 0
|
||||
|
||||
jobs:
|
||||
- job:
|
||||
displayName: Promote Build
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
|
||||
variables:
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: ChannelId
|
||||
value: ${{ parameters.ChannelId }}
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Add Build to Channel
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
|
||||
arguments: -BuildId $(BARBuildId)
|
||||
-ChannelId $(ChannelId)
|
||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
|
@ -1,11 +1,20 @@
|
|||
jobs:
|
||||
- job: setupMaestroVars
|
||||
displayName: Setup Maestro Vars
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- name: BuildId
|
||||
value: $[ coalesce(variables.BARBuildId, 0) ]
|
||||
- name: PromoteToChannelId
|
||||
value: $[ coalesce(variables.PromoteToMaestroChannelId, 0) ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- checkout: none
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Release Configs
|
||||
condition: eq(variables.PromoteToChannelId, 0)
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: ReleaseConfigs
|
||||
|
@ -14,5 +23,59 @@ jobs:
|
|||
name: setReleaseVars
|
||||
displayName: Set Release Configs Vars
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/setup-maestro-vars.ps1
|
||||
arguments: -ReleaseConfigsPath '$(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt'
|
||||
targetType: inline
|
||||
script: |
|
||||
try {
|
||||
if ($Env:PromoteToChannelId -eq 0) {
|
||||
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
||||
|
||||
$BarId = $Content | Select -Index 0
|
||||
|
||||
$Channels = ""
|
||||
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
|
||||
|
||||
$IsStableBuild = $Content | Select -Index 2
|
||||
|
||||
$AzureDevOpsProject = $Env:System_TeamProject
|
||||
$AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId
|
||||
$AzureDevOpsBuildId = $Env:Build_BuildId
|
||||
$PromoteToMaestroChannelId = 0
|
||||
}
|
||||
else {
|
||||
$buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}"
|
||||
|
||||
$apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
|
||||
$apiHeaders.Add('Accept', 'application/json')
|
||||
$apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}")
|
||||
|
||||
$buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
|
||||
|
||||
$BarId = $Env:BARBuildId
|
||||
$Channels = 'None'
|
||||
|
||||
#TODO: Fix this once this issue is done: https://github.com/dotnet/arcade/issues/3834
|
||||
$IsStableBuild = 'False'
|
||||
|
||||
$AzureDevOpsProject = $buildInfo.azureDevOpsProject
|
||||
$AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId
|
||||
$AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId
|
||||
$PromoteToMaestroChannelId = $Env:PromoteToMaestroChannelId
|
||||
}
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=BARBuildId;isOutput=true]$BarId"
|
||||
Write-Host "##vso[task.setvariable variable=InitialChannels;isOutput=true]$Channels"
|
||||
Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild"
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=AzDOProjectName;isOutput=true]$AzureDevOpsProject"
|
||||
Write-Host "##vso[task.setvariable variable=AzDOPipelineId;isOutput=true]$AzureDevOpsBuildDefinitionId"
|
||||
Write-Host "##vso[task.setvariable variable=AzDOBuildId;isOutput=true]$AzureDevOpsBuildId"
|
||||
Write-Host "##vso[task.setvariable variable=PromoteToMaestroChannelId;isOutput=true]$PromoteToMaestroChannelId"
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
exit 1
|
||||
}
|
||||
env:
|
||||
MAESTRO_API_TOKEN: $(MaestroApiAccessToken)
|
||||
|
|
|
@ -5,9 +5,9 @@ steps:
|
|||
- task: PowerShell@2
|
||||
displayName: Add Build to Channel
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1
|
||||
arguments: -BuildId $(BARBuildId)
|
||||
-ChannelId ${{ parameters.ChannelId }}
|
||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
23
eng/common/templates/steps/publish-logs.yml
Normal file
23
eng/common/templates/steps/publish-logs.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
parameters:
|
||||
StageLabel: ''
|
||||
JobLabel: ''
|
||||
|
||||
steps:
|
||||
- task: Powershell@2
|
||||
displayName: Prepare Binlogs to Upload
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: |
|
||||
New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
|
||||
Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Logs
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs'
|
||||
PublishLocation: Container
|
||||
ArtifactName: PostBuildLogs
|
||||
continueOnError: true
|
||||
condition: always()
|
|
@ -23,6 +23,7 @@ parameters:
|
|||
EnableXUnitReporter: false # optional -- true enables XUnit result reporting to Mission Control
|
||||
WaitForWorkItemCompletion: true # optional -- true will make the task wait until work items have been completed and fail the build if work items fail. False is "fire and forget."
|
||||
IsExternal: false # [DEPRECATED] -- doesn't do anything, jobs are external if HelixAccessToken is empty and Creator is set
|
||||
HelixBaseUri: 'https://helix.dot.net/' # optional -- sets the Helix API base URI (allows targeting int)
|
||||
Creator: '' # optional -- if the build is external, use this to specify who is sending the job
|
||||
DisplayNamePrefix: 'Run Tests' # optional -- rename the beginning of the displayName of the steps in AzDO
|
||||
condition: succeeded() # optional -- condition for step to execute; defaults to succeeded()
|
||||
|
@ -55,6 +56,7 @@ steps:
|
|||
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
|
||||
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
|
||||
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
|
||||
HelixBaseUri: ${{ parameters.HelixBaseUri }}
|
||||
Creator: ${{ parameters.Creator }}
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
condition: and(${{ parameters.condition }}, eq(variables['Agent.Os'], 'Windows_NT'))
|
||||
|
@ -85,6 +87,7 @@ steps:
|
|||
DotNetCliVersion: ${{ parameters.DotNetCliVersion }}
|
||||
EnableXUnitReporter: ${{ parameters.EnableXUnitReporter }}
|
||||
WaitForWorkItemCompletion: ${{ parameters.WaitForWorkItemCompletion }}
|
||||
HelixBaseUri: ${{ parameters.HelixBaseUri }}
|
||||
Creator: ${{ parameters.Creator }}
|
||||
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
||||
condition: and(${{ parameters.condition }}, ne(variables['Agent.Os'], 'Windows_NT'))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
[bool]$ci = if (Test-Path variable:ci) { $ci } else { $false }
|
||||
|
||||
# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names.
|
||||
[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { "Debug" }
|
||||
[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { 'Debug' }
|
||||
|
||||
# Set to true to output binary log from msbuild. Note that emitting binary log slows down the build.
|
||||
# Binary log must be enabled on CI.
|
||||
|
@ -24,7 +24,7 @@
|
|||
[bool]$restore = if (Test-Path variable:restore) { $restore } else { $true }
|
||||
|
||||
# Adjusts msbuild verbosity level.
|
||||
[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { "minimal" }
|
||||
[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { 'minimal' }
|
||||
|
||||
# Set to true to reuse msbuild nodes. Recommended to not reuse on CI.
|
||||
[bool]$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { !$ci }
|
||||
|
@ -41,21 +41,23 @@
|
|||
|
||||
# Enable repos to use a particular version of the on-line dotnet-install scripts.
|
||||
# default URL: https://dot.net/v1/dotnet-install.ps1
|
||||
[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { "v1" }
|
||||
[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { 'v1' }
|
||||
|
||||
# True to use global NuGet cache instead of restoring packages to repository-local directory.
|
||||
[bool]$useGlobalNuGetCache = if (Test-Path variable:useGlobalNuGetCache) { $useGlobalNuGetCache } else { !$ci }
|
||||
|
||||
# An array of names of processes to stop on script exit if prepareMachine is true.
|
||||
$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @("msbuild", "dotnet", "vbcscompiler") }
|
||||
$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @('msbuild', 'dotnet', 'vbcscompiler') }
|
||||
|
||||
$disableConfigureToolsetImport = if (Test-Path variable:disableConfigureToolsetImport) { $disableConfigureToolsetImport } else { $null }
|
||||
|
||||
set-strictmode -version 2.0
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
function Create-Directory([string[]] $path) {
|
||||
if (!(Test-Path $path)) {
|
||||
New-Item -path $path -force -itemType "Directory" | Out-Null
|
||||
New-Item -path $path -force -itemType 'Directory' | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,7 +98,10 @@ function Exec-Process([string]$command, [string]$commandArgs) {
|
|||
}
|
||||
}
|
||||
|
||||
function InitializeDotNetCli([bool]$install) {
|
||||
# createSdkLocationFile parameter enables a file being generated under the toolset directory
|
||||
# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations
|
||||
# as dot sourcing isn't possible.
|
||||
function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
|
||||
if (Test-Path variable:global:_DotNetInstallDir) {
|
||||
return $global:_DotNetInstallDir
|
||||
}
|
||||
|
@ -119,7 +124,7 @@ function InitializeDotNetCli([bool]$install) {
|
|||
|
||||
# Find the first path on %PATH% that contains the dotnet.exe
|
||||
if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
|
||||
$dotnetCmd = Get-Command "dotnet.exe" -ErrorAction SilentlyContinue
|
||||
$dotnetCmd = Get-Command 'dotnet.exe' -ErrorAction SilentlyContinue
|
||||
if ($dotnetCmd -ne $null) {
|
||||
$env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent
|
||||
}
|
||||
|
@ -132,13 +137,13 @@ function InitializeDotNetCli([bool]$install) {
|
|||
if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
|
||||
$dotnetRoot = $env:DOTNET_INSTALL_DIR
|
||||
} else {
|
||||
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
|
||||
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
|
||||
|
||||
if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) {
|
||||
if ($install) {
|
||||
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
|
@ -146,6 +151,24 @@ function InitializeDotNetCli([bool]$install) {
|
|||
$env:DOTNET_INSTALL_DIR = $dotnetRoot
|
||||
}
|
||||
|
||||
# Creates a temporary file under the toolset dir.
|
||||
# The following code block is protecting against concurrent access so that this function can
|
||||
# be called in parallel.
|
||||
if ($createSdkLocationFile) {
|
||||
do {
|
||||
$sdkCacheFileTemp = Join-Path $ToolsetDir $([System.IO.Path]::GetRandomFileName())
|
||||
}
|
||||
until (!(Test-Path $sdkCacheFileTemp))
|
||||
Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot
|
||||
|
||||
try {
|
||||
Rename-Item -Force -Path $sdkCacheFileTemp 'sdk.txt'
|
||||
} catch {
|
||||
# Somebody beat us
|
||||
Remove-Item -Path $sdkCacheFileTemp
|
||||
}
|
||||
}
|
||||
|
||||
# Add dotnet to PATH. This prevents any bare invocation of dotnet in custom
|
||||
# build steps from using anything other than what we've downloaded.
|
||||
# It also ensures that VS msbuild will use the downloaded sdk targets.
|
||||
|
@ -154,15 +177,6 @@ function InitializeDotNetCli([bool]$install) {
|
|||
# Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build
|
||||
Write-PipelinePrependPath -Path $dotnetRoot
|
||||
|
||||
# Work around issues with Azure Artifacts credential provider
|
||||
# https://github.com/dotnet/arcade/issues/3932
|
||||
if ($ci) {
|
||||
$env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
|
||||
$env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20
|
||||
Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20'
|
||||
Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20'
|
||||
}
|
||||
|
||||
Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
|
||||
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
|
||||
|
||||
|
@ -170,27 +184,53 @@ function InitializeDotNetCli([bool]$install) {
|
|||
}
|
||||
|
||||
function GetDotNetInstallScript([string] $dotnetRoot) {
|
||||
$installScript = Join-Path $dotnetRoot "dotnet-install.ps1"
|
||||
$installScript = Join-Path $dotnetRoot 'dotnet-install.ps1'
|
||||
if (!(Test-Path $installScript)) {
|
||||
Create-Directory $dotnetRoot
|
||||
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
|
||||
Invoke-WebRequest "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1" -OutFile $installScript
|
||||
|
||||
$maxRetries = 5
|
||||
$retries = 1
|
||||
|
||||
$uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1"
|
||||
|
||||
while($true) {
|
||||
try {
|
||||
Write-Host "GET $uri"
|
||||
Invoke-WebRequest $uri -OutFile $installScript
|
||||
break
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to download '$uri'"
|
||||
Write-Error $_.Exception.Message -ErrorAction Continue
|
||||
}
|
||||
|
||||
if (++$retries -le $maxRetries) {
|
||||
$delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
|
||||
Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
|
||||
Start-Sleep -Seconds $delayInSeconds
|
||||
}
|
||||
else {
|
||||
throw "Unable to download file in $maxRetries attempts."
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $installScript
|
||||
}
|
||||
|
||||
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") {
|
||||
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') {
|
||||
InstallDotNet $dotnetRoot $version $architecture
|
||||
}
|
||||
|
||||
function InstallDotNet([string] $dotnetRoot,
|
||||
[string] $version,
|
||||
[string] $architecture = "",
|
||||
[string] $runtime = "",
|
||||
[bool] $skipNonVersionedFiles = $false,
|
||||
[string] $runtimeSourceFeed = "",
|
||||
[string] $runtimeSourceFeedKey = "") {
|
||||
function InstallDotNet([string] $dotnetRoot,
|
||||
[string] $version,
|
||||
[string] $architecture = '',
|
||||
[string] $runtime = '',
|
||||
[bool] $skipNonVersionedFiles = $false,
|
||||
[string] $runtimeSourceFeed = '',
|
||||
[string] $runtimeSourceFeedKey = '') {
|
||||
|
||||
$installScript = GetDotNetInstallScript $dotnetRoot
|
||||
$installParameters = @{
|
||||
|
@ -206,7 +246,7 @@ function InstallDotNet([string] $dotnetRoot,
|
|||
& $installScript @installParameters
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from public location."
|
||||
|
||||
# Only the runtime can be installed from a custom [private] location.
|
||||
if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) {
|
||||
|
@ -222,7 +262,7 @@ function InstallDotNet([string] $dotnetRoot,
|
|||
& $installScript @installParameters
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
} else {
|
||||
|
@ -248,16 +288,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
|||
}
|
||||
|
||||
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
|
||||
$vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { "15.9" }
|
||||
$vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { '15.9' }
|
||||
$vsMinVersion = [Version]::new($vsMinVersionStr)
|
||||
|
||||
# Try msbuild command available in the environment.
|
||||
if ($env:VSINSTALLDIR -ne $null) {
|
||||
$msbuildCmd = Get-Command "msbuild.exe" -ErrorAction SilentlyContinue
|
||||
$msbuildCmd = Get-Command 'msbuild.exe' -ErrorAction SilentlyContinue
|
||||
if ($msbuildCmd -ne $null) {
|
||||
# Workaround for https://github.com/dotnet/roslyn/issues/35793
|
||||
# Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+
|
||||
$msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0])
|
||||
$msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0])
|
||||
|
||||
if ($msbuildVersion -ge $vsMinVersion) {
|
||||
return $global:_MSBuildExe = $msbuildCmd.Path
|
||||
|
@ -277,7 +317,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
|||
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion
|
||||
} else {
|
||||
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "xcopy-msbuild") {
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') {
|
||||
$xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild'
|
||||
$vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0]
|
||||
} else {
|
||||
|
@ -285,9 +325,12 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
|||
$xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha"
|
||||
}
|
||||
|
||||
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
|
||||
$vsInstallDir = $null
|
||||
if ($xcopyMSBuildVersion.Trim() -ine "none") {
|
||||
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
|
||||
}
|
||||
if ($vsInstallDir -eq $null) {
|
||||
throw "Unable to find Visual Studio that has required version and components installed"
|
||||
throw 'Unable to find Visual Studio that has required version and components installed'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -311,7 +354,7 @@ function InstallXCopyMSBuild([string]$packageVersion) {
|
|||
}
|
||||
|
||||
function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
|
||||
$packageName = "RoslynTools.MSBuild"
|
||||
$packageName = 'RoslynTools.MSBuild'
|
||||
$packageDir = Join-Path $ToolsDir "msbuild\$packageVersion"
|
||||
$packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg"
|
||||
|
||||
|
@ -327,7 +370,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
|
|||
Unzip $packagePath $packageDir
|
||||
}
|
||||
|
||||
return Join-Path $packageDir "tools"
|
||||
return Join-Path $packageDir 'tools'
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -344,32 +387,37 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
|
|||
# or $null if no instance meeting the requirements is found on the machine.
|
||||
#
|
||||
function LocateVisualStudio([object]$vsRequirements = $null){
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "vswhere") {
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') {
|
||||
$vswhereVersion = $GlobalJson.tools.vswhere
|
||||
} else {
|
||||
$vswhereVersion = "2.5.2"
|
||||
$vswhereVersion = '2.5.2'
|
||||
}
|
||||
|
||||
$vsWhereDir = Join-Path $ToolsDir "vswhere\$vswhereVersion"
|
||||
$vsWhereExe = Join-Path $vsWhereDir "vswhere.exe"
|
||||
$vsWhereExe = Join-Path $vsWhereDir 'vswhere.exe'
|
||||
|
||||
if (!(Test-Path $vsWhereExe)) {
|
||||
Create-Directory $vsWhereDir
|
||||
Write-Host "Downloading vswhere"
|
||||
Invoke-WebRequest "https://github.com/Microsoft/vswhere/releases/download/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
|
||||
Write-Host 'Downloading vswhere'
|
||||
try {
|
||||
Invoke-WebRequest "https://netcorenativeassets.blob.core.windows.net/resource-packages/external/windows/vswhere/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
}
|
||||
}
|
||||
|
||||
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
|
||||
$args = @("-latest", "-prerelease", "-format", "json", "-requires", "Microsoft.Component.MSBuild", "-products", "*")
|
||||
$args = @('-latest', '-prerelease', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*')
|
||||
|
||||
if (Get-Member -InputObject $vsRequirements -Name "version") {
|
||||
$args += "-version"
|
||||
if (Get-Member -InputObject $vsRequirements -Name 'version') {
|
||||
$args += '-version'
|
||||
$args += $vsRequirements.version
|
||||
}
|
||||
|
||||
if (Get-Member -InputObject $vsRequirements -Name "components") {
|
||||
if (Get-Member -InputObject $vsRequirements -Name 'components') {
|
||||
foreach ($component in $vsRequirements.components) {
|
||||
$args += "-requires"
|
||||
$args += '-requires'
|
||||
$args += $component
|
||||
}
|
||||
}
|
||||
|
@ -395,27 +443,27 @@ function InitializeBuildTool() {
|
|||
|
||||
# Initialize dotnet cli if listed in 'tools'
|
||||
$dotnetRoot = $null
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
|
||||
$dotnetRoot = InitializeDotNetCli -install:$restore
|
||||
}
|
||||
|
||||
if ($msbuildEngine -eq "dotnet") {
|
||||
if ($msbuildEngine -eq 'dotnet') {
|
||||
if (!$dotnetRoot) {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "/global.json must specify 'tools.dotnet'."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "/global.json must specify 'tools.dotnet'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
$buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild"; Tool = "dotnet"; Framework = "netcoreapp2.1" }
|
||||
$buildTool = @{ Path = Join-Path $dotnetRoot 'dotnet.exe'; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp2.1' }
|
||||
} elseif ($msbuildEngine -eq "vs") {
|
||||
try {
|
||||
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
|
||||
} catch {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
@ -424,15 +472,15 @@ function InitializeBuildTool() {
|
|||
|
||||
function GetDefaultMSBuildEngine() {
|
||||
# Presence of tools.vs indicates the repo needs to build using VS msbuild on Windows.
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "vs") {
|
||||
return "vs"
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
|
||||
return 'vs'
|
||||
}
|
||||
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
|
||||
return "dotnet"
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
|
||||
return 'dotnet'
|
||||
}
|
||||
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
@ -441,9 +489,9 @@ function GetNuGetPackageCachePath() {
|
|||
# Use local cache on CI to ensure deterministic build,
|
||||
# use global cache in dev builds to avoid cost of downloading packages.
|
||||
if ($useGlobalNuGetCache) {
|
||||
$env:NUGET_PACKAGES = Join-Path $env:UserProfile ".nuget\packages"
|
||||
$env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages'
|
||||
} else {
|
||||
$env:NUGET_PACKAGES = Join-Path $RepoRoot ".packages"
|
||||
$env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages'
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -456,7 +504,7 @@ function GetSdkTaskProject([string]$taskName) {
|
|||
}
|
||||
|
||||
function InitializeNativeTools() {
|
||||
if (Get-Member -InputObject $GlobalJson -Name "native-tools") {
|
||||
if (-Not (Test-Path variable:DisableNativeToolsetInstalls) -And (Get-Member -InputObject $GlobalJson -Name "native-tools")) {
|
||||
$nativeArgs= @{}
|
||||
if ($ci) {
|
||||
$nativeArgs = @{
|
||||
|
@ -485,14 +533,14 @@ function InitializeToolset() {
|
|||
}
|
||||
|
||||
if (-not $restore) {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Toolset version $toolsetVersion has not been restored."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Toolset version $toolsetVersion has not been restored."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$buildTool = InitializeBuildTool
|
||||
|
||||
$proj = Join-Path $ToolsetDir "restore.proj"
|
||||
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" }
|
||||
$proj = Join-Path $ToolsetDir 'restore.proj'
|
||||
$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'ToolsetRestore.binlog') } else { '' }
|
||||
|
||||
'<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' | Set-Content $proj
|
||||
|
||||
|
@ -514,7 +562,7 @@ function ExitWithExitCode([int] $exitCode) {
|
|||
}
|
||||
|
||||
function Stop-Processes() {
|
||||
Write-Host "Killing running build processes..."
|
||||
Write-Host 'Killing running build processes...'
|
||||
foreach ($processName in $processesToStopOnExit) {
|
||||
Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process
|
||||
}
|
||||
|
@ -531,13 +579,18 @@ function MSBuild() {
|
|||
|
||||
# Work around issues with Azure Artifacts credential provider
|
||||
# https://github.com/dotnet/arcade/issues/3932
|
||||
if ($ci -and $buildTool.Tool -eq "dotnet") {
|
||||
if ($ci -and $buildTool.Tool -eq 'dotnet') {
|
||||
dotnet nuget locals http-cache -c
|
||||
|
||||
$env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
|
||||
$env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20
|
||||
Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20'
|
||||
Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20'
|
||||
}
|
||||
|
||||
$toolsetBuildProject = InitializeToolset
|
||||
$path = Split-Path -parent $toolsetBuildProject
|
||||
$path = Join-Path $path (Join-Path $buildTool.Framework "Microsoft.DotNet.Arcade.Sdk.dll")
|
||||
$path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')
|
||||
$args += "/logger:$path"
|
||||
}
|
||||
|
||||
|
@ -552,12 +605,12 @@ function MSBuild() {
|
|||
function MSBuild-Core() {
|
||||
if ($ci) {
|
||||
if (!$binaryLog) {
|
||||
Write-PipelineTaskError -Message "Binary log must be enabled in CI build."
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if ($nodeReuse) {
|
||||
Write-PipelineTaskError -Message "Node reuse must be disabled in CI build."
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'Node reuse must be disabled in CI build.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
|
@ -567,10 +620,10 @@ function MSBuild-Core() {
|
|||
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
|
||||
|
||||
if ($warnAsError) {
|
||||
$cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true"
|
||||
$cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true'
|
||||
}
|
||||
else {
|
||||
$cmdArgs += " /p:TreatWarningsAsErrors=false"
|
||||
$cmdArgs += ' /p:TreatWarningsAsErrors=false'
|
||||
}
|
||||
|
||||
foreach ($arg in $args) {
|
||||
|
@ -582,7 +635,7 @@ function MSBuild-Core() {
|
|||
$exitCode = Exec-Process $buildTool.Path $cmdArgs
|
||||
|
||||
if ($exitCode -ne 0) {
|
||||
Write-PipelineTaskError -Message "Build failed."
|
||||
Write-PipelineTelemetryError Category 'Build' -Message 'Build failed.'
|
||||
|
||||
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
|
||||
if ($buildLog -ne $null) {
|
||||
|
@ -597,12 +650,12 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
|
|||
foreach ($argument in $arguments) {
|
||||
if ($argument -ne $null) {
|
||||
$arg = $argument.Trim()
|
||||
if ($arg.StartsWith("/bl:", "OrdinalIgnoreCase")) {
|
||||
return $arg.Substring("/bl:".Length)
|
||||
if ($arg.StartsWith('/bl:', "OrdinalIgnoreCase")) {
|
||||
return $arg.Substring('/bl:'.Length)
|
||||
}
|
||||
|
||||
if ($arg.StartsWith("/binaryLogger:", "OrdinalIgnoreCase")) {
|
||||
return $arg.Substring("/binaryLogger:".Length)
|
||||
if ($arg.StartsWith('/binaryLogger:', 'OrdinalIgnoreCase')) {
|
||||
return $arg.Substring('/binaryLogger:'.Length)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -612,14 +665,14 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
|
|||
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
|
||||
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
|
||||
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
|
||||
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
|
||||
$ToolsetDir = Join-Path $ArtifactsDir "toolset"
|
||||
$ToolsDir = Join-Path $RepoRoot ".tools"
|
||||
$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
|
||||
$TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration
|
||||
$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json
|
||||
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')
|
||||
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
|
||||
$ArtifactsDir = Join-Path $RepoRoot 'artifacts'
|
||||
$ToolsetDir = Join-Path $ArtifactsDir 'toolset'
|
||||
$ToolsDir = Join-Path $RepoRoot '.tools'
|
||||
$LogDir = Join-Path (Join-Path $ArtifactsDir 'log') $configuration
|
||||
$TempDir = Join-Path (Join-Path $ArtifactsDir 'tmp') $configuration
|
||||
$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | ConvertFrom-Json
|
||||
# true if global.json contains a "runtimes" section
|
||||
$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false }
|
||||
|
||||
|
@ -632,3 +685,18 @@ Write-PipelineSetVariable -Name 'Artifacts.Toolset' -Value $ToolsetDir
|
|||
Write-PipelineSetVariable -Name 'Artifacts.Log' -Value $LogDir
|
||||
Write-PipelineSetVariable -Name 'TEMP' -Value $TempDir
|
||||
Write-PipelineSetVariable -Name 'TMP' -Value $TempDir
|
||||
|
||||
# Import custom tools configuration, if present in the repo.
|
||||
# Note: Import in global scope so that the script set top-level variables without qualification.
|
||||
if (!$disableConfigureToolsetImport) {
|
||||
$configureToolsetScript = Join-Path $EngRoot 'configure-toolset.ps1'
|
||||
if (Test-Path $configureToolsetScript) {
|
||||
. $configureToolsetScript
|
||||
if ((Test-Path variable:failOnConfigureToolsetError) -And $failOnConfigureToolsetError) {
|
||||
if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) {
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'configure-toolset.ps1 returned a non-zero exit code'
|
||||
ExitWithExitCode $LastExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ fi
|
|||
# Configures warning treatment in msbuild.
|
||||
warn_as_error=${warn_as_error:-true}
|
||||
|
||||
# True to attempt using .NET Core already that meets requirements specified in global.json
|
||||
# True to attempt using .NET Core already that meets requirements specified in global.json
|
||||
# installed on the machine instead of downloading one.
|
||||
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
|
||||
|
||||
|
@ -81,7 +81,7 @@ function ReadGlobalVersion {
|
|||
local pattern="\"$key\" *: *\"(.*)\""
|
||||
|
||||
if [[ ! $line =~ $pattern ]]; then
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Error: Cannot find \"$key\" in $global_json_file"
|
||||
Write-PipelineTelemetryError -category 'Build' "Error: Cannot find \"$key\" in $global_json_file"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
|
@ -152,15 +152,6 @@ function InitializeDotNetCli {
|
|||
# build steps from using anything other than what we've downloaded.
|
||||
Write-PipelinePrependPath -path "$dotnet_root"
|
||||
|
||||
# Work around issues with Azure Artifacts credential provider
|
||||
# https://github.com/dotnet/arcade/issues/3932
|
||||
if [[ "$ci" == true ]]; then
|
||||
export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20
|
||||
export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20
|
||||
Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20"
|
||||
Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20"
|
||||
fi
|
||||
|
||||
Write-PipelineSetVariable -name "DOTNET_MULTILEVEL_LOOKUP" -value "0"
|
||||
Write-PipelineSetVariable -name "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" -value "1"
|
||||
|
||||
|
@ -181,7 +172,7 @@ function InstallDotNetSdk {
|
|||
function InstallDotNet {
|
||||
local root=$1
|
||||
local version=$2
|
||||
|
||||
|
||||
GetDotNetInstallScript "$root"
|
||||
local install_script=$_GetDotNetInstallScript
|
||||
|
||||
|
@ -227,6 +218,28 @@ function InstallDotNet {
|
|||
}
|
||||
}
|
||||
|
||||
function with_retries {
|
||||
local maxRetries=5
|
||||
local retries=1
|
||||
echo "Trying to run '$@' for maximum of $maxRetries attempts."
|
||||
while [[ $((retries++)) -le $maxRetries ]]; do
|
||||
"$@"
|
||||
|
||||
if [[ $? == 0 ]]; then
|
||||
echo "Ran '$@' successfully."
|
||||
return 0
|
||||
fi
|
||||
|
||||
timeout=$((2**$retries-1))
|
||||
echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2
|
||||
sleep $timeout
|
||||
done
|
||||
|
||||
echo "Failed to execute '$@' for $maxRetries times." 1>&2
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
function GetDotNetInstallScript {
|
||||
local root=$1
|
||||
local install_script="$root/dotnet-install.sh"
|
||||
|
@ -239,13 +252,13 @@ function GetDotNetInstallScript {
|
|||
|
||||
# Use curl if available, otherwise use wget
|
||||
if command -v curl > /dev/null; then
|
||||
curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
|
||||
with_retries curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
|
||||
local exit_code=$?
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
else
|
||||
wget -q -O "$install_script" "$install_script_url" || {
|
||||
else
|
||||
with_retries wget -v -O "$install_script" "$install_script_url" || {
|
||||
local exit_code=$?
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
|
@ -260,11 +273,11 @@ function InitializeBuildTool {
|
|||
if [[ -n "${_InitializeBuildTool:-}" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
InitializeDotNetCli $restore
|
||||
|
||||
# return values
|
||||
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
||||
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
||||
_InitializeBuildToolCommand="msbuild"
|
||||
_InitializeBuildToolFramework="netcoreapp2.1"
|
||||
}
|
||||
|
@ -283,6 +296,9 @@ function GetNuGetPackageCachePath {
|
|||
}
|
||||
|
||||
function InitializeNativeTools() {
|
||||
if [[ -n "${DisableNativeToolsetInstalls:-}" ]]; then
|
||||
return
|
||||
fi
|
||||
if grep -Fq "native-tools" $global_json_file
|
||||
then
|
||||
local nativeArgs=""
|
||||
|
@ -325,14 +341,14 @@ function InitializeToolset {
|
|||
if [[ "$binary_log" == true ]]; then
|
||||
bl="/bl:$log_dir/ToolsetRestore.binlog"
|
||||
fi
|
||||
|
||||
|
||||
echo '<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' > "$proj"
|
||||
MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
|
||||
|
||||
local toolset_build_proj=`cat "$toolset_location_file"`
|
||||
|
||||
if [[ ! -a "$toolset_build_proj" ]]; then
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Invalid toolset path: $toolset_build_proj"
|
||||
Write-PipelineTelemetryError -category 'Build' "Invalid toolset path: $toolset_build_proj"
|
||||
ExitWithExitCode 3
|
||||
fi
|
||||
|
||||
|
@ -363,7 +379,12 @@ function MSBuild {
|
|||
# Work around issues with Azure Artifacts credential provider
|
||||
# https://github.com/dotnet/arcade/issues/3932
|
||||
if [[ "$ci" == true ]]; then
|
||||
dotnet nuget locals http-cache -c
|
||||
"$_InitializeBuildTool" nuget locals http-cache -c
|
||||
|
||||
export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20
|
||||
export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20
|
||||
Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20"
|
||||
Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20"
|
||||
fi
|
||||
|
||||
local toolset_dir="${_InitializeToolset%/*}"
|
||||
|
@ -377,12 +398,12 @@ function MSBuild {
|
|||
function MSBuild-Core {
|
||||
if [[ "$ci" == true ]]; then
|
||||
if [[ "$binary_log" != true ]]; then
|
||||
Write-PipelineTaskError "Binary log must be enabled in CI build."
|
||||
Write-PipelineTelemetryError -category 'Build' "Binary log must be enabled in CI build."
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
if [[ "$node_reuse" == true ]]; then
|
||||
Write-PipelineTaskError "Node reuse must be disabled in CI build."
|
||||
Write-PipelineTelemetryError -category 'Build' "Node reuse must be disabled in CI build."
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
fi
|
||||
|
@ -396,7 +417,7 @@ function MSBuild-Core {
|
|||
|
||||
"$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || {
|
||||
local exit_code=$?
|
||||
Write-PipelineTaskError "Build failed (exit code '$exit_code')."
|
||||
Write-PipelineTelemetryError -category 'Build' "Build failed (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
}
|
||||
|
@ -437,3 +458,18 @@ Write-PipelineSetVariable -name "Artifacts.Toolset" -value "$toolset_dir"
|
|||
Write-PipelineSetVariable -name "Artifacts.Log" -value "$log_dir"
|
||||
Write-PipelineSetVariable -name "Temp" -value "$temp_dir"
|
||||
Write-PipelineSetVariable -name "TMP" -value "$temp_dir"
|
||||
|
||||
# Import custom tools configuration, if present in the repo.
|
||||
if [ -z "${disable_configure_toolset_import:-}" ]; then
|
||||
configure_toolset_script="$eng_root/configure-toolset.sh"
|
||||
if [[ -a "$configure_toolset_script" ]]; then
|
||||
. "$configure_toolset_script"
|
||||
fi
|
||||
fi
|
||||
|
||||
# TODO: https://github.com/dotnet/arcade/issues/1468
|
||||
# Temporary workaround to avoid breaking change.
|
||||
# Remove once repos are updated.
|
||||
if [[ -n "${useInstalledDotNetCli:-}" ]]; then
|
||||
use_installed_dotnet_cli="$useInstalledDotNetCli"
|
||||
fi
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
#
|
||||
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
# Dockerfile that creates a container suitable to build dotnet-cli
|
||||
FROM microsoft/dotnet-buildtools-prereqs:centos-6-376e1a3-20174311014331
|
||||
|
||||
# yum doesn't work with the special curl version we have in the base docker image,
|
||||
# so we remove /usr/local/lib from the library path for this command
|
||||
RUN yum -q -y install sudo
|
||||
|
||||
# Setup User to match Host User, and give superuser permissions
|
||||
ARG USER_ID=0
|
||||
RUN useradd -m code_executor -u ${USER_ID} -g root
|
||||
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
# With the User Change, we need to change permssions on these directories
|
||||
RUN chmod -R a+rwx /usr/local
|
||||
RUN chmod -R a+rwx /home
|
||||
RUN chmod -R 755 /usr/bin/sudo
|
||||
|
||||
# Set user to the one we just created
|
||||
USER ${USER_ID}
|
||||
|
||||
# Set library path to make CURL and ICU libraries that are in /usr/local/lib visible
|
||||
ENV LD_LIBRARY_PATH /usr/local/lib
|
||||
|
||||
# Set working directory
|
||||
ARG WORK_DIR
|
||||
WORKDIR ${WORK_DIR}
|
||||
|
||||
# Set up Azure Artifacts credential provider
|
||||
RUN wget -qO- https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"tools": {
|
||||
"dotnet": "3.1.100"
|
||||
"dotnet": "5.0.100-alpha1-015949"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.20113.5"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20117.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
<Import Project="..\redist\targets\BuildCoreSdkTasks.targets" />
|
||||
<Import Project="..\redist\targets\GetRuntimeInformation.targets" />
|
||||
<Import Project="..\redist\targets\Versions.targets" />
|
||||
<Import Project="..\redist\targets\SetBuildDefaults.targets" />
|
||||
|
||||
<Import Project="targets\FinishBuild.targets" />
|
||||
</Project>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Channel>release/3.1.2xx</Channel>
|
||||
<Channel>master</Channel>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="FinalizeBuild"
|
||||
DependsOnTargets="SetSdkVersionInfo"
|
||||
BeforeTargets="AfterBuild">
|
||||
BeforeTargets="AfterBuild"
|
||||
DependsOnTargets="GenerateFullNuGetVersion;GetCommitHash">
|
||||
<CopyBlobsToLatest FeedUrl="$(DotnetPublishSdkAssetsBlobFeedUrl)"
|
||||
AccountKey="$(DotNetPublishSdkAssetsBlobFeedKey)"
|
||||
NugetVersion="$(FullNugetVersion)"
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public class GenerateMsiVersion : Task
|
||||
{
|
||||
[Required]
|
||||
public int CommitCount { get; set; }
|
||||
public int VersionRevision { get; set; }
|
||||
|
||||
[Required]
|
||||
public int VersionMajor { get; set; }
|
||||
|
@ -30,7 +30,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
Major = VersionMajor,
|
||||
Minor = VersionMinor,
|
||||
Patch = VersionPatch,
|
||||
CommitCount = CommitCount
|
||||
VersionRevision = VersionRevision
|
||||
};
|
||||
|
||||
MsiVersion = buildVersion.GenerateMsiVersion();
|
||||
|
|
38
src/core-sdk-tasks/GenerateMsiVersionFromFullVersion.cs
Normal file
38
src/core-sdk-tasks/GenerateMsiVersionFromFullVersion.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NuGet.Versioning;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class GenerateMsiVersionFromFullVersion : Task
|
||||
{
|
||||
[Required]
|
||||
public int VersionRevision { get; set; }
|
||||
|
||||
[Required]
|
||||
public string VersionMajorMinorPatch { get; set; }
|
||||
|
||||
[Output]
|
||||
public string MsiVersion { get; set; }
|
||||
|
||||
public override bool Execute()
|
||||
{
|
||||
var parsedVersion = NuGetVersion.Parse(VersionMajorMinorPatch);
|
||||
|
||||
var buildVersion = new Version()
|
||||
{
|
||||
Major = parsedVersion.Major,
|
||||
Minor = parsedVersion.Minor,
|
||||
Patch = parsedVersion.Patch,
|
||||
VersionRevision = VersionRevision
|
||||
};
|
||||
|
||||
MsiVersion = buildVersion.GenerateMsiVersion();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,7 +8,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public virtual int Major { get; set; }
|
||||
public virtual int Minor { get; set; }
|
||||
public virtual int Patch { get; set; }
|
||||
public virtual int CommitCount { get; set; }
|
||||
public virtual int VersionRevision { get; set; }
|
||||
|
||||
public string GenerateMsiVersion()
|
||||
{
|
||||
|
@ -22,11 +22,11 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
// CLI major -> 6 bits
|
||||
// CLI minor -> 6 bits
|
||||
// CLI patch -> 6 bits
|
||||
// CLI commitcount -> 14 bits
|
||||
// CLI VersionRevision -> 14 bits
|
||||
var major = Major << 26;
|
||||
var minor = Minor << 20;
|
||||
var patch = Patch << 14;
|
||||
var msiVersionNumber = major | minor | patch | CommitCount;
|
||||
var msiVersionNumber = major | minor | patch | VersionRevision;
|
||||
|
||||
var msiMajor = (msiVersionNumber >> 24) & 0xFF;
|
||||
var msiMinor = (msiVersionNumber >> 16) & 0xFF;
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
|
||||
<Import Project="targets\BuildCoreSdkTasks.targets" />
|
||||
<Import Project="targets\GetRuntimeInformation.targets" />
|
||||
<Import Project="targets\Versions.targets" />
|
||||
<Import Project="targets\SetBuildDefaults.targets" />
|
||||
<Import Project="targets\Versions.targets" />
|
||||
<Import Project="targets\Branding.targets" />
|
||||
<Import Project="targets\BundledTemplates.targets" />
|
||||
<Import Project="targets\BundledDotnetTools.targets" />
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
InputFiles="$(VersionSvgTemplate)"
|
||||
DestinationFiles="$(VersionBadge)"
|
||||
ReplacementPatterns="ver_number"
|
||||
ReplacementStrings="$(SdkVersion)" />
|
||||
ReplacementStrings="$(Version)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="SetBadgeProps" DependsOnTargets="GetCurrentRuntimeInformation">
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<Project>
|
||||
<Target Name="SetSdkBrandingInfo" DependsOnTargets="SetSdkVersionInfo">
|
||||
<Target Name="SetSdkBrandingInfo">
|
||||
<PropertyGroup>
|
||||
<BuildName>cli</BuildName>
|
||||
<SdkBrandName>Microsoft .NET Core SDK $(CliBrandingVersion)</SdkBrandName>
|
||||
<ToolsetBrandName>Microsoft .NET Core Toolset $(CliBrandingVersion)</ToolsetBrandName>
|
||||
<SdkBrandName>Microsoft .NET Core SDK $(Version)</SdkBrandName>
|
||||
<ToolsetBrandName>Microsoft .NET Core Toolset $(Version)</ToolsetBrandName>
|
||||
<MSBuildExtensionsBrandName>.NET Standard Support for Visual Studio 2015</MSBuildExtensionsBrandName>
|
||||
<SharedFrameworkBrandName>Microsoft .NET Core Runtime $(MicrosoftNETCoreAppRuntimePackageVersion)</SharedFrameworkBrandName>
|
||||
<NetCoreAppTargetingPackBrandName>Microsoft .NET Core Targeting Pack $(MicrosoftNETCoreAppRefPackageVersion)</NetCoreAppTargetingPackBrandName>
|
||||
|
@ -13,9 +13,9 @@
|
|||
<HostFxrBrandName>Microsoft .NET Core Host FX Resolver $(HostFxrVersion)</HostFxrBrandName>
|
||||
<SharedFrameworkName>Microsoft.NETCore.App</SharedFrameworkName>
|
||||
<SharedFrameworkNugetName>$(SharedFrameworkName)</SharedFrameworkNugetName>
|
||||
<BundledTemplates31BrandName>Microsoft .NET Core 3.1 Templates $(CliBrandingVersion)</BundledTemplates31BrandName>
|
||||
<BundledTemplates30BrandName>Microsoft .NET Core 3.0 Templates $(CliBrandingVersion)</BundledTemplates30BrandName>
|
||||
<BundledTemplates21BrandName>Microsoft .NET Core 2.1 Templates $(CliBrandingVersion)</BundledTemplates21BrandName>
|
||||
<BundledTemplates31BrandName>Microsoft .NET Core 3.1 Templates $(Version)</BundledTemplates31BrandName>
|
||||
<BundledTemplates30BrandName>Microsoft .NET Core 3.0 Templates $(Version)</BundledTemplates30BrandName>
|
||||
<BundledTemplates21BrandName>Microsoft .NET Core 2.1 Templates $(Version)</BundledTemplates21BrandName>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<UsingTask TaskName="ZipFileExtractToDirectory" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="TarGzFileCreateFromDirectory" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="GenerateMsiVersion" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="GenerateMsiVersionFromFullVersion" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="GenerateGuidFromName" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="ReplaceFileContents" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
<UsingTask TaskName="Chmod" AssemblyFile="$(CoreSdkTaskDll)" />
|
||||
|
|
|
@ -25,6 +25,21 @@
|
|||
<Output TaskParameter="BundledTemplateInstallPath" PropertyName="BundledTemplates21InstallPath" />
|
||||
<Output TaskParameter="BundledTemplateMajorMinorVersion" PropertyName="BundledTemplates21MajorMinorVersion" />
|
||||
</CalculateTemplateVersions>
|
||||
<GenerateMsiVersionFromFullVersion VersionRevision="$(CombinedBuildNumberAndRevision)"
|
||||
VersionMajorMinorPatch="$(AspNetCore31VersionMajorMinorPatchVersion)">
|
||||
<Output TaskParameter="MsiVersion" PropertyName="BundledTemplates31MSIVersion" />
|
||||
</GenerateMsiVersionFromFullVersion>
|
||||
|
||||
<GenerateMsiVersionFromFullVersion VersionRevision="$(CombinedBuildNumberAndRevision)"
|
||||
VersionMajorMinorPatch="$(AspNetCore30VersionMajorMinorPatchVersion)">
|
||||
<Output TaskParameter="MsiVersion" PropertyName="BundledTemplates30MSIVersion" />
|
||||
</GenerateMsiVersionFromFullVersion>
|
||||
|
||||
|
||||
<GenerateMsiVersionFromFullVersion VersionRevision="$(CombinedBuildNumberAndRevision)"
|
||||
VersionMajorMinorPatch="$(AspNetCore21VersionMajorMinorPatchVersion)">
|
||||
<Output TaskParameter="MsiVersion" PropertyName="BundledTemplates21MSIVersion" />
|
||||
</GenerateMsiVersionFromFullVersion>
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -34,8 +49,8 @@
|
|||
<Bundled31Templates Include="Microsoft.Dotnet.Wpf.ProjectTemplates" PackageVersion="$(MicrosoftDotnetWpfProjectTemplates31PackageVersion)" />
|
||||
<Bundled31Templates Include="Microsoft.Dotnet.WinForms.ProjectTemplates" PackageVersion="$(MicrosoftDotnetWinFormsProjectTemplates31PackageVersion)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Web.ItemTemplates" PackageVersion="$(AspNetCorePackageVersionFor31Templates)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Web.ProjectTemplates.3.1" PackageVersion="$(AspNetCorePackageVersionFor31Templates)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.3.1" PackageVersion="$(AspNetCorePackageVersionFor31Templates)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Web.ProjectTemplates.5.0" PackageVersion="$(AspNetCorePackageVersionFor31Templates)" />
|
||||
<Bundled31Templates Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0" PackageVersion="$(AspNetCorePackageVersionFor31Templates)" />
|
||||
<Bundled31Templates Include="NUnit3.DotNetNew.Template" PackageVersion="$(NUnit3Templates31PackageVersion)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<RuntimeNETCoreAppPackageName>microsoft.netcore.app.runtime.$(SharedFrameworkRid)</RuntimeNETCoreAppPackageName>
|
||||
<_crossDir Condition="'$(Architecture)' == 'arm64'">/x64_arm64</_crossDir>
|
||||
<_crossDir Condition="'$(Architecture)' == 'arm64' and '$(BuildArchitecture)' != 'arm64'">/x64_arm64</_crossDir>
|
||||
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">/x86_arm</_crossDir>
|
||||
<_crossDir Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">/x64_arm</_crossDir>
|
||||
<CrossgenPath>$(NuGetPackageRoot)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppRuntimePackageVersion)/tools$(_crossDir)/crossgen$(ExeExtension)</CrossgenPath>
|
||||
<LibCLRJitRid Condition="!$(Architecture.StartsWith('arm'))">$(SharedFrameworkRid)</LibCLRJitRid>
|
||||
<LibCLRJitRid Condition="'$(Architecture)' == 'arm64'">x64_arm64</LibCLRJitRid>
|
||||
<LibCLRJitRid Condition="'$(Architecture)' == 'arm64' and '$(BuildArchitecture)' == 'x64'">x64_arm64</LibCLRJitRid>
|
||||
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'win'">x86_arm</LibCLRJitRid>
|
||||
<LibCLRJitRid Condition="'$(Architecture)' == 'arm' And '$(OSName)' == 'linux'">x64_arm</LibCLRJitRid>
|
||||
<LibCLRJitRid Condition="'$(LibCLRJitRid)' == ''">$(SharedFrameworkRid)</LibCLRJitRid>
|
||||
<LibCLRJitPath>$(NuGetPackageRoot)/$(RuntimeNETCoreAppPackageName)/$(MicrosoftNETCoreAppRuntimePackageVersion)/runtimes/$(LibCLRJitRid)/native/$(DynamicLibPrefix)clrjit$(DynamicLibExtension)</LibCLRJitPath>
|
||||
<SharedFrameworkNameVersionPath>$(RedistLayoutPath)shared/$(SharedFrameworkName)/$(MicrosoftNETCoreAppRuntimePackageVersion)</SharedFrameworkNameVersionPath>
|
||||
<DIASymReaderCrossgenFilter>*</DIASymReaderCrossgenFilter>
|
||||
|
@ -134,7 +134,7 @@
|
|||
|
||||
<!-- Move symbols to separate folder, they are not included in the layout but are published separately -->
|
||||
<Move SourceFiles="@(PdbsToMove)"
|
||||
DestinationFiles="@(PdbsToMove->'$(ArtifactsSymStoreDirectory)/sdk/$(SdkVersion)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
DestinationFiles="@(PdbsToMove->'$(ArtifactsSymStoreDirectory)/sdk/$(Version)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ChmodLayout"
|
||||
|
|
|
@ -14,19 +14,30 @@
|
|||
<_NETStandardLibraryPackageVersion>$(NETStandardLibraryRefPackageVersion)</_NETStandardLibraryPackageVersion>
|
||||
<_NETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</_NETCorePlatformsPackageVersion>
|
||||
|
||||
<_NETCoreApp30RuntimePackVersion>3.0.2</_NETCoreApp30RuntimePackVersion>
|
||||
<_NETCoreApp30RuntimePackVersion>3.0.1</_NETCoreApp30RuntimePackVersion>
|
||||
<_NETCoreApp30TargetingPackVersion>3.0.0</_NETCoreApp30TargetingPackVersion>
|
||||
<_WindowsDesktop30RuntimePackVersion>3.0.2</_WindowsDesktop30RuntimePackVersion>
|
||||
|
||||
<_NETCoreApp31RuntimePackVersion>3.1.0</_NETCoreApp31RuntimePackVersion>
|
||||
<_NETCoreApp31TargetingPackVersion>3.1.0</_NETCoreApp31TargetingPackVersion>
|
||||
|
||||
<_WindowsDesktop30RuntimePackVersion>3.0.1</_WindowsDesktop30RuntimePackVersion>
|
||||
<_WindowsDesktop30TargetingPackVersion>3.0.0</_WindowsDesktop30TargetingPackVersion>
|
||||
<_AspNet30RuntimePackVersion>3.0.2</_AspNet30RuntimePackVersion>
|
||||
|
||||
<_WindowsDesktop31RuntimePackVersion>3.1.0</_WindowsDesktop31RuntimePackVersion>
|
||||
<_WindowsDesktop31TargetingPackVersion>3.1.0</_WindowsDesktop31TargetingPackVersion>
|
||||
|
||||
<_AspNet30RuntimePackVersion>3.0.1</_AspNet30RuntimePackVersion>
|
||||
<_AspNet30TargetingPackVersion>3.0.1</_AspNet30TargetingPackVersion>
|
||||
|
||||
<_AspNet31RuntimePackVersion>3.1.0</_AspNet31RuntimePackVersion>
|
||||
<_AspNet31TargetingPackVersion>3.1.0</_AspNet31TargetingPackVersion>
|
||||
|
||||
<!-- Use only major and minor in target framework version -->
|
||||
<_NETCoreAppTargetFrameworkVersion>$(_NETCoreAppPackageVersion.Split('.')[0]).$(_NETCoreAppPackageVersion.Split('.')[1])</_NETCoreAppTargetFrameworkVersion>
|
||||
<_NETStandardTargetFrameworkVersion>$(_NETStandardLibraryPackageVersion.Split('.')[0]).$(_NETStandardLibraryPackageVersion.Split('.')[1])</_NETStandardTargetFrameworkVersion>
|
||||
|
||||
<_NETCoreSdkBeingBuiltIsPreview Condition=" '$(DropSuffix)' != 'true' ">true</_NETCoreSdkBeingBuiltIsPreview>
|
||||
<_NETCoreSdkBeingBuiltIsPreview Condition=" '$(DropSuffix)' == 'true' ">false</_NETCoreSdkBeingBuiltIsPreview>
|
||||
<_NETCoreSdkBeingBuiltIsPreview Condition=" '$(DotNetFinalVersionKind)' != 'release' ">true</_NETCoreSdkBeingBuiltIsPreview>
|
||||
<_NETCoreSdkBeingBuiltIsPreview Condition=" '$(DotNetFinalVersionKind)' == 'release' ">false</_NETCoreSdkBeingBuiltIsPreview>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -46,7 +57,8 @@
|
|||
win-x86;
|
||||
" />
|
||||
|
||||
<NetCoreRuntimePackRids Include="@(NetCore30RuntimePackRids)"/>
|
||||
<NetCore31RuntimePackRids Include="@(NetCore30RuntimePackRids)"/>
|
||||
<NetCoreRuntimePackRids Include="@(NetCore31RuntimePackRids)"/>
|
||||
|
||||
<AspNetCore30RuntimePackRids Include="
|
||||
win-x64;
|
||||
|
@ -60,10 +72,14 @@
|
|||
linux-arm64;
|
||||
" />
|
||||
|
||||
<AspNetCoreRuntimePackRids Include="@(AspNetCore30RuntimePackRids)" />
|
||||
<Crossgen2SupportedRids Include="linux-musl-x64;linux-x64;win-x64" />
|
||||
|
||||
<AspNetCore31RuntimePackRids Include="@(AspNetCore30RuntimePackRids)" />
|
||||
<AspNetCoreRuntimePackRids Include="@(AspNetCore31RuntimePackRids)" />
|
||||
|
||||
<WindowsDesktop30RuntimePackRids Include="win-x64;win-x86" />
|
||||
<WindowsDesktopRuntimePackRids Include="@(WindowsDesktop30RuntimePackRids)" />
|
||||
<WindowsDesktop31RuntimePackRids Include="@(WindowsDesktop30RuntimePackRids)" />
|
||||
<WindowsDesktopRuntimePackRids Include="@(WindowsDesktop31RuntimePackRids)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
|
@ -92,7 +108,7 @@
|
|||
<ImplicitPackageVariable Include="Microsoft.NETCore.App"
|
||||
TargetFrameworkVersion="2.1"
|
||||
DefaultVersion="2.1.0"
|
||||
LatestVersion="2.1.15" />
|
||||
LatestVersion="2.1.16" />
|
||||
<ImplicitPackageVariable Include="Microsoft.NETCore.App"
|
||||
TargetFrameworkVersion="2.2"
|
||||
DefaultVersion="2.2.0"
|
||||
|
@ -100,11 +116,11 @@
|
|||
<ImplicitPackageVariable Include="Microsoft.AspNetCore.App"
|
||||
TargetFrameworkVersion="2.1"
|
||||
DefaultVersion="2.1.1"
|
||||
LatestVersion="2.1.15"/>
|
||||
LatestVersion="2.1.16"/>
|
||||
<ImplicitPackageVariable Include="Microsoft.AspNetCore.All"
|
||||
TargetFrameworkVersion="2.1"
|
||||
DefaultVersion="2.1.1"
|
||||
LatestVersion="2.1.15"/>
|
||||
LatestVersion="2.1.16"/>
|
||||
|
||||
<ImplicitPackageVariable Include="Microsoft.AspNetCore.App"
|
||||
TargetFrameworkVersion="2.2"
|
||||
|
@ -143,7 +159,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<BundledNETStandardPackageVersion>$(_NETStandardLibraryPackageVersion)</BundledNETStandardPackageVersion>
|
||||
<BundledNETCorePlatformsPackageVersion>$(_NETCorePlatformsPackageVersion)</BundledNETCorePlatformsPackageVersion>
|
||||
<BundledRuntimeIdentifierGraphFile>%24(MSBuildThisFileDirectory)RuntimeIdentifierGraph.json</BundledRuntimeIdentifierGraphFile>
|
||||
<NETCoreSdkVersion>$(SdkVersion)</NETCoreSdkVersion>
|
||||
<NETCoreSdkVersion>$(Version)</NETCoreSdkVersion>
|
||||
<NETCoreSdkRuntimeIdentifier>$(ProductMonikerRid)</NETCoreSdkRuntimeIdentifier>
|
||||
<_NETCoreSdkIsPreview>$(_NETCoreSdkBeingBuiltIsPreview)</_NETCoreSdkIsPreview>
|
||||
</PropertyGroup>
|
||||
|
@ -151,11 +167,10 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
@(ImplicitPackageVariable->'<ImplicitPackageReferenceVersion Include="%(Identity)" TargetFrameworkVersion="%(TargetFrameworkVersion)" DefaultVersion="%(DefaultVersion)" LatestVersion="%(LatestVersion)"/>', '
|
||||
')
|
||||
|
||||
<!-- .NET Core 3.1 -->
|
||||
<KnownFrameworkReference Include="Microsoft.NETCore.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
TargetFramework="netcoreapp5.0"
|
||||
RuntimeFrameworkName="Microsoft.NETCore.App"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.NETCore.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
|
||||
|
@ -165,16 +180,23 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
/>
|
||||
|
||||
<KnownAppHostPack Include="Microsoft.NETCore.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
TargetFramework="netcoreapp5.0"
|
||||
AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**"
|
||||
AppHostPackVersion="$(_NETCoreAppPackageVersion)"
|
||||
AppHostRuntimeIdentifiers="@(NetCoreRuntimePackRids, '%3B')"
|
||||
/>
|
||||
|
||||
<KnownCrossgen2Pack Include="Microsoft.NETCore.App.Crossgen2"
|
||||
TargetFramework="netcoreapp5.0"
|
||||
Crossgen2PackNamePattern="Microsoft.NETCore.App.Crossgen2.**RID**"
|
||||
Crossgen2PackVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)"
|
||||
Crossgen2RuntimeIdentifiers="@(Crossgen2SupportedRids, '%3B')"
|
||||
/>
|
||||
|
||||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
TargetFramework="netcoreapp5.0"
|
||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftWindowsDesktopAppRefPackageVersion)"
|
||||
|
@ -184,9 +206,9 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
/>
|
||||
|
||||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
TargetFramework="netcoreapp5.0"
|
||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftWindowsDesktopAppRefPackageVersion)"
|
||||
|
@ -197,9 +219,9 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
/>
|
||||
|
||||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
TargetFramework="netcoreapp5.0"
|
||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftWindowsDesktopAppRefPackageVersion)"
|
||||
|
@ -210,9 +232,9 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
/>
|
||||
|
||||
<KnownFrameworkReference Include="Microsoft.AspNetCore.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
TargetFramework="netcoreapp5.0"
|
||||
RuntimeFrameworkName="Microsoft.AspNetCore.App"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftAspNetCoreAppRuntimePackageVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftAspNetCoreAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.AspNetCore.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftAspNetCoreAppRefPackageVersion)"
|
||||
|
@ -220,8 +242,77 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
RuntimePackRuntimeIdentifiers="@(AspNetCoreRuntimePackRids, '%3B')"
|
||||
/>
|
||||
|
||||
<!-- .NET Core 3.0 -->
|
||||
<!-- .NET Core 3.1 -->
|
||||
<KnownFrameworkReference Include="Microsoft.NETCore.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.NETCore.App"
|
||||
DefaultRuntimeFrameworkVersion="$(_NETCoreApp31RuntimePackVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(_NETCoreApp31RuntimePackVersion)"
|
||||
TargetingPackName="Microsoft.NETCore.App.Ref"
|
||||
TargetingPackVersion="$(_NETCoreApp31TargetingPackVersion)"
|
||||
RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.**RID**"
|
||||
RuntimePackRuntimeIdentifiers="@(NetCore31RuntimePackRids, '%3B')"
|
||||
IsTrimmable="true"
|
||||
/>
|
||||
|
||||
<KnownAppHostPack Include="Microsoft.NETCore.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
AppHostPackNamePattern="Microsoft.NETCore.App.Host.**RID**"
|
||||
AppHostPackVersion="$(_NETCoreApp31RuntimePackVersion)"
|
||||
AppHostRuntimeIdentifiers="@(NetCore31RuntimePackRids, '%3B')"
|
||||
/>
|
||||
|
||||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||
DefaultRuntimeFrameworkVersion="$(_WindowsDesktop31RuntimePackVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(_WindowsDesktop31RuntimePackVersion)"
|
||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||
TargetingPackVersion="$(_WindowsDesktop31TargetingPackVersion)"
|
||||
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
|
||||
RuntimePackRuntimeIdentifiers="@(WindowsDesktop31RuntimePackRids, '%3B')"
|
||||
IsWindowsOnly="true"
|
||||
/>
|
||||
|
||||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||
DefaultRuntimeFrameworkVersion="$(_WindowsDesktop31RuntimePackVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(_WindowsDesktop31RuntimePackVersion)"
|
||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||
TargetingPackVersion="$(_WindowsDesktop31TargetingPackVersion)"
|
||||
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
|
||||
RuntimePackRuntimeIdentifiers="@(WindowsDesktop31RuntimePackRids, '%3B')"
|
||||
IsWindowsOnly="true"
|
||||
Profile="WPF"
|
||||
/>
|
||||
|
||||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||
DefaultRuntimeFrameworkVersion="$(_WindowsDesktop31RuntimePackVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(_WindowsDesktop31RuntimePackVersion)"
|
||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||
TargetingPackVersion="$(_WindowsDesktop31TargetingPackVersion)"
|
||||
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
|
||||
RuntimePackRuntimeIdentifiers="@(WindowsDesktop31RuntimePackRids, '%3B')"
|
||||
IsWindowsOnly="true"
|
||||
Profile="WindowsForms"
|
||||
/>
|
||||
|
||||
<KnownFrameworkReference Include="Microsoft.AspNetCore.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.AspNetCore.App"
|
||||
DefaultRuntimeFrameworkVersion="$(_AspNet31RuntimePackVersion)"
|
||||
LatestRuntimeFrameworkVersion="$(_AspNet31RuntimePackVersion)"
|
||||
TargetingPackName="Microsoft.AspNetCore.App.Ref"
|
||||
TargetingPackVersion="$(_AspNet31TargetingPackVersion)"
|
||||
RuntimePackNamePatterns="Microsoft.AspNetCore.App.Runtime.**RID**"
|
||||
RuntimePackRuntimeIdentifiers="@(AspNetCore31RuntimePackRids, '%3B')"
|
||||
/>
|
||||
|
||||
|
||||
<!-- .NET Core 3.0 -->
|
||||
<KnownFrameworkReference Include="Microsoft.NETCore.App"
|
||||
TargetFramework="netcoreapp3.0"
|
||||
RuntimeFrameworkName="Microsoft.NETCore.App"
|
||||
|
@ -290,12 +381,11 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
RuntimePackRuntimeIdentifiers="@(AspNetCore30RuntimePackRids, '%3B')"
|
||||
/>
|
||||
|
||||
<KnownFrameworkReference Include="NETStandard.Library"
|
||||
<KnownFrameworkReference Include="NETStandard.Library"
|
||||
TargetFramework="netstandard2.1"
|
||||
TargetingPackName="NETStandard.Library.Ref"
|
||||
TargetingPackVersion="$(NETStandardLibraryRefPackageVersion)"
|
||||
/>
|
||||
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
]]>
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<Target Name="SetupDebProps"
|
||||
DependsOnTargets="SetSdkVersionInfo;
|
||||
GetCurrentRuntimeInformation;
|
||||
DependsOnTargets="GetCurrentRuntimeInformation;
|
||||
SetupFileExtensions;
|
||||
CalculateLinuxNativeInstallerDependencyVersions;
|
||||
SetSdkBrandingInfo">
|
||||
|
@ -172,7 +171,7 @@
|
|||
<ReplacementString>$(AspNetCoreRefVersionWithTilde)</ReplacementString>
|
||||
</DebianConfigTokenValues>
|
||||
<DebianPostInstTokenValues Include="%SDK_VERSION%">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
<ReplacementString>$(Version)</ReplacementString>
|
||||
</DebianPostInstTokenValues>
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -264,7 +263,7 @@
|
|||
|
||||
<!-- Create layout: Man Pages -->
|
||||
<Copy
|
||||
DestinationFiles="@(SdkDebManPageFiles->'$(LayoutDocsDir)/%(RecursiveDir)%(Filename)-$(SdkVersion)%(Extension)')"
|
||||
DestinationFiles="@(SdkDebManPageFiles->'$(LayoutDocsDir)/%(RecursiveDir)%(Filename)-$(Version)%(Extension)')"
|
||||
SourceFiles="@(SdkDebManPageFiles)"
|
||||
OverwriteReadOnlyFiles="True"
|
||||
SkipUnchangedFiles="False"
|
||||
|
@ -291,7 +290,7 @@
|
|||
InputDirectory="$(LayoutDirectory)"
|
||||
OutputDirectory="$(DotNetDebToolOutputDirectory)"
|
||||
PackageName="$(SdkDebianPackageName)"
|
||||
PackageVersion="$(SdkVersion)"
|
||||
PackageVersion="$(Version)"
|
||||
WorkingDirectory="$(DotnetDebToolDir)" />
|
||||
|
||||
<!-- Copy SDK package to output -->
|
||||
|
|
|
@ -10,19 +10,20 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<!-- Blob storage directories are not stabilized, so these must refer to a package that does not stabilize -->
|
||||
<AspNetCoreBlobVersion>$(MicrosoftAspNetCoreDeveloperCertificatesXPlatPackageVersion)</AspNetCoreBlobVersion>
|
||||
<AspNetCoreBlobVersion>$(VSRedistCommonAspNetCoreTargetingPackx6450PackageVersion)</AspNetCoreBlobVersion>
|
||||
<CoreSetupBlobVersion>$(MicrosoftNETCoreAppInternalPackageVersion)</CoreSetupBlobVersion>
|
||||
<WindowsDesktopBlobVersion>$(MicrosoftWindowsDesktopAppPackageVersion)</WindowsDesktopBlobVersion>
|
||||
|
||||
<!-- Change these individually to or $(CoreSetupBlobVersion), $(AspNetCoreBlobVersion), or appropriate fixed version depending if corresponding .Ref packages are unpinned. -->
|
||||
<NETCoreAppTargetingPackBlobVersion>3.1.0-rtm.19565.2</NETCoreAppTargetingPackBlobVersion>
|
||||
<AspNetCoreTargetingPackBlobVersion>3.1.0</AspNetCoreTargetingPackBlobVersion>
|
||||
<WindowsDesktopTargetingPackBlobVersion>3.1.0-rtm.19565.2</WindowsDesktopTargetingPackBlobVersion>
|
||||
<NETCoreAppTargetingPackBlobVersion>$(CoreSetupBlobVersion)</NETCoreAppTargetingPackBlobVersion>
|
||||
<AspNetCoreTargetingPackBlobVersion>$(AspNetCoreBlobVersion)</AspNetCoreTargetingPackBlobVersion>
|
||||
<WindowsDesktopTargetingPackBlobVersion>$(WindowsDesktopBlobVersion)</WindowsDesktopTargetingPackBlobVersion>
|
||||
<NETStandardTargetingPackBlobVersion>3.0.0</NETStandardTargetingPackBlobVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="SetupBundledComponents" DependsOnTargets="GetCurrentRuntimeInformation;SetupFileExtensions;SetSdkVersionInfo;SetBuildDefaults">
|
||||
<Target Name="SetupBundledComponents" DependsOnTargets="GetCurrentRuntimeInformation;SetupFileExtensions;SetBuildDefaults">
|
||||
<PropertyGroup>
|
||||
<SdkOutputDirectory>$(RedistLayoutPath)sdk\$(SdkVersion)\</SdkOutputDirectory>
|
||||
<SdkOutputDirectory>$(RedistLayoutPath)sdk\$(Version)\</SdkOutputDirectory>
|
||||
|
||||
<InternalBuild Condition="$(SYSTEM_TEAMPROJECT) == 'internal'">true</InternalBuild>
|
||||
<InternalBaseURL Condition="$(SYSTEM_TEAMPROJECT) == 'internal'">https://dotnetclimsrc.blob.core.windows.net/dotnet/</InternalBaseURL>
|
||||
|
@ -41,11 +42,11 @@
|
|||
|
||||
<!-- Use the "x64" Rid when downloading Linux shared framework 'DEB' installer files. -->
|
||||
<SharedFrameworkInstallerFileRid>$(CoreSetupRid)</SharedFrameworkInstallerFileRid>
|
||||
<SharedFrameworkInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true' ">x64</SharedFrameworkInstallerFileRid>
|
||||
<SharedFrameworkInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' OR '$(IsRPMBasedDistro)' == 'true' ">$(Architecture)</SharedFrameworkInstallerFileRid>
|
||||
|
||||
<!-- Use the "x64" Rid when downloading Linux runtime dependencies Debian package. -->
|
||||
<RuntimeDepsInstallerFileRid>$(CoreSetupRid)</RuntimeDepsInstallerFileRid>
|
||||
<RuntimeDepsInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' ">x64</RuntimeDepsInstallerFileRid>
|
||||
<RuntimeDepsInstallerFileRid Condition=" '$(IsDebianBaseDistro)' == 'true' ">$(Architecture)</RuntimeDepsInstallerFileRid>
|
||||
|
||||
<AlternateArchitecture Condition="'$(Architecture)' == 'x86'">x64</AlternateArchitecture>
|
||||
<AlternateArchitecture Condition="'$(Architecture)' == 'x64'">x86</AlternateArchitecture>
|
||||
|
@ -91,7 +92,7 @@
|
|||
<PropertyGroup>
|
||||
<CoreSetupRootUrl>$(CoreSetupBlobRootUrl)Runtime/</CoreSetupRootUrl>
|
||||
<AspNetCoreSharedFxRootUrl>$(CoreSetupBlobRootUrl)aspnetcore/Runtime/</AspNetCoreSharedFxRootUrl>
|
||||
<WinFormsAndWpfSharedFxRootUrl>$(CoreSetupRootUrl)</WinFormsAndWpfSharedFxRootUrl>
|
||||
<WinFormsAndWpfSharedFxRootUrl>$(CoreSetupBlobRootUrl)WindowsDesktop/</WinFormsAndWpfSharedFxRootUrl>
|
||||
<CoreSetupDownloadDirectory>$(IntermediateDirectory)/coreSetupDownload/$(MicrosoftNETCoreAppRuntimePackageVersion)</CoreSetupDownloadDirectory>
|
||||
<CombinedSharedHostAndFrameworkArchive>$(CoreSetupDownloadDirectory)/combinedSharedHostAndFrameworkArchive$(ArchiveExtension)</CombinedSharedHostAndFrameworkArchive>
|
||||
</PropertyGroup>
|
||||
|
@ -190,7 +191,7 @@
|
|||
|
||||
<BundledInstallerComponent Include="DownloadedNetStandardTargetingPackInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<BaseUrl>$(CoreSetupRootUrl)$(MicrosoftNETCoreAppRuntimewinx64PackageVersion)</BaseUrl>
|
||||
<BaseUrl>$(CoreSetupRootUrl)$(NETCoreAppTargetingPackBlobVersion)</BaseUrl>
|
||||
<BaseUrl>$(CoreSetupRootUrl)3.0.0</BaseUrl>
|
||||
<DownloadFileName>$(DownloadedNetStandardTargetingPackInstallerFileName)</DownloadFileName>
|
||||
</BundledInstallerComponent>
|
||||
|
@ -221,14 +222,14 @@
|
|||
|
||||
<BundledInstallerComponent Include="DownloadedWindowsDesktopTargetingPackInstallerFile"
|
||||
Condition="'$(InstallerExtension)' == '.msi' And '$(SkipBuildingInstallers)' != 'true' And !$(Architecture.StartsWith('arm'))">
|
||||
<BaseUrl>$(CoreSetupRootUrl)$(WindowsDesktopTargetingPackBlobVersion)</BaseUrl>
|
||||
<BaseUrl>$(WinFormsAndWpfSharedFxRootUrl)$(WindowsDesktopTargetingPackBlobVersion)</BaseUrl>
|
||||
<DownloadFileName>$(DownloadedWindowsDesktopTargetingPackInstallerFileName)</DownloadFileName>
|
||||
</BundledInstallerComponent>
|
||||
|
||||
<BundledLayoutComponent Include="ToolsetArchive">
|
||||
<BaseUrl>$(DotnetToolsetBlobRootUrl)Toolset/$(MicrosoftDotnetToolsetInternalPackageVersion)</BaseUrl>
|
||||
<DownloadFileName>dotnet-toolset-internal-$(MicrosoftDotnetToolsetInternalPackageVersion).zip</DownloadFileName>
|
||||
<RelativeLayoutPath>sdk/$(SdkVersion)</RelativeLayoutPath>
|
||||
<RelativeLayoutPath>sdk/$(Version)</RelativeLayoutPath>
|
||||
</BundledLayoutComponent>
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -264,14 +265,12 @@
|
|||
Condition="'$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' == '.msi' And !$(Architecture.StartsWith('arm'))">
|
||||
<BaseUrl>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreBlobVersion)</BaseUrl>
|
||||
<DownloadFileName>$(DownloadedAspNetCoreSharedFxWixLibFileName)</DownloadFileName>
|
||||
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
|
||||
</BundledInstallerComponent>
|
||||
|
||||
<BundledInstallerComponent Include="DownloadedAspNetCoreV2ModuleInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' == '.msi' And !$(Architecture.StartsWith('arm'))">
|
||||
<BaseUrl>$(AspNetCoreSharedFxRootUrl)$(AspNetCoreBlobVersion)</BaseUrl>
|
||||
<DownloadFileName>$(DownloadedAspNetCoreV2ModuleInstallerFileName)</DownloadFileName>
|
||||
<AccessToken>$(CoreSetupBlobAccessTokenParam)</AccessToken>
|
||||
</BundledInstallerComponent>
|
||||
|
||||
<BundledInstallerComponent Include="AspNetCoreSharedFxBaseRuntimeVersionFile"
|
||||
|
@ -296,13 +295,13 @@
|
|||
</BundledLayoutPackage>
|
||||
|
||||
<BundledLayoutComponent Include="WinFormsAndWpfSharedFxArchiveFile">
|
||||
<BaseUrl>$(WinFormsAndWpfSharedFxRootUrl)$(CoreSetupBlobVersion)</BaseUrl>
|
||||
<BaseUrl>$(WinFormsAndWpfSharedFxRootUrl)$(WindowsDesktopTargetingPackBlobVersion)</BaseUrl>
|
||||
<DownloadFileName>$(WinFormsAndWpfSharedFxArchiveFileName)</DownloadFileName>
|
||||
</BundledLayoutComponent>
|
||||
|
||||
<BundledInstallerComponent Include="DownloadedWinFormsAndWpfSharedFrameworkInstallerFile"
|
||||
Condition="'$(SkipBuildingInstallers)' != 'true' And '$(InstallerExtension)' != '' And !$(Architecture.StartsWith('arm'))">
|
||||
<BaseUrl>$(WinFormsAndWpfSharedFxRootUrl)$(CoreSetupBlobVersion)</BaseUrl>
|
||||
<BaseUrl>$(WinFormsAndWpfSharedFxRootUrl)$(WindowsDesktopBlobVersion)</BaseUrl>
|
||||
<DownloadFileName>$(DownloadedWinFormsAndWpfSharedFrameworkInstallerFileName)</DownloadFileName>
|
||||
</BundledInstallerComponent>
|
||||
</ItemGroup>
|
||||
|
@ -405,7 +404,7 @@
|
|||
<ReplacementString>"version": "$(MicrosoftNETCoreAppRuntimePackageVersion)"</ReplacementString>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ToolRuntimeConfigPath Include="$(RedistLayoutPath)sdk/$(SdkVersion)/**/*.runtimeconfig.json" />
|
||||
<ToolRuntimeConfigPath Include="$(RedistLayoutPath)sdk/$(Version)/**/*.runtimeconfig.json" />
|
||||
</ItemGroup>
|
||||
<ReplaceFileContents
|
||||
InputFiles="@(ToolRuntimeConfigPath)"
|
||||
|
@ -414,9 +413,15 @@
|
|||
ReplacementStrings="$(ReplacementString)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="GenerateVersionFile" DependsOnTargets="SetupBundledComponents;GetCoreSdkGitCommitInfo">
|
||||
<Target Name="GenerateVersionFile"
|
||||
DependsOnTargets="SetupBundledComponents;GetCommitHash;GenerateFullNuGetVersion">
|
||||
<WriteLinesToFile File="$(SdkOutputDirectory).version"
|
||||
Lines="$(GitCommitHash);$(SdkVersion);$(Rid)"
|
||||
Lines="$(GitCommitHash);$(Version);$(Rid)"
|
||||
Overwrite="true" />
|
||||
|
||||
<!-- This is a hack to make the full nuget version available during the publishing step -->
|
||||
<WriteLinesToFile File="$(ArtifactsTmpDir)FullNugetVersion.version"
|
||||
Lines="$(FullNugetVersion)"
|
||||
Overwrite="true" />
|
||||
</Target>
|
||||
|
||||
|
@ -475,6 +480,7 @@
|
|||
DependsOnTargets="DownloadBundledComponents;
|
||||
CleanLayoutPath;
|
||||
LayoutBundledComponents;
|
||||
GenerateFullNuGetVersion;
|
||||
GenerateVersionFile;
|
||||
GenerateBundledVersions;
|
||||
LayoutRuntimeGraph;
|
||||
|
@ -497,11 +503,11 @@
|
|||
|
||||
<!-- Create "SDK Internal" layout to create the MSI to bundle -->
|
||||
<ItemGroup>
|
||||
<SdkInternalFiles Include="$(RedistLayoutPath)sdk/$(SdkVersion)/**/*.*"/>
|
||||
<SdkInternalFiles Include="$(RedistLayoutPath)sdk/$(Version)/**/*.*"/>
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(SdkInternalFiles)"
|
||||
DestinationFiles="@(SdkInternalFiles -> '$(SdkInternalLayoutPath)sdk\$(SdkVersion)\%(RecursiveDir)%(Filename)%(Extension)')"/>
|
||||
DestinationFiles="@(SdkInternalFiles -> '$(SdkInternalLayoutPath)sdk\$(Version)\%(RecursiveDir)%(Filename)%(Extension)')"/>
|
||||
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -53,19 +53,42 @@
|
|||
<SdkLayoutOutputDirectory>$(LayoutDirectory)$(ArtifactNameSdk)</SdkLayoutOutputDirectory>
|
||||
<MSBuildExtensionsOutputDirectory>$(LayoutDirectory)MSBuildExtensions</MSBuildExtensionsOutputDirectory>-->
|
||||
</PropertyGroup>
|
||||
|
||||
<Exec Command="git rev-list --count HEAD"
|
||||
ConsoleToMSBuild="true"
|
||||
Condition=" '$(GitCommitCount)' == '' ">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitCount" />
|
||||
</Exec>
|
||||
|
||||
<Error Condition=" '$(OfficialBuild)' == 'true' And '$(_PatchNumber)' == '' "
|
||||
Text="_PatchNumber should not be empty in an official build. Check if there were changes in Arcade." />
|
||||
|
||||
<PropertyGroup>
|
||||
<GitCommitCount>$(GitCommitCount.PadLeft(6,'0'))</GitCommitCount>
|
||||
|
||||
<!-- This number comes from arcade and combines the date based build number id and the revision (incremental number per day) -->
|
||||
<CombinedBuildNumberAndRevision>$(_PatchNumber)</CombinedBuildNumberAndRevision>
|
||||
<!-- Fallback to commit count when patch number is not set. This happens only during CI. -->
|
||||
<CombinedBuildNumberAndRevision Condition=" '$(CombinedBuildNumberAndRevision)' == '' ">$(GitCommitCount)</CombinedBuildNumberAndRevision>
|
||||
|
||||
<!-- This number comes from arcade and combines the date based build number id and the revision (incremental number per day) -->
|
||||
<SDKBundleVersion>$(FileVersion)</SDKBundleVersion>
|
||||
<!-- Fallback to commit count when patch number is not set. This happens only during CI. -->
|
||||
<SDKBundleVersion Condition=" '$(SDKBundleVersion)' == '' ">$(VersionPrefix).$(CombinedBuildNumberAndRevision)</SDKBundleVersion>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="MsiTargetsSetupInputOutputs"
|
||||
DependsOnTargets="GenerateLayout;SetupWixProperties;GetCoreSdkGitCommitInfo">
|
||||
DependsOnTargets="GenerateLayout;SetupWixProperties">
|
||||
<!-- Consumed By Publish -->
|
||||
<ItemGroup>
|
||||
<GeneratedInstallers Include="$(SdkMSIInstallerFile);$(Templates31MSIInstallerFile);$(Templates30MSIInstallerFile);$(Templates21MSIInstallerFile);$(CombinedFrameworkSdkHostMSIInstallerFile);$(SdkPlaceholderMSIInstallerFile)" />
|
||||
</ItemGroup>
|
||||
|
||||
<GenerateMsiVersion CommitCount="$(GitCommitCount)"
|
||||
<GenerateMsiVersion VersionRevision="$(CombinedBuildNumberAndRevision)"
|
||||
VersionMajor="$(VersionMajor)"
|
||||
VersionMinor="$(VersionMinor)"
|
||||
VersionPatch="$(VersionPatch)">
|
||||
VersionPatch="$(VersionFeature)">
|
||||
<Output TaskParameter="MsiVersion" PropertyName="MsiVersion" />
|
||||
</GenerateMsiVersion>
|
||||
|
||||
|
@ -138,7 +161,7 @@
|
|||
'$(ToolsetBrandName)' ^
|
||||
'$(MsiVersion)' ^
|
||||
'$(SDKBundleVersion)' ^
|
||||
'$(NugetVersion)' ^
|
||||
'$(Version)' ^
|
||||
'$(SdkInstallerUpgradeCode)' ^
|
||||
'$(SdkDependencyKeyName)' ^
|
||||
'$(Architecture)' ^
|
||||
|
@ -158,7 +181,7 @@
|
|||
'$(SdkBrandName)' ^
|
||||
'$(MsiVersion)' ^
|
||||
'$(SDKBundleVersion)' ^
|
||||
'$(NugetVersion)' ^
|
||||
'$(Version)' ^
|
||||
'$(SdkPlaceholderInstallerUpgradeCode)' ^
|
||||
'$(SdkPlaceholderDependencyKeyName)' ^
|
||||
'$(Architecture)' ^
|
||||
|
@ -250,7 +273,7 @@
|
|||
'$(SdkBrandName)' ^
|
||||
'$(MsiVersion)' ^
|
||||
'$(SDKBundleVersion)' ^
|
||||
'$(NugetVersion)' ^
|
||||
'$(Version)' ^
|
||||
'$(MicrosoftWindowsDesktopAppRuntimePackageVersion)' ^
|
||||
'$(CombinedFrameworkSDKHostInstallerUpgradeCode)' ^
|
||||
'$(SdkDependencyKeyName)' ^
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project>
|
||||
<Target Name="SetupPKGProps" DependsOnTargets="SetSdkVersionInfo;GetCurrentRuntimeInformation;SetupFileExtensions">
|
||||
<Target Name="SetupPKGProps" DependsOnTargets="GetCurrentRuntimeInformation;SetupFileExtensions">
|
||||
<PropertyGroup>
|
||||
<PkgIntermediateDirectory>$(IntermediateOutputPath)pkgs/$(SdkVersion)</PkgIntermediateDirectory>
|
||||
<PkgIntermediateDirectory>$(IntermediateOutputPath)pkgs/$(Version)</PkgIntermediateDirectory>
|
||||
|
||||
<!-- Properties for pkg build -->
|
||||
<SharedHostComponentId>com.microsoft.dotnet.sharedhost.$(SharedHostVersion).component.osx.x64</SharedHostComponentId>
|
||||
|
@ -10,8 +10,8 @@
|
|||
<NetCoreAppTargetingPackComponentId>com.microsoft.dotnet.pack.targeting.$(MicrosoftNETCoreAppRefPackageVersion).component.osx.x64</NetCoreAppTargetingPackComponentId>
|
||||
<NetCoreAppHostPackComponentId>com.microsoft.dotnet.pack.apphost.$(MicrosoftNETCoreAppHostPackageVersion).component.osx.x64</NetCoreAppHostPackComponentId>
|
||||
<NetStandardTargetingPackComponentId>com.microsoft.standard.pack.targeting.$(NETStandardLibraryRefPackageVersion).component.osx.x64</NetStandardTargetingPackComponentId>
|
||||
<SdkComponentId>com.microsoft.dotnet.dev.$(SdkVersion).component.osx.x64</SdkComponentId>
|
||||
<SdkProductArchiveId>com.microsoft.dotnet.dev.$(SdkVersion).osx.x64</SdkProductArchiveId>
|
||||
<SdkComponentId>com.microsoft.dotnet.dev.$(Version).component.osx.x64</SdkComponentId>
|
||||
<SdkProductArchiveId>com.microsoft.dotnet.dev.$(Version).osx.x64</SdkProductArchiveId>
|
||||
|
||||
<PkgInstallDirectory>/usr/local/share/dotnet</PkgInstallDirectory>
|
||||
|
||||
|
@ -62,7 +62,7 @@
|
|||
<ReplacementString>$(SdkComponentId)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{CLISdkNugetVersion}">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
<ReplacementString>$(Version)</ReplacementString>
|
||||
</DistributionTemplateReplacement>
|
||||
<DistributionTemplateReplacement Include="{CLISdkBrandName}">
|
||||
<ReplacementString>$(SdkBrandName)</ReplacementString>
|
||||
|
@ -87,11 +87,11 @@
|
|||
</DistributionTemplateReplacement>
|
||||
|
||||
<PostInstallScriptReplacement Include="%SDK_VERSION%">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
<ReplacementString>$(Version)</ReplacementString>
|
||||
</PostInstallScriptReplacement>
|
||||
|
||||
<ResourcesReplacement Include="{DOTNETSDKVERSION}">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
<ReplacementString>$(Version)</ReplacementString>
|
||||
</ResourcesReplacement>
|
||||
<ResourcesReplacement Include="{DOTNETRUNTIMEVERSION}">
|
||||
<ReplacementString>$(MicrosoftNETCoreAppRuntimePackageVersion)</ReplacementString>
|
||||
|
@ -162,7 +162,7 @@
|
|||
<Exec Command="pkgbuild \
|
||||
--root '$(SdkInternalLayoutPath)' \
|
||||
--identifier '$(SdkComponentId)' \
|
||||
--version '$(SdkVersion)' \
|
||||
--version '$(Version)' \
|
||||
--install-location '$(PkgInstallDirectory)' \
|
||||
--scripts '$(SdkPkgDestinationScriptsDirectory)' \
|
||||
'$(SdkPKGInstallerFile)'" />
|
||||
|
@ -201,7 +201,7 @@
|
|||
ReplacementStrings="@(DistributionTemplateReplacement -> '%(ReplacementString)')" />
|
||||
|
||||
<Exec Command="productbuild \
|
||||
--version '$(SdkVersion)' \
|
||||
--version '$(Version)' \
|
||||
--identifier '$(SdkProductArchiveId)' \
|
||||
--package-path '$(PkgIntermediateDirectory)' \
|
||||
--resources '$(SdkProductArchiveResourcesDirectory)' \
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<ReplacementString>$(AspNetTargetingPackRpmPackageName)</ReplacementString>
|
||||
</SDKTokenValue>
|
||||
<SDKTokenValue Include="%SDK_NUGET_VERSION%">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
<ReplacementString>$(Version)</ReplacementString>
|
||||
</SDKTokenValue>
|
||||
<SDKTokenValue Include="%CLI_SDK_BRAND_NAME%">
|
||||
<ReplacementString>$(SdkBrandName)</ReplacementString>
|
||||
|
@ -121,7 +121,7 @@
|
|||
</SDKTokenValue>
|
||||
|
||||
<AfterInstallHostTokenValue Include="%SDK_VERSION%">
|
||||
<ReplacementString>$(SdkVersion)</ReplacementString>
|
||||
<ReplacementString>$(Version)</ReplacementString>
|
||||
</AfterInstallHostTokenValue>
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -175,11 +175,11 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="SetupRpmProps"
|
||||
DependsOnTargets="SetSdkVersionInfo;CalculateLinuxNativeInstallerDependencyVersions;GetCurrentRuntimeInformation;SetupFileExtensions">
|
||||
DependsOnTargets="CalculateLinuxNativeInstallerDependencyVersions;GetCurrentRuntimeInformation;SetupFileExtensions">
|
||||
<PropertyGroup>
|
||||
<SdkRpmPackageVersion>$(MajorMinorVersion)</SdkRpmPackageVersion>
|
||||
<SdkRpmPackageName>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkRpmPackageVersion)</SdkRpmPackageName>
|
||||
<RpmPackageVersion>$(SdkVersion)</RpmPackageVersion>
|
||||
<RpmPackageVersion>$(Version)</RpmPackageVersion>
|
||||
<InputRoot>$(RedistLayoutPath)sdk/</InputRoot>
|
||||
<DotnetNewTemplatesRoot>$(RedistLayoutPath)templates/</DotnetNewTemplatesRoot>
|
||||
<SdkRPMInstallerFile>$(ArtifactsShippingPackagesDir)$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)$(InstallerExtension)</SdkRPMInstallerFile>
|
||||
|
@ -288,6 +288,7 @@
|
|||
Outputs="$(RpmTestResultsXmlFile)" >
|
||||
|
||||
<!-- Install Dependencies and SDK Packages -->
|
||||
<Exec Command="sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc" />
|
||||
<Exec Command="sudo rpm -iv $(DownloadedRuntimeDepsInstallerFile)" />
|
||||
<Exec Command="sudo rpm -iv $(DownloadedNetCoreAppHostPackInstallerFile)" />
|
||||
<Exec Command="sudo rpm -iv $(DownloadedNetCoreAppTargetingPackInstallerFile)" />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<Project>
|
||||
<Target Name="GetCurrentRuntimeInformation" DependsOnTargets="SetSdkVersionInfo">
|
||||
<Target Name="GetCurrentRuntimeInformation">
|
||||
<GetCurrentRuntimeInformation>
|
||||
<Output TaskParameter="Rid" PropertyName="HostRid" />
|
||||
<Output TaskParameter="OSName" PropertyName="HostOSName" />
|
||||
|
@ -13,7 +13,6 @@
|
|||
<OSName Condition=" '$(OSName)' == '' AND '$(IsLinux)' == 'True' ">linux</OSName>
|
||||
<OSPlatform Condition=" '$(OSPlatform)' == '' AND '$(IsLinux)' == 'True' ">linux</OSPlatform>
|
||||
|
||||
<Architecture Condition=" '$(Architecture)' == '' ">x64</Architecture>
|
||||
<Rid Condition=" '$(Rid)' == '' ">$(OSName)-$(Architecture)</Rid>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -40,13 +39,13 @@
|
|||
<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
|
||||
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>
|
||||
|
||||
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
|
||||
<ArtifactNameWithVersionMSBuildExtensions>dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionMSBuildExtensions>
|
||||
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(Version)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
|
||||
<ArtifactNameWithVersionMSBuildExtensions>dotnet-standard-support-vs2015-$(Version)-$(ProductMonikerRid)</ArtifactNameWithVersionMSBuildExtensions>
|
||||
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(Version)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
<!-- Warning: changing the value "ProductBandCombinedHostHostFxrFrameworkSdkName" can only occur on a product-band boundary [CliProductBandVersion],
|
||||
Changing "ProductBandCombinedHostHostFxrFrameworkSdkName" mid-product-band will break the upgradablilty of the SDK bundle installer. -->
|
||||
<ProductBandCombinedHostHostFxrFrameworkSdkName>Dotnet SDK Bundle Installer $(CliProductBandVersion) $(ProductMonikerRid)</ProductBandCombinedHostHostFxrFrameworkSdkName>
|
||||
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>
|
||||
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(Version)-</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>
|
||||
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid)$(HostMonikerRidForFileName)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
|
|
@ -1,55 +1,16 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<VersionMajor>3</VersionMajor>
|
||||
<VersionMinor>1</VersionMinor>
|
||||
<VersionSDKMinor>2</VersionSDKMinor>
|
||||
<VersionPatch>00</VersionPatch>
|
||||
<ReleaseSuffix Condition=" '$(ReleaseSuffix)' == '' ">preview</ReleaseSuffix>
|
||||
<!--
|
||||
When DropSuffix is set to 'true', this branch will produce stable outputs for 'Shipping' packages
|
||||
-->
|
||||
<DropSuffix>false</DropSuffix>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="GetCoreSdkGitCommitInfo">
|
||||
<Exec Command="git rev-list --count HEAD"
|
||||
ConsoleToMSBuild="true"
|
||||
Condition=" '$(GitCommitCount)' == '' ">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitCount" />
|
||||
</Exec>
|
||||
<Target Name="GenerateFullNuGetVersion">
|
||||
<PropertyGroup>
|
||||
<FullNugetVersion>$(VersionPrefix)-$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</FullNugetVersion>
|
||||
<FullNugetVersion Condition=" '$(VersionSuffixDateStamp)' != '' And '$(VersionSuffixBuildOfTheDay)' != '' ">$(FullNugetVersion).$(VersionSuffixDateStamp).$(VersionSuffixBuildOfTheDay)</FullNugetVersion>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="GetCommitHash">
|
||||
<Exec Command="git rev-parse HEAD"
|
||||
ConsoleToMSBuild="true"
|
||||
Condition=" '$(GitCommitHash)' == '' ">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitHash" />
|
||||
</Exec>
|
||||
|
||||
<PropertyGroup>
|
||||
<GitCommitCount>$(GitCommitCount.PadLeft(6,'0'))</GitCommitCount>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="SetSdkVersionInfo" DependsOnTargets="GetCoreSdkGitCommitInfo">
|
||||
<PropertyGroup>
|
||||
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>
|
||||
<CliProductBandVersion>$(MajorMinorVersion).$(VersionSDKMinor)</CliProductBandVersion>
|
||||
<CliVersionNoSuffix>$(CliProductBandVersion)$(VersionPatch)</CliVersionNoSuffix>
|
||||
<CliVersionPrefix>$(CliVersionNoSuffix)-$(ReleaseSuffix)</CliVersionPrefix>
|
||||
<CliBrandingVersion Condition=" '$(DropSuffix)' != 'true' ">$(CliVersionNoSuffix) - $(ReleaseSuffix)</CliBrandingVersion>
|
||||
<CliBrandingVersion Condition=" '$(DropSuffix)' == 'true' ">$(CliVersionNoSuffix)</CliBrandingVersion>
|
||||
<SDKBundleVersion>$(CliVersionNoSuffix).$(GitCommitCount)</SDKBundleVersion>
|
||||
|
||||
<VersionSuffix Condition=" '$(DropSuffix)' != 'true' ">$(ReleaseSuffix)-$(GitCommitCount)</VersionSuffix>
|
||||
|
||||
<FullNugetVersion>$(CliVersionNoSuffix)-$(ReleaseSuffix)-$(GitCommitCount)</FullNugetVersion>
|
||||
|
||||
<NugetVersion Condition=" '$(DropSuffix)' != 'true' ">$(FullNugetVersion)</NugetVersion>
|
||||
<NugetVersion Condition=" '$(NugetVersion)' == '' ">$(CliVersionNoSuffix)</NugetVersion>
|
||||
|
||||
<SdkVersion>$(NugetVersion)</SdkVersion>
|
||||
<SdkNugetVersion>$(NugetVersion)</SdkNugetVersion>
|
||||
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -7,11 +7,6 @@
|
|||
<!-- Copy empty Directory.Build files to stop tests from getting repo build logic -->
|
||||
<Content Include="$(RepoRoot)TestAssets\Directory.Build.props" LinkBase="Tests" CopyToOutputDirectory="PreserveNewest" />
|
||||
<Content Include="$(RepoRoot)TestAssets\Directory.Build.targets" LinkBase="Tests" CopyToOutputDirectory="PreserveNewest" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(MicrosoftDotNetPlatformAbstractionsPackageVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace EndToEnd
|
|||
[ClassData(typeof(SupportedNetCoreAppVersions))]
|
||||
public void ItDoesNotRollForwardToTheLatestVersionOfNetCore(string minorVersion)
|
||||
{
|
||||
if (minorVersion == "3.0" || minorVersion == "3.1")
|
||||
if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0")
|
||||
{
|
||||
// https://github.com/dotnet/core-sdk/issues/621
|
||||
return;
|
||||
|
@ -31,7 +31,7 @@ namespace EndToEnd
|
|||
[ClassData(typeof(SupportedAspNetCoreVersions))]
|
||||
public void ItDoesNotRollForwardToTheLatestVersionOfAspNetCoreApp(string minorVersion)
|
||||
{
|
||||
if (minorVersion == "3.0" || minorVersion == "3.1")
|
||||
if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0")
|
||||
{
|
||||
// https://github.com/dotnet/core-sdk/issues/621
|
||||
return;
|
||||
|
|
195
test/EndToEnd/GivenSelfContainedAppsRollForward.cs
Normal file
195
test/EndToEnd/GivenSelfContainedAppsRollForward.cs
Normal file
|
@ -0,0 +1,195 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using FluentAssertions;
|
||||
using Microsoft.DotNet.TestFramework;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using NuGet.ProjectModel;
|
||||
using NuGet.Versioning;
|
||||
using Xunit;
|
||||
|
||||
namespace EndToEnd
|
||||
{
|
||||
public partial class GivenSelfContainedAppsRollForward : TestBase
|
||||
{
|
||||
|
||||
[Theory]
|
||||
// MemberData is used instead of InlineData here so we can access it in another test to
|
||||
// verify that we are covering the latest release of .NET Core
|
||||
[ClassData(typeof(SupportedNetCoreAppVersions))]
|
||||
public void ItRollsForwardToTheLatestNetCoreVersion(string minorVersion)
|
||||
{
|
||||
if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0")
|
||||
{
|
||||
// https://github.com/dotnet/core-sdk/issues/621
|
||||
return;
|
||||
}
|
||||
ItRollsForwardToTheLatestVersion(TestProjectCreator.NETCorePackageName, minorVersion);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[ClassData(typeof(SupportedAspNetCoreVersions))]
|
||||
public void ItRollsForwardToTheLatestAspNetCoreAppVersion(string minorVersion)
|
||||
{
|
||||
if (minorVersion == "3.0" || minorVersion == "3.1" || minorVersion == "5.0")
|
||||
{
|
||||
// https://github.com/dotnet/core-sdk/issues/621
|
||||
return;
|
||||
}
|
||||
ItRollsForwardToTheLatestVersion(TestProjectCreator.AspNetCoreAppPackageName, minorVersion);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[ClassData(typeof(SupportedAspNetCoreAllVersions))]
|
||||
public void ItRollsForwardToTheLatestAspNetCoreAllVersion(string minorVersion)
|
||||
{
|
||||
ItRollsForwardToTheLatestVersion(TestProjectCreator.AspNetCoreAllPackageName, minorVersion);
|
||||
}
|
||||
|
||||
internal void ItRollsForwardToTheLatestVersion(string packageName, string minorVersion)
|
||||
{
|
||||
var testProjectCreator = new TestProjectCreator()
|
||||
{
|
||||
PackageName = packageName,
|
||||
MinorVersion = minorVersion,
|
||||
// Set RuntimeIdentifier to opt in to roll-forward behavior
|
||||
RuntimeIdentifier = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
|
||||
};
|
||||
|
||||
var testInstance = testProjectCreator.Create();
|
||||
|
||||
string projectDirectory = testInstance.Root.FullName;
|
||||
|
||||
// Get the version rolled forward to
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
|
||||
string assetsFilePath = Path.Combine(projectDirectory, "obj", "project.assets.json");
|
||||
var assetsFile = new LockFileFormat().Read(assetsFilePath);
|
||||
|
||||
var rolledForwardVersion = GetPackageVersion(assetsFile, packageName);
|
||||
rolledForwardVersion.Should().NotBeNull();
|
||||
|
||||
if (rolledForwardVersion.IsPrerelease)
|
||||
{
|
||||
// If this version of .NET Core is still prerelease, then:
|
||||
// - Floating the patch by adding ".*" to the major.minor version won't work, but
|
||||
// - There aren't any patches to roll-forward to, so we skip testing this until the version
|
||||
// leaves prerelease.
|
||||
return;
|
||||
}
|
||||
|
||||
testProjectCreator.Identifier = "floating";
|
||||
|
||||
var floatingProjectInstance = testProjectCreator.Create();
|
||||
|
||||
var floatingProjectPath = Path.Combine(floatingProjectInstance.Root.FullName, "TestAppSimple.csproj");
|
||||
|
||||
var floatingProject = XDocument.Load(floatingProjectPath);
|
||||
var ns = floatingProject.Root.Name.Namespace;
|
||||
|
||||
|
||||
if (packageName == TestProjectCreator.NETCorePackageName)
|
||||
{
|
||||
// Float the RuntimeFrameworkVersion to get the latest version of the runtime available from feeds
|
||||
floatingProject.Root.Element(ns + "PropertyGroup")
|
||||
.Add(new XElement(ns + "RuntimeFrameworkVersion", $"{minorVersion}.*"));
|
||||
}
|
||||
else
|
||||
{
|
||||
floatingProject.Root.Element(ns + "ItemGroup")
|
||||
.Element(ns + "PackageReference")
|
||||
.Add(new XAttribute("Version", $"{minorVersion}.*"),
|
||||
new XAttribute("AllowExplicitVersion", "true"));
|
||||
}
|
||||
|
||||
floatingProject.Save(floatingProjectPath);
|
||||
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(floatingProjectInstance.Root.FullName)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
|
||||
string floatingAssetsFilePath = Path.Combine(floatingProjectInstance.Root.FullName, "obj", "project.assets.json");
|
||||
|
||||
var floatedAssetsFile = new LockFileFormat().Read(floatingAssetsFilePath);
|
||||
|
||||
var floatedVersion = GetPackageVersion(floatedAssetsFile, packageName);
|
||||
floatedVersion.Should().NotBeNull();
|
||||
|
||||
rolledForwardVersion.ToNormalizedString().Should().BeEquivalentTo(floatedVersion.ToNormalizedString(),
|
||||
$"the latest patch version for {packageName} {minorVersion} in Microsoft.NETCoreSdk.BundledVersions.props " +
|
||||
"needs to be updated (see the ImplicitPackageVariable items in MSBuildExtensions.targets in this repo)");
|
||||
}
|
||||
|
||||
private static NuGetVersion GetPackageVersion(LockFile lockFile, string packageName)
|
||||
{
|
||||
return lockFile?.Targets?.SingleOrDefault(t => t.RuntimeIdentifier != null)
|
||||
?.Libraries?.SingleOrDefault(l =>
|
||||
string.Compare(l.Name, packageName, StringComparison.CurrentCultureIgnoreCase) == 0)
|
||||
?.Version;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WeCoverLatestNetCoreAppRollForward()
|
||||
{
|
||||
// Run "dotnet new console", get TargetFramework property, and make sure it's covered in SupportedNetCoreAppVersions
|
||||
var directory = TestAssets.CreateTestDirectory();
|
||||
string projectDirectory = directory.FullName;
|
||||
|
||||
new NewCommandShim()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute("console --no-restore")
|
||||
.Should().Pass();
|
||||
|
||||
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
||||
|
||||
var project = XDocument.Load(projectPath);
|
||||
var ns = project.Root.Name.Namespace;
|
||||
|
||||
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
||||
.Element(ns + "TargetFramework")
|
||||
.Value;
|
||||
|
||||
SupportedNetCoreAppVersions.Versions.Select(v => $"netcoreapp{v}")
|
||||
.Should().Contain(targetFramework, $"the {nameof(SupportedNetCoreAppVersions)}.{nameof(SupportedNetCoreAppVersions.Versions)} property should include the default version " +
|
||||
"of .NET Core created by \"dotnet new\"");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WeCoverLatestAspNetCoreAppRollForward()
|
||||
{
|
||||
var directory = TestAssets.CreateTestDirectory();
|
||||
string projectDirectory = directory.FullName;
|
||||
|
||||
// Run "dotnet new web", get TargetFramework property, and make sure it's covered in SupportedAspNetCoreAppVersions
|
||||
|
||||
new NewCommandShim()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute("web --no-restore")
|
||||
.Should().Pass();
|
||||
|
||||
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
||||
|
||||
var project = XDocument.Load(projectPath);
|
||||
var ns = project.Root.Name.Namespace;
|
||||
|
||||
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
||||
.Element(ns + "TargetFramework")
|
||||
.Value;
|
||||
|
||||
SupportedAspNetCoreVersions.Versions.Select(v => $"netcoreapp{v}")
|
||||
.Should().Contain(targetFramework, $"the {nameof(SupportedAspNetCoreVersions)} should include the default version " +
|
||||
"of Microsoft.AspNetCore.App used by the templates created by \"dotnet new web\"");
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -36,8 +36,9 @@ namespace EndToEnd.Tests
|
|||
var runCommand = new RunCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput()
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello World!");
|
||||
// Templates are still at 3.1 and will not run on 5.0, revert to commented out assertion when 5.0 templates land
|
||||
//.Should().Pass().And.HaveStdOutContaining("Hello World!");
|
||||
.Should().Fail().And.HaveStdErrContaining("https://aka.ms/dotnet-core-applaunch");
|
||||
|
||||
var binDirectory = new DirectoryInfo(projectDirectory).Sub("bin");
|
||||
binDirectory.Should().HaveFilesMatching("*.dll", SearchOption.AllDirectories);
|
||||
|
@ -79,8 +80,10 @@ namespace EndToEnd.Tests
|
|||
var runCommand = new RunCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput()
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello World!");
|
||||
// Templates are still at 3.1 and will not run on 5.0, revert to commented out assertion when 5.0 templates land
|
||||
//.Should().Pass().And.HaveStdOutContaining("Hello World!");
|
||||
.Should().Fail().And.HaveStdErrContaining("https://aka.ms/dotnet-core-applaunch");
|
||||
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
@ -96,15 +99,15 @@ namespace EndToEnd.Tests
|
|||
}
|
||||
|
||||
[WindowsOnlyTheory]
|
||||
[InlineData("wpf")]
|
||||
[InlineData("winforms")]
|
||||
[InlineData("wpf", Skip = "https://github.com/dotnet/wpf/issues/2363")]
|
||||
[InlineData("winforms", Skip = "https://github.com/dotnet/wpf/issues/2363")]
|
||||
public void ItCanBuildDesktopTemplates(string templateName)
|
||||
{
|
||||
TestTemplateBuild(templateName);
|
||||
}
|
||||
|
||||
[WindowsOnlyTheory]
|
||||
[InlineData("wpf")]
|
||||
[InlineData("wpf", Skip = "https://github.com/dotnet/wpf/issues/2363")]
|
||||
public void ItCanBuildDesktopTemplatesSelfContained(string templateName)
|
||||
{
|
||||
TestTemplateBuild(templateName);
|
||||
|
|
|
@ -23,6 +23,7 @@ namespace EndToEnd
|
|||
"2.2",
|
||||
"3.0",
|
||||
"3.1",
|
||||
"5.0"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||
<TargetFramework>netcoreapp5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="$(MicrosoftDotNetPlatformAbstractionsPackageVersion)" />
|
||||
<PackageReference Include="Microsoft.DotNet.Cli.Utils" Version="$(MicrosoftDotNetCliUtilsPackageVersion)" />
|
||||
</ItemGroup>
|
||||
</Project>
|
77
test/Microsoft.DotNet.Tools.Tests.Utilities/RuntimeConfig.cs
Normal file
77
test/Microsoft.DotNet.Tools.Tests.Utilities/RuntimeConfig.cs
Normal file
|
@ -0,0 +1,77 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.IO;
|
||||
using Microsoft.DotNet.Cli.Utils;
|
||||
|
||||
namespace Microsoft.DotNet.TestFramework
|
||||
{
|
||||
internal class RuntimeConfigFramework
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Version { get; set; }
|
||||
}
|
||||
|
||||
public class RuntimeConfig
|
||||
{
|
||||
public bool IsPortable { get; }
|
||||
internal RuntimeConfigFramework Framework { get; }
|
||||
|
||||
public RuntimeConfig(string runtimeConfigPath)
|
||||
{
|
||||
var jsonDocumentOptions = new JsonDocumentOptions
|
||||
{
|
||||
AllowTrailingCommas = true,
|
||||
CommentHandling = JsonCommentHandling.Skip
|
||||
};
|
||||
|
||||
using (var stream = File.OpenRead(runtimeConfigPath))
|
||||
using (JsonDocument doc = JsonDocument.Parse(stream, jsonDocumentOptions))
|
||||
{
|
||||
JsonElement root = doc.RootElement;
|
||||
if (root.TryGetProperty("runtimeOptions", out var runtimeOptionsRoot))
|
||||
{
|
||||
if (runtimeOptionsRoot.TryGetProperty("framework", out var framework))
|
||||
{
|
||||
var runtimeConfigFramework = new RuntimeConfigFramework();
|
||||
string name = null;
|
||||
string version = null;
|
||||
foreach (var property in framework.EnumerateObject())
|
||||
{
|
||||
if (property.Name.Equals("name", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
name = property.Value.GetString();
|
||||
}
|
||||
|
||||
if (property.Name.Equals("version", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
version = property.Value.GetString();
|
||||
}
|
||||
}
|
||||
|
||||
if (name == null || version == null)
|
||||
{
|
||||
Framework = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
Framework = new RuntimeConfigFramework
|
||||
{
|
||||
Name = name,
|
||||
Version = version
|
||||
};
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Framework = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IsPortable = Framework != null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -34,12 +34,17 @@
|
|||
<SdkTest Include="Build" />
|
||||
<SdkTest Include="Clean" />
|
||||
<SdkTest Include="Pack" />
|
||||
<SdkTest Include="Publish" />
|
||||
<SdkTest Include="Rebuild" />
|
||||
<SdkTest Include="Restore" />
|
||||
<SdkTest Include="ToolPack" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Disable Publish tests on Windows x86 until we figure out why they were timing out
|
||||
https://github.com/dotnet/core-sdk/issues/6285 -->
|
||||
<ItemGroup Condition="('$(OS)' != 'Windows_NT') Or ('$(Architecture)' != 'x86')">
|
||||
<SdkTest Include="Publish" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="GetRuntimesToInstall">
|
||||
<PropertyGroup>
|
||||
<Supports1xRuntimes>true</Supports1xRuntimes>
|
||||
|
@ -87,6 +92,8 @@
|
|||
<ItemGroup>
|
||||
<RuntimeVersionToInstall Include="2.1.0" />
|
||||
<RuntimeVersionToInstall Include="2.2.5" />
|
||||
<RuntimeVersionToInstall Include="3.0.0" />
|
||||
<RuntimeVersionToInstall Include="3.1.0-preview1.19506.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</TestList>
|
||||
|
||||
<SkippedTests>
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToUseVB.It_builds_a_vb_wpf_app"
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToUseVB.It_builds_a_vb_wpf_app"
|
||||
Skip="true"
|
||||
Issue="https://github.com/dotnet/wpf/issues/1734"
|
||||
Reason="VB templates removed from wpf"/>
|
||||
|
@ -55,46 +55,10 @@
|
|||
Issue="https://github.com/dotnet/sdk/pull/3574"
|
||||
Reason="Test update needed (in PR)"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenFrameworkReferences.RuntimeFrameworkVersionCanBeSpecifiedOnFrameworkReference"
|
||||
Skip="true"
|
||||
Issue="https://github.com/dotnet/sdk/pull/3221"
|
||||
Reason="Code flow needed"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenFrameworkReferences.TargetingPackVersionCanBeSpecifiedOnFrameworkReference"
|
||||
Skip="true"
|
||||
Issue="https://github.com/dotnet/sdk/pull/3221"
|
||||
Reason="Code flow needed"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenFrameworkReferences.TargetLatestPatchCanBeSpecifiedOnFrameworkReference"
|
||||
Skip="true"
|
||||
Issue="https://github.com/dotnet/sdk/pull/3221"
|
||||
Reason="Code flow needed"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenFrameworkReferences.TransitiveFrameworkReferenceFromPackageReference"
|
||||
Skip="true"
|
||||
Issue="https://github.com/dotnet/sdk/pull/3221"
|
||||
Reason="Code flow needed"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenFrameworkReferences.TransitiveFrameworkReferenceFromProjectReference"
|
||||
Skip="true"
|
||||
Issue="https://github.com/dotnet/sdk/pull/3221"
|
||||
Reason="Code flow needed"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToResolveConflicts.AProjectCanReferenceADllInAPackageDirectly"
|
||||
Skip="true"
|
||||
Issue="https://github.com/dotnet/sdk/pull/3214"
|
||||
Reason="Code flow needed"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPreserveCompilationContext.It_publishes_the_project_with_a_refs_folder_and_correct_deps_file"
|
||||
Skip="true"
|
||||
Issue="https://github.com/dotnet/sdk/pull/3237"
|
||||
Reason="Code flow needed"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToBuildANetCoreApp.It_targets_the_right_framework_depending_on_output_type"
|
||||
<!-- <Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToBuildANetCoreApp.It_targets_the_right_framework_depending_on_output_type"
|
||||
Skip="true"
|
||||
Issue=""
|
||||
Reason="Test needs to be updated with new patches (along with SDK stage 0 update)"/>
|
||||
|
||||
Reason="Test needs to be updated with new patches (along with SDK stage 0 update)"/> -->
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToBuildAnAppWithLibrariesAndRid.It_builds_a_RID_specific_runnable_output"
|
||||
Skip="true"
|
||||
|
@ -146,20 +110,32 @@
|
|||
Issue=""
|
||||
Reason="Needs .NET Core 1.1"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToBuildANetCoreApp.It_runs_a_rid_specific_app_from_the_output_folder"
|
||||
<!-- <Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToBuildADesktopExeWithFSharp.It_builds_a_simple_desktop_app"
|
||||
Skip="true"
|
||||
Issue=""
|
||||
Reason="Needs .NET Core 2.1.15"/>
|
||||
Issue="https://github.com/dotnet/coreclr/issues/27275"
|
||||
Reason="F# compiler is failing on .NET 5 runtime"
|
||||
/>
|
||||
|
||||
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishASelfContainedApp.It_can_make_a_Windows_GUI_exe"
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToBuildALibraryWithFSharp.It_builds_the_library_successfully"
|
||||
Skip="true"
|
||||
Issue=""
|
||||
Reason="Needs .NET Core 2.1.15"/>
|
||||
Issue="https://github.com/dotnet/coreclr/issues/27275"
|
||||
Reason="F# compiler is failing on .NET 5 runtime"
|
||||
/> -->
|
||||
|
||||
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAFrameworkDependentApp.It_publishes_with_or_without_apphost"
|
||||
<Method Name="Microsoft.NET.Publish.Tests.PublishWpfApp.It_publishes_and_runs_self_contained_wpf_app"
|
||||
Skip="true"
|
||||
Issue=""
|
||||
Reason="Needs .NET Core 2.1.15 on Mac OS"/>
|
||||
|
||||
Reason="Assumes `dotnet new wpf`produces a netcoreapp3.1 app, will get fixed when sdk takes .NET 5 stage 0"
|
||||
/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenWeWantToRequireWindowsForDesktopApps.It_does_not_download_desktop_targeting_packs_on_unix"
|
||||
Skip="true"
|
||||
Issue=""
|
||||
Reason="Assumes netcoreapp3.1 targeting pack is bundled, which it is not in 5.0 SDK. Will resolve when sdk takes newer stage 0 and hits same issue."/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenWeWantToRequireWindowsForDesktopApps.It_builds_on_windows_with_the_windows_desktop_sdk"
|
||||
Skip="true"
|
||||
Issue="https://github.com/dotnet/wpf/issues/2363"
|
||||
Reason="Desktop SDK missing required files."/>
|
||||
</SkippedTests>
|
||||
</Tests>
|
||||
|
|
Loading…
Reference in a new issue