From f7e1cb989aedd071a754cd36ea01fb1f1e982e6b Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Wed, 9 Jun 2021 09:05:55 -0500 Subject: [PATCH] Install .NET runtime 2.1 in Windows CI for tests --- .vsts-ci.yml | 3 ++- eng/build.yml | 11 +++++++++-- eng/cibuild.cmd | 8 ++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 eng/cibuild.cmd diff --git a/.vsts-ci.yml b/.vsts-ci.yml index 8bdf2d7..8cef650 100644 --- a/.vsts-ci.yml +++ b/.vsts-ci.yml @@ -25,7 +25,7 @@ phases: ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: name: DotNetCore-Windows demands: - - agent.os -equals Windows_NT + - agent.os -equals Windows_NT parallel: 2 matrix: ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: @@ -98,5 +98,6 @@ phases: publishUsingPipelines: true dependsOn: - Windows_NT + - Source_Build_Managed queue: name: Hosted VS2017 diff --git a/eng/build.yml b/eng/build.yml index e7991c6..64d8e8e 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -40,7 +40,7 @@ phases: azureSubscription: 'HelixProd_KeyVault' KeyVaultName: HelixProdKV SecretsFilter: 'HelixApiAccessToken' - condition: always() + condition: always() - task: AzureKeyVault@1 inputs: azureSubscription: 'DotNet-Engineering-Services_KeyVault' @@ -49,7 +49,14 @@ phases: condition: succeeded() - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - - script: eng\common\CIBuild.cmd + # workaround for https://github.com/dotnet/arcade/issues/7493 + - powershell: echo "##vso[task.setvariable variable=BUILD_REPOSITORY_URI]https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-cliCommandLineParser" + displayName: Fixup BUILD_REPOSITORY_URI + - powershell: echo "##vso[task.setvariable variable=SYSTEM_TEAMFOUNDATIONCOLLECTIONURI]https://dnceng@dev.azure.com/dnceng/internal/_git/dotnet-cliCommandLineParser" + displayName: Fixup BUILD_REPOSITORY_URI + - script: echo %BUILD_REPOSITORY_URI% + - script: echo %SYSTEM_TEAMFOUNDATIONCOLLECTIONURI% + - script: eng\CIBuild.cmd -configuration %BuildConfig% $(_PublishArgs) $(_SignArgs) diff --git a/eng/cibuild.cmd b/eng/cibuild.cmd new file mode 100644 index 0000000..b8b22d7 --- /dev/null +++ b/eng/cibuild.cmd @@ -0,0 +1,8 @@ +@echo off + +@REM install the 2.1.0 runtime for running tests +powershell -ExecutionPolicy ByPass -command "& """%~dp0common\dotnet-install.ps1""" -runtime dotnet -version 2.1.0" +if %errorlevel% neq 0 exit /b %errorlevel% + +powershell -ExecutionPolicy ByPass -command "& """%~dp0common\Build.ps1""" -restore -build -test -sign -pack -publish -ci %*" +exit /b %errorlevel%