Skip to content

Commit 87bf0f0

Browse files
committed
Update Pack-Solution.yml for Azure Pipelines
Update Pack-Solution.yml for Azure Pipelines Update Pack-Solution.yml for Azure Pipelines Update Pack-Solution.yml for Azure Pipelines Update Pack-Solution.yml for Azure Pipelines Update Pack-Solution.yml for Azure Pipelines Update Pack-Solution.yml for Azure Pipelines Update Pack-Solution.yml for Azure Pipelines Update Pack-Solution.yml for Azure Pipelines Update Pack-Solution.yml for Azure Pipelines Update Pack-Solution.yml for Azure Pipelines make import synchronous for example build Update Pack-Solution.yml for Azure Pipelines make import synchronous for example build Add both solution types Update Pack-Solution.yml for Azure Pipelines make import synchronous for example build Update Pack-Solution.yml for Azure Pipelines make import synchronous for example build Rename yaml file
1 parent cea67a3 commit 87bf0f0

File tree

4 files changed

+26
-9
lines changed

4 files changed

+26
-9
lines changed

Lesson-1/ExtractedSolution/Other/Solution.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<ImportExportXml version="9.1.0.2057" SolutionPackageVersion="9.1" languagecode="1033" generatedBy="CrmLive" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2+
<ImportExportXml version="9.1.0.2251" SolutionPackageVersion="9.1" languagecode="1033" generatedBy="CrmLive" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
33
<SolutionManifest>
44
<UniqueName>ContosoUniversity</UniqueName>
55
<LocalizedNames>
Binary file not shown.
Binary file not shown.

Lesson-1/Pack-Solution.yml Lesson-1/pack-import-solution.yml

+25-8
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,40 @@ steps:
3333
Start-Process tools/CoreTools/SolutionPackager.exe `
3434
-ArgumentList `
3535
"/action: Pack", `
36-
"/zipfile: packedSolution\$env:SolutionName.zip", `
36+
"/zipfile: $(Build.ArtifactStagingDirectory)\packedSolution\$env:SolutionName.zip", `
3737
"/folder: $env:SolutionPath", `
38-
"/packagetype: Managed" `
38+
"/packagetype: Both" `
3939
-Wait `
4040
-NoNewWindow
4141
env:
4242
SolutionPath: $(solution.path)
4343
SolutionName: $(solution.name)
4444
displayName: 'Solution Packager: pack solution'
45-
46-
- task: CopyFiles@2
47-
inputs:
48-
contents: 'packedSolution**\*'
49-
targetFolder: $(Build.ArtifactStagingDirectory)
50-
displayName: 'Copy packed solution to artifact staging directory'
45+
5146

5247
- task: PublishBuildArtifacts@1
5348
inputs:
5449
pathtoPublish: $(Build.ArtifactStagingDirectory)
5550
artifactName: drop
51+
displayName: 'Publish build artifacts'
52+
53+
- powershell: Install-Module Microsoft.Xrm.Data.Powershell -Scope CurrentUser -Force
54+
displayName: 'Install Microsoft.Xrm.Data.PowerShell'
55+
56+
- powershell: |
57+
$connection = Get-CrmConnection `
58+
-ConnectionString `
59+
("AuthType = Office365;" + `
60+
"Username = $env:ServiceAccountUpn;" + `
61+
"Password = $env:ServiceAccountPassword;" + `
62+
"Url = https://$env:EnvironmentName.crm.dynamics.com")
63+
64+
Import-CrmSolution `
65+
-conn $connection `
66+
-SolutionFilePath $(Build.ArtifactStagingDirectory)\packedSolution\$($env:SolutionName)_managed.zip
67+
env:
68+
EnvironmentName: $(environment.name)
69+
SolutionName: $(solution.name)
70+
ServiceAccountUpn: $(serviceAccount.upn)
71+
ServiceAccountPassword: $(serviceAccount.password)
72+
displayName: 'Import solution'

0 commit comments

Comments
 (0)