-
Notifications
You must be signed in to change notification settings - Fork 206
/
D365_DevOps_Export_from_Source.yaml
71 lines (70 loc) · 2.89 KB
/
D365_DevOps_Export_from_Source.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
trigger: none
jobs:
- deployment: Source
displayName: Dataverse DevOps Export from Source
pool:
name: Azure Pipelines
vmImage: windows-latest
environment: Source
strategy:
runOnce:
deploy:
steps:
- checkout: self
- task: PowerPlatformToolInstaller@2
displayName: Install PAC CLI to Host
inputs:
DefaultVersion: true
- task: PowerPlatformPublishCustomizations@2
displayName: Publish All Customizations
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'Dataverse source environment'
AsyncOperation: true
MaxAsyncWaitTime: '60'
- task: PowerPlatformSetSolutionVersion@2
displayName: Update Solution Build Version
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'Dataverse source environment'
SolutionName: 'YourSolutionUniqueName'
SolutionVersionNumber: '$(Build.BuildNumber)'
- task: PowerPlatformExportSolution@2
displayName: Export Unmanaged Solution
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'Dataverse source environment'
SolutionName: 'YourSolutionUniqueName'
SolutionOutputFile: '$(Build.ArtifactStagingDirectory)\YourSolutionUniqueName.zip'
Managed: false
AsyncOperation: true
MaxAsyncWaitTime: '60'
- task: PowerPlatformExportSolution@2
displayName: Export Managed Solution
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: 'Dataverse source environment'
SolutionName: 'YourSolutionUniqueName'
SolutionOutputFile: '$(Build.ArtifactStagingDirectory)\YourSolutionUniqueName_managed.zip'
Managed: true
AsyncOperation: true
MaxAsyncWaitTime: '60'
- task: PowerPlatformUnpackSolution@2
displayName: Unpack Solution
inputs:
SolutionInputFile: '$(Build.ArtifactStagingDirectory)\YourSolutionUniqueName.zip'
SolutionTargetFolder: '$(Build.SourcesDirectory)\YourSolutionUniqueName'
SolutionType: 'Both'
- task: PowerShell@2
displayName: Commit Change to GitHub Repo
inputs:
targetType: 'inline'
script: |
Add-Content "$HOME\.git-credentials" "https://$(GitHubPAT):x-oauth-basic@github.com"
git config --global user.email "youruser@domain.com"
git config --global user.name "youruser"
git config --global --add url."git@github.com:".insteadOf "https://github.com/"
git checkout -B main
git add --all
git commit -m "code commit"
git push https://$(GitHubPAT)@github.com/YourGitHubOrgName/YourGitHubRepoName.git