@@ -124,17 +124,30 @@ steps:
124
124
condition : and(succeeded(), eq(variables['IsUnmanaged'], 'true'))
125
125
126
126
# If called from import-unmanaged-to-dev-environment.yml, this task will run to deploy an unmanaged solution
127
+ - task : microsoft-IsvExpTools.PowerPlatform-BuildTools.import-solution.PowerPlatformImportSolution@2
128
+ displayName : ' Import Unmanaged Solution and no activate-plugins'
129
+ inputs :
130
+ authenticationType : PowerPlatformSPN
131
+ PowerPlatformSPN : ' ${{parameters.serviceConnectionName}}'
132
+ SolutionInputFile : ' $(UnmanagedSolutionPath)'
133
+ ActivatePlugins : false
134
+ UseDeploymentSettingsFile : $(UseDeploymentSettings)
135
+ DeploymentSettingsFile : $(DeploymentSettingsPath)
136
+ MaxAsyncWaitTime : 120
137
+ condition : and(succeeded(),eq(variables['ActivateFlowsOnTheSolutionImport'],'false'), ne(variables['SkipSolutionImport'],'true'), eq(variables['IsUnmanaged'], 'true'))
138
+
139
+ # If called from import-unmanaged-to-dev-environment.yml, this task will run to deploy an unmanaged solution
127
140
- task : microsoft-IsvExpTools.PowerPlatform-BuildTools.import-solution.PowerPlatformImportSolution@2
128
141
displayName : ' Import Unmanaged Solution'
129
142
inputs :
130
143
authenticationType : PowerPlatformSPN
131
144
PowerPlatformSPN : ' ${{parameters.serviceConnectionName}}'
132
145
SolutionInputFile : ' $(UnmanagedSolutionPath)'
133
- PublishWorkflows : true
146
+ ActivatePlugins : true
134
147
UseDeploymentSettingsFile : $(UseDeploymentSettings)
135
148
DeploymentSettingsFile : $(DeploymentSettingsPath)
136
149
MaxAsyncWaitTime : 120
137
- condition : and(succeeded(), ne(variables['SkipSolutionImport'],'true'), eq(variables['IsUnmanaged'], 'true'))
150
+ condition : and(succeeded(), ne(variables['ActivateFlowsOnTheSolutionImport'],'false'), ne(variables[' SkipSolutionImport'],'true'), eq(variables['IsUnmanaged'], 'true'))
138
151
139
152
- pwsh : |
140
153
. "$env:POWERSHELLPATH/build-deploy-solution-functions.ps1"
@@ -147,47 +160,69 @@ steps:
147
160
displayName : ' Get managed solution zip path'
148
161
condition : and(succeeded(),ne(variables['SkipSolutionImport'],'true'), ne(variables['IsUnmanaged'], 'true'))
149
162
163
+ - template : disable-flows.yml
164
+ parameters :
165
+ solutionName : ' ${{parameters.solutionName}}'
166
+
167
+ # If the TriggerSolutionUpgrade variable is false, then import the solution as an Update
168
+ - task : microsoft-IsvExpTools.PowerPlatform-BuildTools.import-solution.PowerPlatformImportSolution@2
169
+ displayName : ' Import Managed Solution as Update and no activate-plugins'
170
+ inputs :
171
+ authenticationType : PowerPlatformSPN
172
+ PowerPlatformSPN : ' ${{parameters.serviceConnectionName}}'
173
+ SolutionInputFile : $(ManagedSolutionPath)
174
+ ActivatePlugins : false
175
+ OverwriteUnmanagedCustomizations : ${{parameters.overwriteUnmanagedCustomizations}}
176
+ UseDeploymentSettingsFile : $(UseDeploymentSettings)
177
+ DeploymentSettingsFile : $(DeploymentSettingsPath)
178
+ MaxAsyncWaitTime : 120
179
+ condition : and(succeeded(),eq(variables['ActivateFlowsOnTheSolutionImport'],'false'),ne(variables['SkipSolutionImport'],'true'), ne(variables['IsUnmanaged'], 'true'), or(eq(variables['TriggerSolutionUpgrade'], 'false'), eq(variables['SolutionExists'], 'false')))
180
+
150
181
# If the TriggerSolutionUpgrade variable is false, then import the solution as an Update
151
182
- task : microsoft-IsvExpTools.PowerPlatform-BuildTools.import-solution.PowerPlatformImportSolution@2
152
183
displayName : ' Import Managed Solution as Update'
153
184
inputs :
154
185
authenticationType : PowerPlatformSPN
155
186
PowerPlatformSPN : ' ${{parameters.serviceConnectionName}}'
156
187
SolutionInputFile : $(ManagedSolutionPath)
157
- PublishWorkflows : true
188
+ ActivatePlugins : true
158
189
OverwriteUnmanagedCustomizations : ${{parameters.overwriteUnmanagedCustomizations}}
159
190
UseDeploymentSettingsFile : $(UseDeploymentSettings)
160
191
DeploymentSettingsFile : $(DeploymentSettingsPath)
161
192
MaxAsyncWaitTime : 120
162
- condition : and(succeeded(),ne(variables['SkipSolutionImport'],'true'), ne(variables['IsUnmanaged'], 'true'), or(eq(variables['TriggerSolutionUpgrade'], 'false'), eq(variables['SolutionExists'], 'false')))
193
+ condition : and(succeeded(), ne(variables['ActivateFlowsOnTheSolutionImport'],'false'), ne(variables['SkipSolutionImport'],'true'), ne(variables['IsUnmanaged'], 'true'), or(eq(variables['TriggerSolutionUpgrade'], 'false'), eq(variables['SolutionExists'], 'false')))
163
194
164
- # If the TriggerSolutionUpgrade variable is true, then import the solution as an Upgrade, staging it as a holding solution, so we can apply a solution Upgrade .
195
+ # If the TriggerSolutionUpgrade variable is true, then import the solution as an Upgrade, along with 'StageAndUpgrade' upgrade happens immediately after the import .
165
196
# Doing this will ensure that items removed from the solution in development are also removed from the solution in the target environment after the Upgrade is applied.
166
197
- task : microsoft-IsvExpTools.PowerPlatform-BuildTools.import-solution.PowerPlatformImportSolution@2
167
- displayName : ' Import Managed Solution as Upgrade'
198
+ displayName : ' Import Managed Solution as Upgrade and no activate-plugins '
168
199
inputs :
169
200
authenticationType : PowerPlatformSPN
170
201
PowerPlatformSPN : ' ${{parameters.serviceConnectionName}}'
171
202
SolutionInputFile : $(ManagedSolutionPath)
172
- HoldingSolution : true
173
203
OverwriteUnmanagedCustomizations : ${{parameters.overwriteUnmanagedCustomizations}}
174
204
UseDeploymentSettingsFile : $(UseDeploymentSettings)
175
205
DeploymentSettingsFile : $(DeploymentSettingsPath)
206
+ ActivatePlugins : false
176
207
MaxAsyncWaitTime : 120
177
- condition : and(succeeded(),ne(variables['SkipSolutionImport'],'true'), ne(variables['IsUnmanaged'], 'true'), eq(variables['TriggerSolutionUpgrade'], 'true'), eq(variables['SolutionExists'], 'true'))
208
+ StageAndUpgrade : true
209
+ condition : and(succeeded(), eq(variables['ActivateFlowsOnTheSolutionImport'],'false'), ne(variables['SkipSolutionImport'],'true'), ne(variables['IsUnmanaged'], 'true'), eq(variables['TriggerSolutionUpgrade'], 'true'), eq(variables['SolutionExists'], 'true'))
178
210
179
- # NOTE: Sometimes you need to perform intermediary steps between staging the upgrade and applying it.
180
- # An example would be moving data from one entity to another before deleting the entity.
181
- # You would add steps to your pipeline here to accomplish this.
182
-
183
- # If the TriggerSolutionUpgrade variable is true,then apply the solution Upgrade.
184
- - task : microsoft-IsvExpTools.PowerPlatform-BuildTools.apply-solution-upgrade.PowerPlatformApplySolutionUpgrade@2
211
+ # If the TriggerSolutionUpgrade variable is true, then import the solution as an Upgrade, along with 'StageAndUpgrade' upgrade happens immediately after the import.
212
+ # Doing this will ensure that items removed from the solution in development are also removed from the solution in the target environment after the Upgrade is applied.
213
+ - task : microsoft-IsvExpTools.PowerPlatform-BuildTools.import-solution.PowerPlatformImportSolution@2
214
+ displayName : ' Import Managed Solution as Upgrade'
185
215
inputs :
186
- authenticationType : ' PowerPlatformSPN'
216
+ authenticationType : PowerPlatformSPN
187
217
PowerPlatformSPN : ' ${{parameters.serviceConnectionName}}'
188
- SolutionName : ${{parameters.solutionName}}
189
- AsyncOperation : true
190
- condition : and(succeeded(),ne(variables['SkipSolutionImport'],'true'), eq(variables['TriggerSolutionUpgrade'], 'true'), eq(variables['SolutionExists'], 'true'))
218
+ SolutionInputFile : $(ManagedSolutionPath)
219
+ OverwriteUnmanagedCustomizations : ${{parameters.overwriteUnmanagedCustomizations}}
220
+ UseDeploymentSettingsFile : $(UseDeploymentSettings)
221
+ DeploymentSettingsFile : $(DeploymentSettingsPath)
222
+ ActivatePlugins : true
223
+ MaxAsyncWaitTime : 120
224
+ StageAndUpgrade : true
225
+ condition : and(succeeded(),ne(variables['ActivateFlowsOnTheSolutionImport'],'false'),ne(variables['SkipSolutionImport'],'true'), ne(variables['IsUnmanaged'], 'true'), eq(variables['TriggerSolutionUpgrade'], 'true'), eq(variables['SolutionExists'], 'true'))
191
226
192
227
- task : microsoft-IsvExpTools.PowerPlatform-BuildTools.publish-customizations.PowerPlatformPublishCustomizations@2
193
228
displayName : ' Power Platform Publish Customizations '
0 commit comments