@khester/create-dynamics-app 1.1.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/README.md +74 -0
  2. package/dist/artifacts/registry.d.ts +18 -0
  3. package/dist/artifacts/registry.d.ts.map +1 -0
  4. package/dist/artifacts/registry.js +340 -0
  5. package/dist/artifacts/registry.js.map +1 -0
  6. package/dist/artifacts/types.d.ts +122 -0
  7. package/dist/artifacts/types.d.ts.map +1 -0
  8. package/dist/artifacts/types.js +7 -0
  9. package/dist/artifacts/types.js.map +1 -0
  10. package/dist/artifacts/validators.d.ts +16 -0
  11. package/dist/artifacts/validators.d.ts.map +1 -0
  12. package/dist/artifacts/validators.js +45 -0
  13. package/dist/artifacts/validators.js.map +1 -0
  14. package/dist/fromDesign.d.ts +5 -0
  15. package/dist/fromDesign.d.ts.map +1 -0
  16. package/dist/fromDesign.js +98 -0
  17. package/dist/fromDesign.js.map +1 -0
  18. package/dist/index.js +129 -177
  19. package/dist/index.js.map +1 -1
  20. package/dist/injectDevTools.d.ts +28 -0
  21. package/dist/injectDevTools.d.ts.map +1 -0
  22. package/dist/injectDevTools.js +148 -0
  23. package/dist/injectDevTools.js.map +1 -0
  24. package/dist/scaffold.d.ts +48 -0
  25. package/dist/scaffold.d.ts.map +1 -0
  26. package/dist/scaffold.js +180 -0
  27. package/dist/scaffold.js.map +1 -0
  28. package/dist/templatePlan.d.ts +3 -0
  29. package/dist/templatePlan.d.ts.map +1 -0
  30. package/dist/templatePlan.js +43 -0
  31. package/dist/templatePlan.js.map +1 -0
  32. package/dist/utils/copyTemplate.d.ts +13 -1
  33. package/dist/utils/copyTemplate.d.ts.map +1 -1
  34. package/dist/utils/copyTemplate.js +98 -4
  35. package/dist/utils/copyTemplate.js.map +1 -1
  36. package/dist/utils/updatePackageJson.d.ts +11 -1
  37. package/dist/utils/updatePackageJson.d.ts.map +1 -1
  38. package/dist/utils/updatePackageJson.js +12 -10
  39. package/dist/utils/updatePackageJson.js.map +1 -1
  40. package/package.json +10 -7
  41. package/templates/_shared/dev-tools/auth/get-token.js +72 -0
  42. package/templates/_shared/dev-tools/dev/mock-xrm.js +42 -0
  43. package/templates/_shared/dev-tools/metadata-sync/index.js +152 -0
  44. package/templates/_shared/dev-tools/smoke/test-retrieve.js +44 -0
  45. package/templates/dialog-form/README.md +27 -0
  46. package/templates/dialog-form/_variants/App.v8.tsx +39 -0
  47. package/templates/dialog-form/_variants/App.v9.tsx +41 -0
  48. package/templates/dialog-form/gitignore +5 -0
  49. package/templates/dialog-form/package.json +27 -0
  50. package/templates/dialog-form/public/index.html +11 -0
  51. package/templates/dialog-form/src/index.tsx +10 -0
  52. package/templates/dialog-form/src/services/dataverse.ts +30 -0
  53. package/templates/dialog-form/tsconfig.json +15 -0
  54. package/templates/dialog-form/webpack.config.js +17 -0
  55. package/templates/grid-customizer/README.md +28 -0
  56. package/templates/grid-customizer/gitignore +4 -0
  57. package/templates/grid-customizer/package.json +25 -0
  58. package/templates/grid-customizer/src/GridCustomizer.ts +28 -0
  59. package/templates/grid-customizer/src/cell-renderers.tsx +35 -0
  60. package/templates/grid-customizer/src/index.ts +4 -0
  61. package/templates/grid-customizer/src/types/grid-types.ts +30 -0
  62. package/templates/grid-customizer/src/utils/color-utils.ts +24 -0
  63. package/templates/grid-customizer/tsconfig.json +15 -0
  64. package/templates/grid-customizer/webpack.config.js +17 -0
  65. package/templates/pcf-dataset/ControlManifest.Input.xml +16 -0
  66. package/templates/pcf-dataset/README.md +21 -0
  67. package/templates/pcf-dataset/gitignore +5 -0
  68. package/templates/pcf-dataset/index.ts +39 -0
  69. package/templates/pcf-dataset/package.json +30 -0
  70. package/templates/pcf-dataset/strings/{{componentName}}.1033.resx +47 -0
  71. package/templates/pcf-dataset/tsconfig.json +8 -0
  72. package/templates/pcf-dataset/{{componentName}}Component.tsx +39 -0
  73. package/templates/pcf-field/ControlManifest.Input.xml +17 -0
  74. package/templates/pcf-field/README.md +95 -0
  75. package/templates/pcf-field/_variants/ValueInput.boolean.tsx +24 -0
  76. package/templates/pcf-field/_variants/ValueInput.date.tsx +27 -0
  77. package/templates/pcf-field/_variants/ValueInput.number.tsx +35 -0
  78. package/templates/pcf-field/_variants/ValueInput.text.tsx +27 -0
  79. package/templates/pcf-field/gitignore +5 -0
  80. package/templates/pcf-field/index.ts +61 -0
  81. package/templates/pcf-field/package.json +30 -0
  82. package/templates/pcf-field/strings/{{componentName}}.1033.resx +47 -0
  83. package/templates/pcf-field/tsconfig.json +8 -0
  84. package/templates/pcf-field/{{componentName}}Component.tsx +35 -0
  85. package/templates/power-pages-starter/gitignore +5 -0
  86. package/templates/react-custom-page/gitignore +5 -0
  87. package/templates/{dynamics-365-starter → react-custom-page}/package.json +3 -3
  88. package/templates/react-custom-page/tools/metadata-sync/index.js +152 -0
  89. package/templates/static-web-app/README.md +36 -0
  90. package/templates/static-web-app/_variants/App.v8.tsx +32 -0
  91. package/templates/static-web-app/_variants/App.v9.tsx +31 -0
  92. package/templates/static-web-app/api/host.json +12 -0
  93. package/templates/static-web-app/api/package.json +19 -0
  94. package/templates/static-web-app/api/src/functions/hello.ts +16 -0
  95. package/templates/static-web-app/api/tsconfig.json +14 -0
  96. package/templates/static-web-app/frontend/index.html +12 -0
  97. package/templates/static-web-app/frontend/package.json +23 -0
  98. package/templates/static-web-app/frontend/src/index.tsx +8 -0
  99. package/templates/static-web-app/frontend/tsconfig.json +16 -0
  100. package/templates/static-web-app/frontend/vite.config.ts +13 -0
  101. package/templates/static-web-app/gitignore +8 -0
  102. package/templates/static-web-app/package.json +15 -0
  103. package/templates/static-web-app/staticwebapp.config.json +7 -0
  104. package/templates/teams-app/README.md +27 -0
  105. package/templates/teams-app/_variants/graph.off.ts +7 -0
  106. package/templates/teams-app/_variants/graph.on.ts +22 -0
  107. package/templates/teams-app/appPackage/manifest.json +26 -0
  108. package/templates/teams-app/gitignore +5 -0
  109. package/templates/teams-app/index.html +12 -0
  110. package/templates/teams-app/package.json +26 -0
  111. package/templates/teams-app/src/App.tsx +25 -0
  112. package/templates/teams-app/src/index.tsx +8 -0
  113. package/templates/teams-app/tsconfig.json +16 -0
  114. package/templates/teams-app/vite.config.ts +9 -0
  115. package/templates/web-resource/README.md +39 -0
  116. package/templates/web-resource/_variants/App.v8.tsx +29 -0
  117. package/templates/web-resource/_variants/App.v9.tsx +28 -0
  118. package/templates/web-resource/gitignore +5 -0
  119. package/templates/web-resource/package.json +27 -0
  120. package/templates/web-resource/public/index.html +11 -0
  121. package/templates/web-resource/src/index.tsx +10 -0
  122. package/templates/web-resource/src/services/dataverse.ts +30 -0
  123. package/templates/web-resource/tsconfig.json +15 -0
  124. package/templates/web-resource/webpack.config.js +17 -0
  125. package/dist/utils/consultingHelpers.d.ts +0 -13
  126. package/dist/utils/consultingHelpers.d.ts.map +0 -1
  127. package/dist/utils/consultingHelpers.js +0 -569
  128. package/dist/utils/consultingHelpers.js.map +0 -1
  129. package/templates/dynamics-365-starter/INTEGRATION_TEST_RESULTS.md +0 -302
  130. package/templates/dynamics-365-starter/PHASE_4_COMPLETION_SUMMARY.md +0 -305
  131. package/templates/dynamics-365-starter/deployment/QUICKSTART-MAC.md +0 -507
  132. package/templates/dynamics-365-starter/deployment/QUICKSTART-WINDOWS.md +0 -372
  133. package/templates/dynamics-365-starter/deployment/pipelines/README.md +0 -375
  134. package/templates/dynamics-365-starter/deployment/pipelines/azure-pipelines.yml +0 -330
  135. package/templates/dynamics-365-starter/deployment/pipelines/github-actions.yml +0 -422
  136. package/templates/dynamics-365-starter/deployment/pipelines/jenkins.groovy +0 -636
  137. package/templates/dynamics-365-starter/deployment/scripts/deploy.ps1 +0 -417
  138. package/templates/dynamics-365-starter/deployment/scripts/deploy.sh +0 -582
  139. package/templates/dynamics-365-starter/deployment/scripts/team-onboarding.ps1 +0 -486
  140. package/templates/dynamics-365-starter/deployment/scripts/team-onboarding.sh +0 -567
  141. package/templates/dynamics-365-starter/deployment/scripts/validate-setup.ps1 +0 -703
  142. package/templates/dynamics-365-starter/deployment/scripts/validate-setup.sh +0 -671
  143. package/templates/dynamics-365-starter/docs/team-standards/README.md +0 -273
  144. package/templates/dynamics-365-starter/docs/team-standards/client-onboarding.md +0 -577
  145. package/templates/dynamics-365-starter/docs/team-standards/code-review-checklist.md +0 -359
  146. package/templates/dynamics-365-starter/docs/team-standards/coding-standards.md +0 -700
  147. package/templates/dynamics-365-starter/docs/team-standards/cross-platform-team-guide.md +0 -736
  148. package/templates/dynamics-365-starter/docs/team-standards/development-workflows.md +0 -727
  149. package/templates/dynamics-365-starter/docs/troubleshooting/common-errors.md +0 -758
  150. package/templates/dynamics-365-starter/docs/troubleshooting/platform-specific-issues.md +0 -878
  151. package/templates/dynamics-365-starter/src/client-project-template/README.md +0 -234
  152. package/templates/dynamics-365-starter/src/client-project-template/config/client.template.json +0 -114
  153. package/templates/dynamics-365-starter/src/client-project-template/config/environments/template.json +0 -186
  154. package/templates/dynamics-365-starter/src/client-project-template/scripts/client-setup.js +0 -667
  155. package/templates/dynamics-365-starter/src/examples/README.md +0 -52
  156. package/templates/dynamics-365-starter/src/examples/component-examples/opportunity-management.tsx +0 -625
  157. package/templates/dynamics-365-starter/src/examples/entity-examples/opportunity-model.ts +0 -545
  158. package/templates/dynamics-365-starter/src/examples/integration-examples/custom-pcf-wrapper.tsx +0 -722
  159. package/templates/dynamics-365-starter/src/examples/workflow-examples/sales-workflow.ts +0 -662
  160. package/templates/dynamics-365-starter/src/page-templates/EntityDashboard.tsx +0 -519
  161. package/templates/dynamics-365-starter/src/page-templates/EntityDetailPage.tsx +0 -456
  162. package/templates/dynamics-365-starter/src/page-templates/EntityListPage.tsx +0 -406
  163. package/templates/dynamics-365-starter/src/page-templates/RelatedEntitiesPage.tsx +0 -578
  164. package/templates/dynamics-365-starter/src/page-templates/SearchPage.tsx +0 -629
  165. package/templates/dynamics-365-starter/tools/entity-generator/index.js +0 -168
  166. package/templates/dynamics-365-starter/tools/entity-generator/templates/constants.template.ts +0 -124
  167. package/templates/dynamics-365-starter/tools/entity-generator/templates/form.template.css +0 -283
  168. package/templates/dynamics-365-starter/tools/entity-generator/templates/form.template.tsx +0 -275
  169. package/templates/dynamics-365-starter/tools/entity-generator/templates/management.template.css +0 -204
  170. package/templates/dynamics-365-starter/tools/entity-generator/templates/management.template.tsx +0 -413
  171. package/templates/dynamics-365-starter/tools/entity-generator/templates/model.template.ts +0 -250
  172. package/templates/dynamics-365-starter/tools/metadata-sync/d365-client.js +0 -410
  173. package/templates/dynamics-365-starter/tools/metadata-sync/index.js +0 -512
  174. package/templates/dynamics-365-starter/tools/metadata-sync/type-generator.js +0 -675
  175. /package/templates/{dynamics-365-starter → react-custom-page}/README.md +0 -0
  176. /package/templates/{dynamics-365-starter → react-custom-page}/deployment/README.md +0 -0
  177. /package/templates/{dynamics-365-starter → react-custom-page}/docs/ARCHITECTURE_OVERVIEW.md +0 -0
  178. /package/templates/{dynamics-365-starter → react-custom-page}/docs/BEST_PRACTICES.md +0 -0
  179. /package/templates/{dynamics-365-starter → react-custom-page}/docs/MIGRATION_GUIDE.md +0 -0
  180. /package/templates/{dynamics-365-starter → react-custom-page}/public/index.html +0 -0
  181. /package/templates/{dynamics-365-starter → react-custom-page}/scripts/custom-build.js +0 -0
  182. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountForm.css +0 -0
  183. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountForm.tsx +0 -0
  184. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountManagement.css +0 -0
  185. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountManagement.tsx +0 -0
  186. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactForm.css +0 -0
  187. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactForm.tsx +0 -0
  188. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactManagement.css +0 -0
  189. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactManagement.tsx +0 -0
  190. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LogDialog.tsx +0 -0
  191. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingContext.tsx +0 -0
  192. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingDebugPanel.css +0 -0
  193. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingDebugPanel.tsx +0 -0
  194. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingProvider.tsx +0 -0
  195. /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/logger.ts +0 -0
  196. /package/templates/{dynamics-365-starter → react-custom-page}/src/constants/account.ts +0 -0
  197. /package/templates/{dynamics-365-starter → react-custom-page}/src/constants/contact.ts +0 -0
  198. /package/templates/{dynamics-365-starter → react-custom-page}/src/index.tsx +0 -0
  199. /package/templates/{dynamics-365-starter → react-custom-page}/src/models/Account.ts +0 -0
  200. /package/templates/{dynamics-365-starter → react-custom-page}/src/models/BaseEntity.ts +0 -0
  201. /package/templates/{dynamics-365-starter → react-custom-page}/src/models/Contact.ts +0 -0
  202. /package/templates/{dynamics-365-starter → react-custom-page}/src/pcf/ContactControlWrapper.tsx +0 -0
  203. /package/templates/{dynamics-365-starter → react-custom-page}/src/pcf/MultiEntityControlWrapper.tsx +0 -0
  204. /package/templates/{dynamics-365-starter → react-custom-page}/src/providers/DynamicsProvider.tsx +0 -0
  205. /package/templates/{dynamics-365-starter → react-custom-page}/src/services/MockApiService.ts +0 -0
  206. /package/templates/{dynamics-365-starter → react-custom-page}/src/services/ServiceFactory.ts +0 -0
  207. /package/templates/{dynamics-365-starter → react-custom-page}/src/services/XrmApiService.ts +0 -0
  208. /package/templates/{dynamics-365-starter → react-custom-page}/src/styles/index.css +0 -0
  209. /package/templates/{dynamics-365-starter → react-custom-page}/tsconfig.json +0 -0
  210. /package/templates/{dynamics-365-starter → react-custom-page}/webpack.config.js +0 -0
@@ -1,422 +0,0 @@
1
- # GitHub Actions Workflow - Dual Platform Support
2
- # Supports both Windows and Linux runners for mixed development teams
3
-
4
- name: Deploy to Dynamics 365
5
-
6
- on:
7
- push:
8
- branches: [main, develop, feature/*]
9
- paths-ignore:
10
- - "docs/**"
11
- - "*.md"
12
- pull_request:
13
- branches: [main, develop]
14
- workflow_dispatch:
15
- inputs:
16
- environment:
17
- description: "Environment to deploy to"
18
- required: true
19
- default: "dev"
20
- type: choice
21
- options:
22
- - dev
23
- - test
24
- - prod
25
- platform:
26
- description: "Platform to use for deployment"
27
- required: true
28
- default: "linux"
29
- type: choice
30
- options:
31
- - linux
32
- - windows
33
-
34
- env:
35
- NODE_VERSION: "18.x"
36
- NPM_CONFIG_CACHE: ${{ github.workspace }}/.npm
37
-
38
- jobs:
39
- # Build Job - Linux for speed
40
- build:
41
- name: Build Application
42
- runs-on: ubuntu-latest
43
- outputs:
44
- artifact-id: ${{ steps.upload.outputs.artifact-id }}
45
- steps:
46
- - name: Checkout code
47
- uses: actions/checkout@v4
48
-
49
- - name: Setup Node.js
50
- uses: actions/setup-node@v4
51
- with:
52
- node-version: ${{ env.NODE_VERSION }}
53
- cache: "npm"
54
-
55
- - name: Cache dependencies
56
- uses: actions/cache@v3
57
- with:
58
- path: ~/.npm
59
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
60
- restore-keys: |
61
- ${{ runner.os }}-node-
62
-
63
- - name: Install dependencies
64
- run: npm ci
65
-
66
- - name: Run linting
67
- run: npm run lint
68
-
69
- - name: Run type checking
70
- run: npm run typecheck
71
-
72
- - name: Run tests
73
- run: npm run test
74
-
75
- - name: Build production bundle
76
- run: npm run build:prod
77
-
78
- - name: Upload build artifacts
79
- id: upload
80
- uses: actions/upload-artifact@v4
81
- with:
82
- name: build-artifacts-${{ github.sha }}
83
- path: |
84
- dist/
85
- deployment/
86
- retention-days: 7
87
-
88
- # Development Deployment - Linux with Bash
89
- deploy-dev:
90
- name: Deploy to Development (Linux/Bash)
91
- if: github.ref == 'refs/heads/develop' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'dev')
92
- needs: build
93
- runs-on: ubuntu-latest
94
- environment:
95
- name: development
96
- url: ${{ vars.D365_DEV_ORG_URL }}
97
- steps:
98
- - name: Download artifacts
99
- uses: actions/download-artifact@v4
100
- with:
101
- name: build-artifacts-${{ github.sha }}
102
-
103
- - name: Make scripts executable
104
- run: |
105
- chmod +x deployment/scripts/*.sh
106
- ls -la deployment/scripts/
107
-
108
- - name: Display platform information
109
- run: |
110
- echo "🍎 LINUX DEPLOYMENT STRATEGY"
111
- echo "Runner: ${{ runner.os }}"
112
- echo "Platform: Linux (ubuntu-latest)"
113
- echo "Scripts: Bash (.sh files)"
114
- echo "Compatible with: Mac developers, Linux CI/CD"
115
- echo ""
116
-
117
- - name: Validate environment setup
118
- run: |
119
- echo "Validating development environment..."
120
- ./deployment/scripts/validate-setup.sh || echo "Validation completed with warnings"
121
-
122
- - name: Deploy to Development
123
- run: |
124
- echo "Deploying to development environment using Bash..."
125
- ./deployment/scripts/deploy.sh dev --verbose
126
- env:
127
- D365_CLIENT_ID: ${{ secrets.D365_DEV_CLIENT_ID }}
128
- D365_CLIENT_SECRET: ${{ secrets.D365_DEV_CLIENT_SECRET }}
129
- D365_TENANT_ID: ${{ secrets.D365_DEV_TENANT_ID }}
130
- D365_ORG_URL: ${{ vars.D365_DEV_ORG_URL }}
131
-
132
- - name: Run post-deployment health check
133
- run: |
134
- ./deployment/scripts/health-check.sh dev
135
- continue-on-error: true
136
-
137
- # Test Deployment - Windows with PowerShell
138
- deploy-test:
139
- name: Deploy to Test (Windows/PowerShell)
140
- if: github.ref == 'refs/heads/main' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'test')
141
- needs: build
142
- runs-on: windows-latest
143
- environment:
144
- name: test
145
- url: ${{ vars.D365_TEST_ORG_URL }}
146
- steps:
147
- - name: Download artifacts
148
- uses: actions/download-artifact@v4
149
- with:
150
- name: build-artifacts-${{ github.sha }}
151
-
152
- - name: Display platform information
153
- shell: pwsh
154
- run: |
155
- Write-Host "🖥️ WINDOWS DEPLOYMENT STRATEGY" -ForegroundColor Cyan
156
- Write-Host "Runner: ${{ runner.os }}"
157
- Write-Host "Platform: Windows (windows-latest)"
158
- Write-Host "Scripts: PowerShell (.ps1 files)"
159
- Write-Host "Compatible with: Windows developers, Azure DevOps"
160
- Write-Host ""
161
-
162
- - name: Install PowerShell modules
163
- shell: pwsh
164
- run: |
165
- Write-Host "Installing required PowerShell modules..." -ForegroundColor Blue
166
- Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force -AllowClobber -Scope CurrentUser
167
- Install-Module -Name Microsoft.PowerApps.PowerShell -Force -AllowClobber -Scope CurrentUser
168
-
169
- Write-Host "Verifying module installation..." -ForegroundColor Blue
170
- Get-Module -Name Microsoft.PowerApps* -ListAvailable
171
-
172
- - name: Validate environment setup
173
- shell: pwsh
174
- run: |
175
- Write-Host "Validating test environment..." -ForegroundColor Blue
176
- try {
177
- .\deployment\scripts\validate-setup.ps1
178
- } catch {
179
- Write-Warning "Validation completed with warnings: $_"
180
- }
181
-
182
- - name: Deploy to Test
183
- shell: pwsh
184
- run: |
185
- Write-Host "Deploying to test environment using PowerShell..." -ForegroundColor Green
186
- .\deployment\scripts\deploy.ps1 -Environment test -Verbose
187
- env:
188
- D365_CLIENT_ID: ${{ secrets.D365_TEST_CLIENT_ID }}
189
- D365_CLIENT_SECRET: ${{ secrets.D365_TEST_CLIENT_SECRET }}
190
- D365_TENANT_ID: ${{ secrets.D365_TEST_TENANT_ID }}
191
- D365_ORG_URL: ${{ vars.D365_TEST_ORG_URL }}
192
-
193
- - name: Run post-deployment health check
194
- shell: pwsh
195
- run: |
196
- .\deployment\scripts\health-check.ps1 -Environment test
197
- continue-on-error: true
198
-
199
- # Production Deployment - Flexible platform based on input
200
- deploy-prod:
201
- name: Deploy to Production
202
- if: |
203
- (github.ref == 'refs/heads/main' && github.event_name == 'push') ||
204
- (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'prod')
205
- needs: [build, deploy-test]
206
- runs-on: ${{ github.event.inputs.platform == 'windows' && 'windows-latest' || 'ubuntu-latest' }}
207
- environment:
208
- name: production
209
- url: ${{ vars.D365_PROD_ORG_URL }}
210
- steps:
211
- - name: Download artifacts
212
- uses: actions/download-artifact@v4
213
- with:
214
- name: build-artifacts-${{ github.sha }}
215
-
216
- # Linux/Mac Production Deployment
217
- - name: Deploy to Production (Linux/Bash)
218
- if: runner.os == 'Linux'
219
- run: |
220
- echo "🍎 PRODUCTION DEPLOYMENT - LINUX/BASH STRATEGY"
221
- echo "Runner: ${{ runner.os }}"
222
- echo "Chosen for: Stability, consistency with development workflow"
223
- echo ""
224
-
225
- # Make scripts executable
226
- chmod +x deployment/scripts/*.sh
227
-
228
- echo "Creating production backup..."
229
- ./deployment/scripts/backup.sh prod
230
-
231
- echo "Deploying to production environment..."
232
- ./deployment/scripts/deploy.sh prod --verbose
233
-
234
- echo "Running comprehensive health checks..."
235
- ./deployment/scripts/health-check.sh prod
236
- env:
237
- D365_CLIENT_ID: ${{ secrets.D365_PROD_CLIENT_ID }}
238
- D365_CLIENT_SECRET: ${{ secrets.D365_PROD_CLIENT_SECRET }}
239
- D365_TENANT_ID: ${{ secrets.D365_PROD_TENANT_ID }}
240
- D365_ORG_URL: ${{ vars.D365_PROD_ORG_URL }}
241
-
242
- # Windows Production Deployment
243
- - name: Deploy to Production (Windows/PowerShell)
244
- if: runner.os == 'Windows'
245
- shell: pwsh
246
- run: |
247
- Write-Host "🖥️ PRODUCTION DEPLOYMENT - WINDOWS/POWERSHELL STRATEGY" -ForegroundColor Cyan
248
- Write-Host "Runner: ${{ runner.os }}"
249
- Write-Host "Chosen for: Enterprise PowerShell workflows, Windows-first environments"
250
- Write-Host ""
251
-
252
- # Install required modules
253
- Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force -AllowClobber -Scope CurrentUser
254
- Install-Module -Name Microsoft.PowerApps.PowerShell -Force -AllowClobber -Scope CurrentUser
255
-
256
- Write-Host "Creating production backup..." -ForegroundColor Blue
257
- .\deployment\scripts\backup.ps1 -Environment prod
258
-
259
- Write-Host "Deploying to production environment..." -ForegroundColor Green
260
- .\deployment\scripts\deploy.ps1 -Environment prod -Verbose
261
-
262
- Write-Host "Running comprehensive health checks..." -ForegroundColor Blue
263
- .\deployment\scripts\health-check.ps1 -Environment prod
264
- env:
265
- D365_CLIENT_ID: ${{ secrets.D365_PROD_CLIENT_ID }}
266
- D365_CLIENT_SECRET: ${{ secrets.D365_PROD_CLIENT_SECRET }}
267
- D365_TENANT_ID: ${{ secrets.D365_PROD_TENANT_ID }}
268
- D365_ORG_URL: ${{ vars.D365_PROD_ORG_URL }}
269
-
270
- - name: Create deployment summary
271
- run: |
272
- echo "## 🚀 Production Deployment Summary" >> $GITHUB_STEP_SUMMARY
273
- echo "" >> $GITHUB_STEP_SUMMARY
274
- echo "### Platform Information" >> $GITHUB_STEP_SUMMARY
275
- echo "- **Runner OS**: ${{ runner.os }}" >> $GITHUB_STEP_SUMMARY
276
- echo "- **Platform Choice**: ${{ github.event.inputs.platform || 'auto-selected' }}" >> $GITHUB_STEP_SUMMARY
277
- echo "- **Deployment Time**: $(date)" >> $GITHUB_STEP_SUMMARY
278
- echo "- **Commit SHA**: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY
279
- echo "" >> $GITHUB_STEP_SUMMARY
280
- echo "### Cross-Platform Compatibility ✅" >> $GITHUB_STEP_SUMMARY
281
- echo "This deployment produces identical results whether run on:" >> $GITHUB_STEP_SUMMARY
282
- echo "- 🖥️ Windows with PowerShell (.ps1 scripts)" >> $GITHUB_STEP_SUMMARY
283
- echo "- 🍎 macOS with Bash (.sh scripts)" >> $GITHUB_STEP_SUMMARY
284
- echo "- 🐧 Linux with Bash (.sh scripts)" >> $GITHUB_STEP_SUMMARY
285
-
286
- # Cross-platform validation job
287
- validate-cross-platform:
288
- name: Cross-Platform Validation
289
- if: github.event_name == 'pull_request'
290
- needs: build
291
- strategy:
292
- matrix:
293
- os: [ubuntu-latest, windows-latest]
294
- include:
295
- - os: ubuntu-latest
296
- platform: "Linux/Mac"
297
- script-type: "Bash (.sh)"
298
- script-cmd: "./deployment/scripts/validate-setup.sh"
299
- - os: windows-latest
300
- platform: "Windows"
301
- script-type: "PowerShell (.ps1)"
302
- script-cmd: '.\deployment\scripts\validate-setup.ps1'
303
- runs-on: ${{ matrix.os }}
304
- steps:
305
- - name: Download artifacts
306
- uses: actions/download-artifact@v4
307
- with:
308
- name: build-artifacts-${{ github.sha }}
309
-
310
- - name: Setup platform-specific environment
311
- if: runner.os == 'Windows'
312
- shell: pwsh
313
- run: |
314
- Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force -AllowClobber -Scope CurrentUser
315
- Install-Module -Name Microsoft.PowerApps.PowerShell -Force -AllowClobber -Scope CurrentUser
316
-
317
- - name: Make scripts executable (Linux/Mac)
318
- if: runner.os == 'Linux'
319
- run: chmod +x deployment/scripts/*.sh
320
-
321
- - name: Validate platform compatibility
322
- shell: ${{ runner.os == 'Windows' && 'pwsh' || 'bash' }}
323
- run: |
324
- echo "=== CROSS-PLATFORM VALIDATION ==="
325
- echo "Platform: ${{ matrix.platform }}"
326
- echo "Runner OS: ${{ runner.os }}"
327
- echo "Script Type: ${{ matrix.script-type }}"
328
- echo "Validation Command: ${{ matrix.script-cmd }}"
329
- echo ""
330
-
331
- # Run platform-specific validation
332
- ${{ matrix.script-cmd }} || echo "Validation completed with warnings"
333
-
334
- echo ""
335
- echo "✅ Platform validation successful for ${{ matrix.platform }}"
336
- echo "🤝 Compatible with mixed development teams"
337
-
338
- # Documentation and team guidance
339
- team-guidance:
340
- name: Team Development Guidance
341
- if: always()
342
- needs: [build]
343
- runs-on: ubuntu-latest
344
- steps:
345
- - name: Cross-Platform Development Summary
346
- run: |
347
- cat << 'EOF'
348
-
349
- ╔══════════════════════════════════════════════════════════════╗
350
- ║ CROSS-PLATFORM TEAM DEVELOPMENT ║
351
- ║ GITHUB ACTIONS EDITION ║
352
- ╚══════════════════════════════════════════════════════════════╝
353
-
354
- 🎯 DEPLOYMENT STRATEGY:
355
- ├── Build: Linux (ubuntu-latest) for speed
356
- ├── Dev Deploy: Linux + Bash (Mac developer experience)
357
- ├── Test Deploy: Windows + PowerShell (enterprise validation)
358
- └── Prod Deploy: Flexible (Linux default, Windows optional)
359
-
360
- 👥 TEAM MEMBER COMPATIBILITY:
361
-
362
- 🖥️ WINDOWS DEVELOPERS:
363
- • Local Scripts: deployment/scripts/*.ps1
364
- • Quick Start: deployment/QUICKSTART-WINDOWS.md
365
- • Team Setup: deployment/scripts/team-onboarding.ps1
366
- • Pipeline: Uses windows-latest runner for test/prod
367
-
368
- 🍎 MAC DEVELOPERS:
369
- • Local Scripts: deployment/scripts/*.sh
370
- • Quick Start: deployment/QUICKSTART-MAC.md
371
- • Team Setup: deployment/scripts/team-onboarding.sh
372
- • Pipeline: Uses ubuntu-latest runner (Linux compatibility)
373
-
374
- ✅ COMPATIBILITY GUARANTEES:
375
- ├── ✅ Same deployment results across all platforms
376
- ├── ✅ Shared JSON configuration files
377
- ├── ✅ Identical build artifacts and processes
378
- ├── ✅ Compatible logging and error reporting
379
- └── ✅ Cross-platform CI/CD pipeline support
380
-
381
- 🔧 COMMAND EQUIVALENTS:
382
-
383
- Local Development:
384
- │ Windows: .\deployment\scripts\deploy.ps1 -Environment dev
385
- │ Mac: ./deployment/scripts/deploy.sh dev
386
- │ Result: Identical deployment to Dynamics 365
387
-
388
- GitHub Actions:
389
- │ All platforms use the same workflow
390
- │ Runner selection optimized for each stage
391
- │ Manual platform override available for production
392
-
393
- 🚀 WORKFLOW DISPATCH OPTIONS:
394
- │ Manual triggers support both environment and platform selection
395
- │ Default: Linux for consistency and speed
396
- │ Override: Windows for enterprise PowerShell workflows
397
-
398
- 📚 GETTING STARTED:
399
- 1. Choose your platform guide:
400
- • Windows: deployment/QUICKSTART-WINDOWS.md
401
- • Mac: deployment/QUICKSTART-MAC.md
402
- 2. Run team onboarding script for your platform
403
- 3. All team members share the same GitHub Actions workflow
404
- 4. Local development scripts match your platform preference
405
-
406
- 💡 This workflow ensures seamless collaboration between
407
- Windows and Mac developers on the same D365 project!
408
-
409
- EOF
410
-
411
- - name: Add to job summary
412
- run: |
413
- echo "## 🤝 Cross-Platform Team Development" >> $GITHUB_STEP_SUMMARY
414
- echo "" >> $GITHUB_STEP_SUMMARY
415
- echo "This GitHub Actions workflow supports mixed Windows/Mac development teams:" >> $GITHUB_STEP_SUMMARY
416
- echo "" >> $GITHUB_STEP_SUMMARY
417
- echo "- **Windows Developers**: Use PowerShell scripts locally, Windows runners in CI/CD" >> $GITHUB_STEP_SUMMARY
418
- echo "- **Mac Developers**: Use Bash scripts locally, Linux runners in CI/CD" >> $GITHUB_STEP_SUMMARY
419
- echo "- **Shared Pipeline**: Same workflow file works for entire team" >> $GITHUB_STEP_SUMMARY
420
- echo "- **Identical Results**: Platform-agnostic deployment outcomes" >> $GITHUB_STEP_SUMMARY
421
- echo "" >> $GITHUB_STEP_SUMMARY
422
- echo "See deployment/QUICKSTART-WINDOWS.md or deployment/QUICKSTART-MAC.md for platform-specific setup guides." >> $GITHUB_STEP_SUMMARY