@@ -13,6 +13,9 @@ parameters:
1313 # Unfortunately, _SignType can't be used to exclude the use of the service connection in non-real sign scenarios. The
1414 # variable is not available in template expression. _SignType has a very large proliferation across .NET, so replacing it is tough.
1515 microbuildUseESRP : true
16+ # Location of the MicroBuild output folder
17+ # NOTE: There's something that relies on this being in the "default" source directory for tasks such as Signing to work properly.
18+ microBuildOutputFolder : ' $(Build.SourcesDirectory)'
1619 # Microbuild version
1720 microbuildPluginVersion : ' latest'
1821
@@ -21,16 +24,14 @@ parameters:
2124steps :
2225 - ${{ if eq(parameters.enableMicrobuild, 'true') }} :
2326 - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, 'true') }} :
24- # Installing .NET 8 is required to use the MicroBuild signing plugin on non-Windows platforms
27+ # Needed to download the MicroBuild plugin nupkgs on Mac and Linux when nuget.exe is unavailable
2528 - task : UseDotNet@2
2629 displayName : Install .NET 8.0 SDK for MicroBuild Plugin
2730 inputs :
2831 packageType : sdk
2932 version : 8.0.x
30- # Installing the SDK in a '.dotnet-microbuild' directory is required for signing.
31- # See target FindDotNetPathForMicroBuild in arcade/src/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj
32- # Do not remove '.dotnet-microbuild' from the path without changing the corresponding logic.
33- installationPath : $(Agent.TempDirectory)/.dotnet-microbuild
33+ installationPath : ${{ parameters.microBuildOutputFolder }}/.dotnet
34+ workingDirectory : ${{ parameters.microBuildOutputFolder }}
3435 condition : and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'))
3536
3637 - script : |
7071 ConnectedPMEServiceName : 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
7172 microbuildEnv :
7273 TeamName : $(_TeamName)
73- MicroBuildOutputFolderOverride : $(Agent.TempDirectory)/MicroBuild
74+ MicroBuildOutputFolderOverride : ${{ parameters.microBuildOutputFolder }}
7475 SYSTEM_ACCESSTOKEN : $(System.AccessToken)
7576 continueOnError : ${{ parameters.continueOnError }}
7677 condition : and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))
9293 ConnectedPMEServiceName : c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc
9394 microbuildEnv :
9495 TeamName : $(_TeamName)
95- MicroBuildOutputFolderOverride : $(Agent.TempDirectory)/MicroBuild
96+ MicroBuildOutputFolderOverride : ${{ parameters.microBuildOutputFolder }}
9697 SYSTEM_ACCESSTOKEN : $(System.AccessToken)
9798 continueOnError : ${{ parameters.continueOnError }}
9899 condition : and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real'))
0 commit comments