From: Mike McLaughlin Date: Tue, 7 Aug 2018 20:38:46 +0000 (-0700) Subject: Upgrade to RepoToolset version 1.0.0-beta2-63206-01 (#57) X-Git-Tag: submit/tizen/20190813.035844~84 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52e99408f38d97e5453295dd237ee8f4464b6711;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git Upgrade to RepoToolset version 1.0.0-beta2-63206-01 (#57) Upgrade to RepoToolset version 1.0.0-beta2-63206-01 --- diff --git a/Directory.Build.props b/Directory.Build.props index 4716da8b1..7cb64a97b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,12 +1,9 @@ - https://github.com/dotnet/diagnostics.git - $(RepositoryUrl) $(RepositoryUrl) http://go.microsoft.com/fwlink/?LinkId=529443 http://go.microsoft.com/fwlink/?LinkID=288859 - GitHub true diff --git a/eng/Build-Native.cmd b/eng/Build-Native.cmd index 580f090e3..fd9ed8562 100644 --- a/eng/Build-Native.cmd +++ b/eng/Build-Native.cmd @@ -331,11 +331,11 @@ echo %__MsgPrefix%Product binaries are available at !__BinDir! :: Test components if %__Test% EQU 1 ( :: Install the other versions of .NET Core runtime we are going to test on (2.0.9 and 1.1.9) - powershell -ExecutionPolicy ByPass -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 2.0.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet" - powershell -ExecutionPolicy ByPass -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 1.1.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet" + powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 2.0.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet" + powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\.dotnet\dotnet-install.ps1""" -Version 1.1.9 -Architecture %__BuildArch% -SkipNonVersionedFiles -Runtime dotnet -InstallDir %__ProjectDir%\.dotnet" :: Run the xunit tests - powershell -ExecutionPolicy ByPass -command "& """%__ProjectDir%\eng\common\Build.ps1""" -test -configuration %__BuildType% -verbosity %__Verbosity% %__TestArgs%" + powershell -ExecutionPolicy ByPass -NoProfile -command "& """%__ProjectDir%\eng\common\Build.ps1""" -test -configuration %__BuildType% -verbosity %__Verbosity% %__TestArgs%" exit /b %ERRORLEVEL ) exit /b 0 diff --git a/eng/Build.cmd b/eng/Build.cmd index 8c433a991..16bbed608 100644 --- a/eng/Build.cmd +++ b/eng/Build.cmd @@ -6,7 +6,7 @@ set "__args=%*" set "__args=%__args:-test=%" :: build managed components -powershell -ExecutionPolicy ByPass -command "& """%~dp0common\Build.ps1""" %__args%" +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0common\Build.ps1""" %__args%" if NOT '%ERRORLEVEL%' == '0' exit /b %ERRORLEVEL% :: build native componments and test managed/native diff --git a/eng/BuildTask.targets b/eng/BuildTask.targets new file mode 100644 index 000000000..6f3b5366c --- /dev/null +++ b/eng/BuildTask.targets @@ -0,0 +1,71 @@ + + + $(MSBuildAllProjects);$(MSBuildThisFileFullPath) + + + + false + true + + + + + + %(RecursiveDir)%(Filename)%(Extension) + + + + + + + + + + + + All + true + runtime + + + All + true + + + + false + + + + + + $(TargetsForTfmSpecificContentInPackage);CollectAssets + + + + + + + + tools/$(TargetFramework)/%(FilteredFileToPublish.RelativePath) + + + + diff --git a/eng/CIBuild.cmd b/eng/CIBuild.cmd index 82ecb68a5..2cd76c23c 100644 --- a/eng/CIBuild.cmd +++ b/eng/CIBuild.cmd @@ -1,3 +1,3 @@ @echo off -call %~dp0Build.cmd -restore -build -test -ci %* +call %~dp0Build.cmd -restore -build -test -publish -sign -pack -ci %* exit /b %ErrorLevel% diff --git a/eng/SignToolData.json b/eng/SignToolData.json index 6de1857c5..aede13693 100644 --- a/eng/SignToolData.json +++ b/eng/SignToolData.json @@ -5,13 +5,14 @@ "strongName": "MsSharedLib72", "values": [ "bin/SOS.NETCore/netcoreapp1.0/SOS.NETCore.dll", + "bin/Microsoft.Diagnostic.TestHelpers/netcoreapp2.0/Microsoft.Diagnostic.TestHelpers.dll" ] }, { "certificate": "NuGet", "strongName": null, "values": [ - "packages/*.nupkg" + "packages/Shipping/*.nupkg" ] } ], @@ -20,6 +21,6 @@ "Microsoft.SymbolStore.dll", "System.Collections.Immutable.dll", "System.Net.Http.dll", - "System.Reflection.Metadata.dll", + "System.Reflection.Metadata.dll" ] } diff --git a/eng/Versions.props b/eng/Versions.props index 921d6ace7..50a3d6613 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -7,6 +7,8 @@ 1.0.0 beta + 1.0.0-beta2-63127-01 + 2.8.0-beta6-62830-08 true false @@ -17,8 +19,6 @@ $(RestoreSources); - https://dotnet.myget.org/F/symstore/api/v3/index.json; - https://dotnet.myget.org/F/roslyn-tools/api/v3/index.json; https://dotnet.myget.org/F/dotnet-core/api/v3/index.json; https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json diff --git a/eng/build.yml b/eng/build.yml index 5230bc228..17a66c285 100644 --- a/eng/build.yml +++ b/eng/build.yml @@ -10,69 +10,71 @@ parameters: phaseName: '' agentOs: Windows_NT - buildReason: IndividualCI - queue: {} dockerImage: '' enableTelemetry: true + queue: {} useEsrpSigning: true phases: - template: /eng/common/templates/phases/base.yml parameters: agentOs: ${{ parameters.agentOs }} - buildReason: ${{ parameters.buildReason }} buildConfig: $(_BuildConfig) phaseName: ${{ parameters.phaseName }} enableTelemetry: ${{ parameters.enableTelemetry }} - fetchDepth: 5 helixType: build/product - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}: + ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}: helixSource: official/dotnet/arcade/$(Build.SourceBranch) - ${{ if in(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}: + ${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}: helixSource: pr/dotnet/arcade/$(Build.SourceBranch) phase: queue: ${{ parameters.queue }} variables: _DockerImageName: ${{ parameters.dockerImage }} _PhaseName : ${{ parameters.phaseName }} - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}: - _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-tools-internal/index.json + ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}: + _PublishBlobFeedUrl: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json _TeamName: DotNetCore _UseEsrpSigning: ${{ parameters.useEsrpSigning }} - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}: + ${{ if notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}: _PublishArgs: /p:PB_PublishBlobFeedKey=$(dotnetfeed-storage-access-key-1) /p:PB_PublishBlobFeedUrl=$(_PublishBlobFeedUrl) /p:PB_PublishType=$(_PublishType) - ${{ if in(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}: + ${{ if in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'PullRequest') }}: _PublishArgs: '' steps: - - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}: - - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 - displayName: Install MicroBuild plugin - inputs: - signType: $(_SignType) - zipSources: false - esrpSigning: $(_UseEsrpSigning) - env: - TeamName: $(_TeamName) - continueOnError: false - condition: and(succeeded(), in(variables._SignType, 'real', 'test')) - - - task: AzureKeyVault@1 - inputs: - azureSubscription: 'DotNet-Engineering-Services_KeyVault' - KeyVaultName: EngKeyVault - SecretsFilter: 'dotnetfeed-storage-access-key-1' - condition: succeeded() - - - script: $(Build.SourcesDirectory)\eng\cibuild.cmd + - template: /eng/common/templates/steps/run-on-windows.yml + parameters: + agentOs: ${{ parameters.agentOs }} + steps: + - template: /eng/common/templates/steps/build-reason.yml + parameters: + conditions: not IndividualCI,BatchedCI,PullRequest + steps: + - task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@1 + displayName: Install MicroBuild plugin + inputs: + signType: $(_SignType) + zipSources: false + esrpSigning: $(_UseEsrpSigning) + env: + TeamName: $(_TeamName) + continueOnError: false + condition: and(succeeded(), in(variables._SignType, 'real', 'test')) + - task: AzureKeyVault@1 + inputs: + azureSubscription: 'DotNet-Engineering-Services_KeyVault' + KeyVaultName: EngKeyVault + SecretsFilter: 'dotnetfeed-storage-access-key-1' + condition: succeeded() + - script: $(Build.SourcesDirectory)\eng\cibuild.cmd -configuration $(_BuildConfig) -architecture $(_BuildArch) -prepareMachine /p:SignType=$(_SignType) $(_PublishArgs) + name: Build_Test displayName: Build / Test env: OfficialBuildId: $(BUILD.BUILDNUMBER) @@ -83,12 +85,12 @@ phases: --docker-image $(_DockerImageName) --source-directory $(Build.SourcesDirectory) --container-name diagnostics-$(Build.BuildId) - --restore --build --test --configuration $(_BuildConfig) --architecture $(_BuildArch) --prepareMachine /p:SignType=$(_SignType) $(_PublishArgs) + name: Build_Test displayName: Docker Build / Test env: OfficialBuildId: $(BUILD.BUILDNUMBER) @@ -96,37 +98,38 @@ phases: - ${{ if eq(parameters.agentOs, 'Darwin') }}: - script: $(Build.SourcesDirectory)/eng/cibuild.sh - --restore --build --test --configuration $(_BuildConfig) --architecture $(_BuildArch) --prepareMachine /p:SignType=$(_SignType) $(_PublishArgs) + name: Build_Test displayName: Build / Test env: OfficialBuildId: $(BUILD.BUILDNUMBER) condition: succeeded() - - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}: - - task: CopyFiles@2 - displayName: Gather Logs - inputs: - SourceFolder: '$(Build.SourcesDirectory)/artifacts' - Contents: '**/*log' - TargetFolder: '$(Build.StagingDirectory)/BuildLogs' - continueOnError: true - condition: always() + - template: /eng/common/templates/steps/build-reason.yml + parameters: + conditions: not IndividualCI,BatchedCI,PullRequest + steps: + - task: CopyFiles@2 + displayName: Gather Logs + inputs: + SourceFolder: '$(Build.SourcesDirectory)/artifacts' + Contents: '**/*log' + TargetFolder: '$(Build.StagingDirectory)/BuildLogs' + continueOnError: true + condition: always() - - task: PublishBuildArtifacts@1 - displayName: Publish Logs to VSTS - inputs: - PathtoPublish: '$(Build.StagingDirectory)/BuildLogs' - PublishLocation: Container - # Should be able to use a single definition of ArtifactName here instead of conditioned on - # agentOs once variables are available in the template evaluation context. - ${{ if eq(parameters.agentOs, 'Windows_NT') }}: - ArtifactName: Windows_NT_$(Agent.JobName) - ${{ if ne(parameters.agentOs, 'Windows_NT') }}: - ArtifactName: Linux_$(_PhaseName)_$(Agent.JobName) - continueOnError: true - condition: always() + - task: PublishBuildArtifacts@1 + displayName: Publish Logs to VSTS + inputs: + PathtoPublish: '$(Build.StagingDirectory)/BuildLogs' + PublishLocation: Container + ${{ if eq(parameters.agentOs, 'Windows_NT') }}: + ArtifactName: Windows_NT_$(Agent.JobName) + ${{ if ne(parameters.agentOs, 'Windows_NT') }}: + ArtifactName: Linux_$(_PhaseName)_$(Agent.JobName) + continueOnError: true + condition: always() diff --git a/eng/cibuild.sh b/eng/cibuild.sh index 1291238be..632885f06 100755 --- a/eng/cibuild.sh +++ b/eng/cibuild.sh @@ -37,7 +37,7 @@ if [ "$__osname" == "Linux" ]; then fi fi -"$scriptroot/build.sh" --ci $@ +"$scriptroot/build.sh" --restore --build --test --publish --pack --ci $@ if [[ $? != 0 ]]; then exit 1 fi diff --git a/eng/common/templates/phases/base.yml b/eng/common/templates/phases/base.yml index de9c31995..8e1374914 100644 --- a/eng/common/templates/phases/base.yml +++ b/eng/common/templates/phases/base.yml @@ -13,8 +13,8 @@ parameters: agentOs: Windows_NT - buildReason: IndividualCI buildConfig: '' + clean: true dockerImage: '' enableTelemetry: '' fetchDepth: '' @@ -34,19 +34,25 @@ phases: ${{ insert }}: ${{ parameters.phase.variables }} steps: - checkout: self - clean: true + clean: ${{ parameters.clean }} ${{ if ne(parameters.fetchDepth, '') }}: fetchDepth: ${{ parameters.fetchDepth }} - - ${{ if notIn(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}: - - ${{ if eq(parameters.enableTelemetry, 'true') }}: - - template: /eng/common/templates/steps/telemetry.yml - parameters: - agentOs: ${{ parameters.agentOs }} - buildConfig: ${{ parameters.buildConfig }} - helixSource: ${{ parameters.helixSource }} - helixType: ${{ parameters.helixType }} - steps: ${{ parameters.phase.steps }} - - ${{ if not(eq(parameters.enableTelemetry, 'true')) }}: + - template: /eng/common/templates/steps/build-reason.yml + parameters: + conditions: not IndividualCI,BatchedCI,PullRequest + steps: + - ${{ if eq(parameters.enableTelemetry, 'true') }}: + - template: /eng/common/templates/steps/telemetry.yml + parameters: + agentOs: ${{ parameters.agentOs }} + buildConfig: ${{ parameters.buildConfig }} + helixSource: ${{ parameters.helixSource }} + helixType: ${{ parameters.helixType }} + steps: ${{ parameters.phase.steps }} + - ${{ if not(eq(parameters.enableTelemetry, 'true')) }}: + - ${{ parameters.phase.steps }} + - template: /eng/common/templates/steps/build-reason.yml + parameters: + conditions: IndividualCI,BatchedCI,PullRequest + steps: - ${{ parameters.phase.steps }} - - ${{ if in(parameters.buildReason, 'IndividualCI', 'BatchedCI', 'PullRequest') }}: - - ${{ parameters.phase.steps }} diff --git a/eng/common/templates/steps/build-reason.yml b/eng/common/templates/steps/build-reason.yml new file mode 100644 index 000000000..eba58109b --- /dev/null +++ b/eng/common/templates/steps/build-reason.yml @@ -0,0 +1,12 @@ +# build-reason.yml +# Description: runs steps if build.reason condition is valid. conditions is a string of valid build reasons +# to include steps (',' separated). +parameters: + conditions: '' + steps: [] + +steps: + - ${{ if and( not(startsWith(parameters.conditions, 'not')), contains(parameters.conditions, variables['build.reason'])) }}: + - ${{ parameters.steps }} + - ${{ if and( startsWith(parameters.conditions, 'not'), not(contains(parameters.conditions, variables['build.reason']))) }}: + - ${{ parameters.steps }} diff --git a/global.json b/global.json index d612380d1..aa15e36a5 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "version": "2.1.300" }, "msbuild-sdks": { - "RoslynTools.RepoToolset": "1.0.0-beta2-62810-01" + "RoslynTools.RepoToolset": "1.0.0-beta2-63206-01" } } diff --git a/pack.cmd b/pack.cmd index 59ccd0fdf..421727fe1 100644 --- a/pack.cmd +++ b/pack.cmd @@ -1,3 +1,3 @@ @echo off -powershell -ExecutionPolicy ByPass -command "& """%~dp0eng\common\Build.ps1""" -pack %*" +powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -pack %*" exit /b %ErrorLevel%