@@ -4,6 +4,8 @@ parameters:
44 # Enable install tasks for MicroBuild on Mac and Linux
55 # Will be ignored if 'enableMicrobuild' is false or 'Agent.Os' is 'Windows_NT'
66 enableMicrobuildForMacAndLinux : false
7+ # Enable preview version of MB signing plugin
8+ enablePreviewMicrobuild : false
79 # Determines whether the ESRP service connection information should be passed to the signing plugin.
810 # This overlaps with _SignType to some degree. We only need the service connection for real signing.
911 # It's important that the service connection not be passed to the MicroBuildSigningPlugin task in this place.
@@ -14,6 +16,8 @@ parameters:
1416 # Location of the MicroBuild output folder
1517 # NOTE: There's something that relies on this being in the "default" source directory for tasks such as Signing to work properly.
1618 microBuildOutputFolder : ' $(Build.SourcesDirectory)'
19+ # Microbuild version
20+ microbuildPluginVersion : ' latest'
1721
1822 continueOnError : false
1923
@@ -51,41 +55,45 @@ steps:
5155 # YAML expansion, and Windows vs. Linux/Mac uses different service connections. However,
5256 # we can avoid including the MB install step if not enabled at all. This avoids a bunch of
5357 # extra pipeline authorizations, since most pipelines do not sign on non-Windows.
54- - task : MicroBuildSigningPlugin@4
55- displayName : Install MicroBuild plugin (Windows)
56- inputs :
57- signType : $(_SignType)
58- zipSources : false
59- feedSource : https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
60- ${{ if eq(parameters.microbuildUseESRP, true) }} :
61- ConnectedServiceName : ' MicroBuild Signing Task (DevDiv)'
62- ${{ if eq(variables['System.TeamProject'], 'DevDiv') }} :
63- ConnectedPMEServiceName : 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
64- ${{ else }} :
65- ConnectedPMEServiceName : 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
66- env :
67- TeamName : $(_TeamName)
68- MicroBuildOutputFolderOverride : ${{ parameters.microBuildOutputFolder }}
69- SYSTEM_ACCESSTOKEN : $(System.AccessToken)
70- continueOnError : ${{ parameters.continueOnError }}
71- condition : and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))
72-
73- - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }} :
74- - task : MicroBuildSigningPlugin@4
75- displayName : Install MicroBuild plugin (non-Windows)
76- inputs :
58+ - template : /eng/common/core-templates/steps/install-microbuild-impl.yml@self
59+ parameters :
60+ enablePreviewMicrobuild : ${{ parameters.enablePreviewMicrobuild }}
61+ microbuildTaskInputs :
7762 signType : $(_SignType)
7863 zipSources : false
7964 feedSource : https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
65+ version : ${{ parameters.microbuildPluginVersion }}
8066 ${{ if eq(parameters.microbuildUseESRP, true) }} :
8167 ConnectedServiceName : ' MicroBuild Signing Task (DevDiv)'
8268 ${{ if eq(variables['System.TeamProject'], 'DevDiv') }} :
83- ConnectedPMEServiceName : beb8cb23-b303-4c95-ab26-9e44bc958d39
69+ ConnectedPMEServiceName : 6cc74545-d7b9-4050-9dfa-ebefcc8961ea
8470 ${{ else }} :
85- ConnectedPMEServiceName : c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc
86- env :
71+ ConnectedPMEServiceName : 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
72+ microbuildEnv :
8773 TeamName : $(_TeamName)
8874 MicroBuildOutputFolderOverride : ${{ parameters.microBuildOutputFolder }}
8975 SYSTEM_ACCESSTOKEN : $(System.AccessToken)
9076 continueOnError : ${{ parameters.continueOnError }}
91- condition : and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real'))
77+ condition : and(succeeded(), eq(variables['Agent.Os'], 'Windows_NT'), in(variables['_SignType'], 'real', 'test'))
78+
79+ - ${{ if eq(parameters.enableMicrobuildForMacAndLinux, true) }} :
80+ - template : /eng/common/core-templates/steps/install-microbuild-impl.yml@self
81+ parameters :
82+ enablePreviewMicrobuild : ${{ parameters.enablePreviewMicrobuild }}
83+ microbuildTaskInputs :
84+ signType : $(_SignType)
85+ zipSources : false
86+ feedSource : https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
87+ version : ${{ parameters.microbuildPluginVersion }}
88+ ${{ if eq(parameters.microbuildUseESRP, true) }} :
89+ ConnectedServiceName : ' MicroBuild Signing Task (DevDiv)'
90+ ${{ if eq(variables['System.TeamProject'], 'DevDiv') }} :
91+ ConnectedPMEServiceName : beb8cb23-b303-4c95-ab26-9e44bc958d39
92+ ${{ else }} :
93+ ConnectedPMEServiceName : c24de2a5-cc7a-493d-95e4-8e5ff5cad2bc
94+ microbuildEnv :
95+ TeamName : $(_TeamName)
96+ MicroBuildOutputFolderOverride : ${{ parameters.microBuildOutputFolder }}
97+ SYSTEM_ACCESSTOKEN : $(System.AccessToken)
98+ continueOnError : ${{ parameters.continueOnError }}
99+ condition : and(succeeded(), ne(variables['Agent.Os'], 'Windows_NT'), eq(variables['_SignType'], 'real'))
0 commit comments