@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.
- package/README.md +74 -0
- package/dist/artifacts/registry.d.ts +18 -0
- package/dist/artifacts/registry.d.ts.map +1 -0
- package/dist/artifacts/registry.js +340 -0
- package/dist/artifacts/registry.js.map +1 -0
- package/dist/artifacts/types.d.ts +122 -0
- package/dist/artifacts/types.d.ts.map +1 -0
- package/dist/artifacts/types.js +7 -0
- package/dist/artifacts/types.js.map +1 -0
- package/dist/artifacts/validators.d.ts +16 -0
- package/dist/artifacts/validators.d.ts.map +1 -0
- package/dist/artifacts/validators.js +45 -0
- package/dist/artifacts/validators.js.map +1 -0
- package/dist/fromDesign.d.ts +5 -0
- package/dist/fromDesign.d.ts.map +1 -0
- package/dist/fromDesign.js +98 -0
- package/dist/fromDesign.js.map +1 -0
- package/dist/index.js +129 -177
- package/dist/index.js.map +1 -1
- package/dist/injectDevTools.d.ts +28 -0
- package/dist/injectDevTools.d.ts.map +1 -0
- package/dist/injectDevTools.js +148 -0
- package/dist/injectDevTools.js.map +1 -0
- package/dist/scaffold.d.ts +48 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +180 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/templatePlan.d.ts +3 -0
- package/dist/templatePlan.d.ts.map +1 -0
- package/dist/templatePlan.js +43 -0
- package/dist/templatePlan.js.map +1 -0
- package/dist/utils/copyTemplate.d.ts +13 -1
- package/dist/utils/copyTemplate.d.ts.map +1 -1
- package/dist/utils/copyTemplate.js +98 -4
- package/dist/utils/copyTemplate.js.map +1 -1
- package/dist/utils/updatePackageJson.d.ts +11 -1
- package/dist/utils/updatePackageJson.d.ts.map +1 -1
- package/dist/utils/updatePackageJson.js +12 -10
- package/dist/utils/updatePackageJson.js.map +1 -1
- package/package.json +10 -7
- package/templates/_shared/dev-tools/auth/get-token.js +72 -0
- package/templates/_shared/dev-tools/dev/mock-xrm.js +42 -0
- package/templates/_shared/dev-tools/metadata-sync/index.js +152 -0
- package/templates/_shared/dev-tools/smoke/test-retrieve.js +44 -0
- package/templates/dialog-form/README.md +27 -0
- package/templates/dialog-form/_variants/App.v8.tsx +39 -0
- package/templates/dialog-form/_variants/App.v9.tsx +41 -0
- package/templates/dialog-form/gitignore +5 -0
- package/templates/dialog-form/package.json +27 -0
- package/templates/dialog-form/public/index.html +11 -0
- package/templates/dialog-form/src/index.tsx +10 -0
- package/templates/dialog-form/src/services/dataverse.ts +30 -0
- package/templates/dialog-form/tsconfig.json +15 -0
- package/templates/dialog-form/webpack.config.js +17 -0
- package/templates/grid-customizer/README.md +28 -0
- package/templates/grid-customizer/gitignore +4 -0
- package/templates/grid-customizer/package.json +25 -0
- package/templates/grid-customizer/src/GridCustomizer.ts +28 -0
- package/templates/grid-customizer/src/cell-renderers.tsx +35 -0
- package/templates/grid-customizer/src/index.ts +4 -0
- package/templates/grid-customizer/src/types/grid-types.ts +30 -0
- package/templates/grid-customizer/src/utils/color-utils.ts +24 -0
- package/templates/grid-customizer/tsconfig.json +15 -0
- package/templates/grid-customizer/webpack.config.js +17 -0
- package/templates/pcf-dataset/ControlManifest.Input.xml +16 -0
- package/templates/pcf-dataset/README.md +21 -0
- package/templates/pcf-dataset/gitignore +5 -0
- package/templates/pcf-dataset/index.ts +39 -0
- package/templates/pcf-dataset/package.json +30 -0
- package/templates/pcf-dataset/strings/{{componentName}}.1033.resx +47 -0
- package/templates/pcf-dataset/tsconfig.json +8 -0
- package/templates/pcf-dataset/{{componentName}}Component.tsx +39 -0
- package/templates/pcf-field/ControlManifest.Input.xml +17 -0
- package/templates/pcf-field/README.md +95 -0
- package/templates/pcf-field/_variants/ValueInput.boolean.tsx +24 -0
- package/templates/pcf-field/_variants/ValueInput.date.tsx +27 -0
- package/templates/pcf-field/_variants/ValueInput.number.tsx +35 -0
- package/templates/pcf-field/_variants/ValueInput.text.tsx +27 -0
- package/templates/pcf-field/gitignore +5 -0
- package/templates/pcf-field/index.ts +61 -0
- package/templates/pcf-field/package.json +30 -0
- package/templates/pcf-field/strings/{{componentName}}.1033.resx +47 -0
- package/templates/pcf-field/tsconfig.json +8 -0
- package/templates/pcf-field/{{componentName}}Component.tsx +35 -0
- package/templates/power-pages-starter/gitignore +5 -0
- package/templates/react-custom-page/gitignore +5 -0
- package/templates/{dynamics-365-starter → react-custom-page}/package.json +3 -3
- package/templates/react-custom-page/tools/metadata-sync/index.js +152 -0
- package/templates/static-web-app/README.md +36 -0
- package/templates/static-web-app/_variants/App.v8.tsx +32 -0
- package/templates/static-web-app/_variants/App.v9.tsx +31 -0
- package/templates/static-web-app/api/host.json +12 -0
- package/templates/static-web-app/api/package.json +19 -0
- package/templates/static-web-app/api/src/functions/hello.ts +16 -0
- package/templates/static-web-app/api/tsconfig.json +14 -0
- package/templates/static-web-app/frontend/index.html +12 -0
- package/templates/static-web-app/frontend/package.json +23 -0
- package/templates/static-web-app/frontend/src/index.tsx +8 -0
- package/templates/static-web-app/frontend/tsconfig.json +16 -0
- package/templates/static-web-app/frontend/vite.config.ts +13 -0
- package/templates/static-web-app/gitignore +8 -0
- package/templates/static-web-app/package.json +15 -0
- package/templates/static-web-app/staticwebapp.config.json +7 -0
- package/templates/teams-app/README.md +27 -0
- package/templates/teams-app/_variants/graph.off.ts +7 -0
- package/templates/teams-app/_variants/graph.on.ts +22 -0
- package/templates/teams-app/appPackage/manifest.json +26 -0
- package/templates/teams-app/gitignore +5 -0
- package/templates/teams-app/index.html +12 -0
- package/templates/teams-app/package.json +26 -0
- package/templates/teams-app/src/App.tsx +25 -0
- package/templates/teams-app/src/index.tsx +8 -0
- package/templates/teams-app/tsconfig.json +16 -0
- package/templates/teams-app/vite.config.ts +9 -0
- package/templates/web-resource/README.md +39 -0
- package/templates/web-resource/_variants/App.v8.tsx +29 -0
- package/templates/web-resource/_variants/App.v9.tsx +28 -0
- package/templates/web-resource/gitignore +5 -0
- package/templates/web-resource/package.json +27 -0
- package/templates/web-resource/public/index.html +11 -0
- package/templates/web-resource/src/index.tsx +10 -0
- package/templates/web-resource/src/services/dataverse.ts +30 -0
- package/templates/web-resource/tsconfig.json +15 -0
- package/templates/web-resource/webpack.config.js +17 -0
- package/dist/utils/consultingHelpers.d.ts +0 -13
- package/dist/utils/consultingHelpers.d.ts.map +0 -1
- package/dist/utils/consultingHelpers.js +0 -569
- package/dist/utils/consultingHelpers.js.map +0 -1
- package/templates/dynamics-365-starter/INTEGRATION_TEST_RESULTS.md +0 -302
- package/templates/dynamics-365-starter/PHASE_4_COMPLETION_SUMMARY.md +0 -305
- package/templates/dynamics-365-starter/deployment/QUICKSTART-MAC.md +0 -507
- package/templates/dynamics-365-starter/deployment/QUICKSTART-WINDOWS.md +0 -372
- package/templates/dynamics-365-starter/deployment/pipelines/README.md +0 -375
- package/templates/dynamics-365-starter/deployment/pipelines/azure-pipelines.yml +0 -330
- package/templates/dynamics-365-starter/deployment/pipelines/github-actions.yml +0 -422
- package/templates/dynamics-365-starter/deployment/pipelines/jenkins.groovy +0 -636
- package/templates/dynamics-365-starter/deployment/scripts/deploy.ps1 +0 -417
- package/templates/dynamics-365-starter/deployment/scripts/deploy.sh +0 -582
- package/templates/dynamics-365-starter/deployment/scripts/team-onboarding.ps1 +0 -486
- package/templates/dynamics-365-starter/deployment/scripts/team-onboarding.sh +0 -567
- package/templates/dynamics-365-starter/deployment/scripts/validate-setup.ps1 +0 -703
- package/templates/dynamics-365-starter/deployment/scripts/validate-setup.sh +0 -671
- package/templates/dynamics-365-starter/docs/team-standards/README.md +0 -273
- package/templates/dynamics-365-starter/docs/team-standards/client-onboarding.md +0 -577
- package/templates/dynamics-365-starter/docs/team-standards/code-review-checklist.md +0 -359
- package/templates/dynamics-365-starter/docs/team-standards/coding-standards.md +0 -700
- package/templates/dynamics-365-starter/docs/team-standards/cross-platform-team-guide.md +0 -736
- package/templates/dynamics-365-starter/docs/team-standards/development-workflows.md +0 -727
- package/templates/dynamics-365-starter/docs/troubleshooting/common-errors.md +0 -758
- package/templates/dynamics-365-starter/docs/troubleshooting/platform-specific-issues.md +0 -878
- package/templates/dynamics-365-starter/src/client-project-template/README.md +0 -234
- package/templates/dynamics-365-starter/src/client-project-template/config/client.template.json +0 -114
- package/templates/dynamics-365-starter/src/client-project-template/config/environments/template.json +0 -186
- package/templates/dynamics-365-starter/src/client-project-template/scripts/client-setup.js +0 -667
- package/templates/dynamics-365-starter/src/examples/README.md +0 -52
- package/templates/dynamics-365-starter/src/examples/component-examples/opportunity-management.tsx +0 -625
- package/templates/dynamics-365-starter/src/examples/entity-examples/opportunity-model.ts +0 -545
- package/templates/dynamics-365-starter/src/examples/integration-examples/custom-pcf-wrapper.tsx +0 -722
- package/templates/dynamics-365-starter/src/examples/workflow-examples/sales-workflow.ts +0 -662
- package/templates/dynamics-365-starter/src/page-templates/EntityDashboard.tsx +0 -519
- package/templates/dynamics-365-starter/src/page-templates/EntityDetailPage.tsx +0 -456
- package/templates/dynamics-365-starter/src/page-templates/EntityListPage.tsx +0 -406
- package/templates/dynamics-365-starter/src/page-templates/RelatedEntitiesPage.tsx +0 -578
- package/templates/dynamics-365-starter/src/page-templates/SearchPage.tsx +0 -629
- package/templates/dynamics-365-starter/tools/entity-generator/index.js +0 -168
- package/templates/dynamics-365-starter/tools/entity-generator/templates/constants.template.ts +0 -124
- package/templates/dynamics-365-starter/tools/entity-generator/templates/form.template.css +0 -283
- package/templates/dynamics-365-starter/tools/entity-generator/templates/form.template.tsx +0 -275
- package/templates/dynamics-365-starter/tools/entity-generator/templates/management.template.css +0 -204
- package/templates/dynamics-365-starter/tools/entity-generator/templates/management.template.tsx +0 -413
- package/templates/dynamics-365-starter/tools/entity-generator/templates/model.template.ts +0 -250
- package/templates/dynamics-365-starter/tools/metadata-sync/d365-client.js +0 -410
- package/templates/dynamics-365-starter/tools/metadata-sync/index.js +0 -512
- package/templates/dynamics-365-starter/tools/metadata-sync/type-generator.js +0 -675
- /package/templates/{dynamics-365-starter → react-custom-page}/README.md +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/deployment/README.md +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/docs/ARCHITECTURE_OVERVIEW.md +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/docs/BEST_PRACTICES.md +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/docs/MIGRATION_GUIDE.md +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/public/index.html +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/scripts/custom-build.js +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountForm.css +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountForm.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountManagement.css +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/AccountManagement.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactForm.css +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactForm.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactManagement.css +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/ContactManagement.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LogDialog.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingContext.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingDebugPanel.css +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingDebugPanel.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/LoggingProvider.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/components/Logging/logger.ts +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/constants/account.ts +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/constants/contact.ts +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/index.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/models/Account.ts +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/models/BaseEntity.ts +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/models/Contact.ts +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/pcf/ContactControlWrapper.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/pcf/MultiEntityControlWrapper.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/providers/DynamicsProvider.tsx +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/services/MockApiService.ts +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/services/ServiceFactory.ts +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/services/XrmApiService.ts +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/src/styles/index.css +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/tsconfig.json +0 -0
- /package/templates/{dynamics-365-starter → react-custom-page}/webpack.config.js +0 -0
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
# CI/CD Pipelines - Cross-Platform Team Support
|
|
2
|
-
|
|
3
|
-
This directory contains CI/CD pipeline configurations that support mixed Windows/Mac development
|
|
4
|
-
teams working on Dynamics 365 projects.
|
|
5
|
-
|
|
6
|
-
## Overview
|
|
7
|
-
|
|
8
|
-
The pipeline configurations demonstrate how to create robust, cross-platform CI/CD workflows that
|
|
9
|
-
allow Windows and Mac developers to work seamlessly on the same project while using their preferred
|
|
10
|
-
platform and tooling.
|
|
11
|
-
|
|
12
|
-
## Pipeline Files
|
|
13
|
-
|
|
14
|
-
### 🔷 Azure DevOps Pipeline
|
|
15
|
-
|
|
16
|
-
**File**: `azure-pipelines.yml`
|
|
17
|
-
|
|
18
|
-
- **Build**: Linux agent (ubuntu-latest) for optimal performance
|
|
19
|
-
- **Dev Deploy**: Linux + Bash scripts (Mac developer experience)
|
|
20
|
-
- **Test Deploy**: Windows + PowerShell scripts (enterprise validation)
|
|
21
|
-
- **Prod Deploy**: Linux + Bash scripts (production stability)
|
|
22
|
-
|
|
23
|
-
```yaml
|
|
24
|
-
# Example stage configuration
|
|
25
|
-
- stage: DeployDev
|
|
26
|
-
jobs:
|
|
27
|
-
- deployment: DeployToDev
|
|
28
|
-
pool:
|
|
29
|
-
vmImage: 'ubuntu-latest' # Linux for Bash scripts
|
|
30
|
-
strategy:
|
|
31
|
-
runOnce:
|
|
32
|
-
deploy:
|
|
33
|
-
steps:
|
|
34
|
-
- bash: ./deployment/scripts/deploy.sh dev --verbose
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### 🟢 GitHub Actions Workflow
|
|
38
|
-
|
|
39
|
-
**File**: `github-actions.yml`
|
|
40
|
-
|
|
41
|
-
- **Build**: Ubuntu runner for speed and consistency
|
|
42
|
-
- **Dev Deploy**: Ubuntu + Bash (Mac compatibility)
|
|
43
|
-
- **Test Deploy**: Windows + PowerShell (Windows compatibility)
|
|
44
|
-
- **Prod Deploy**: Flexible platform choice via workflow dispatch
|
|
45
|
-
|
|
46
|
-
```yaml
|
|
47
|
-
# Example job configuration
|
|
48
|
-
deploy-dev:
|
|
49
|
-
runs-on: ubuntu-latest # Linux for Bash scripts
|
|
50
|
-
steps:
|
|
51
|
-
- name: Deploy to Development
|
|
52
|
-
run: ./deployment/scripts/deploy.sh dev --verbose
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### 🔵 Jenkins Pipeline
|
|
56
|
-
|
|
57
|
-
**File**: `jenkins.groovy`
|
|
58
|
-
|
|
59
|
-
- **Build**: Linux agents for optimal build performance
|
|
60
|
-
- **Dev Deploy**: Linux + Bash scripts
|
|
61
|
-
- **Test Deploy**: Windows + PowerShell scripts
|
|
62
|
-
- **Prod Deploy**: Manual platform selection with approval gates
|
|
63
|
-
|
|
64
|
-
```groovy
|
|
65
|
-
// Example stage configuration
|
|
66
|
-
stage('Deploy to Development') {
|
|
67
|
-
agent { label 'linux && docker' }
|
|
68
|
-
steps {
|
|
69
|
-
sh './deployment/scripts/deploy.sh dev --verbose'
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Cross-Platform Strategy
|
|
75
|
-
|
|
76
|
-
### 🎯 Design Principles
|
|
77
|
-
|
|
78
|
-
1. **Platform Optimization**: Use the best platform for each stage
|
|
79
|
-
- **Linux**: Build performance, Mac developer experience
|
|
80
|
-
- **Windows**: Enterprise PowerShell workflows, Windows compatibility
|
|
81
|
-
|
|
82
|
-
2. **Team Compatibility**: Support both development environments
|
|
83
|
-
- **Windows Developers**: PowerShell scripts locally + Windows CI/CD stages
|
|
84
|
-
- **Mac Developers**: Bash scripts locally + Linux CI/CD stages
|
|
85
|
-
|
|
86
|
-
3. **Deployment Consistency**: Identical results regardless of platform
|
|
87
|
-
- Same build artifacts
|
|
88
|
-
- Same configuration files
|
|
89
|
-
- Same deployment outcomes
|
|
90
|
-
|
|
91
|
-
### 📋 Platform Selection Matrix
|
|
92
|
-
|
|
93
|
-
| Stage | Platform | Script Type | Rationale |
|
|
94
|
-
| --------------- | -------- | ----------------- | -------------------------------------------------- |
|
|
95
|
-
| **Build** | Linux | npm/Node.js | Fastest performance, consistent environment |
|
|
96
|
-
| **Dev Deploy** | Linux | Bash (.sh) | Mac developer local experience |
|
|
97
|
-
| **Test Deploy** | Windows | PowerShell (.ps1) | Enterprise validation, Windows workflows |
|
|
98
|
-
| **Prod Deploy** | Flexible | User choice | Allows team preference or environment requirements |
|
|
99
|
-
|
|
100
|
-
## Team Member Experience
|
|
101
|
-
|
|
102
|
-
### 🖥️ Windows Developers
|
|
103
|
-
|
|
104
|
-
**Local Development**:
|
|
105
|
-
|
|
106
|
-
```powershell
|
|
107
|
-
# Use PowerShell scripts locally
|
|
108
|
-
.\deployment\scripts\deploy.ps1 -Environment dev
|
|
109
|
-
.\deployment\scripts\health-check.ps1 -Environment dev
|
|
110
|
-
|
|
111
|
-
# Follow Windows-specific guide
|
|
112
|
-
Get-Content deployment\QUICKSTART-WINDOWS.md
|
|
113
|
-
|
|
114
|
-
# Run team onboarding
|
|
115
|
-
.\deployment\scripts\team-onboarding.ps1
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**CI/CD Experience**:
|
|
119
|
-
|
|
120
|
-
- Build stage runs on Linux (faster)
|
|
121
|
-
- Test deployment uses Windows runners with PowerShell
|
|
122
|
-
- Production deployment can use Windows if preferred
|
|
123
|
-
- All pipeline results match local PowerShell deployment results
|
|
124
|
-
|
|
125
|
-
### 🍎 Mac Developers
|
|
126
|
-
|
|
127
|
-
**Local Development**:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
# Use Bash scripts locally
|
|
131
|
-
./deployment/scripts/deploy.sh dev
|
|
132
|
-
./deployment/scripts/health-check.sh dev
|
|
133
|
-
|
|
134
|
-
# Follow Mac-specific guide
|
|
135
|
-
open deployment/QUICKSTART-MAC.md
|
|
136
|
-
|
|
137
|
-
# Run team onboarding
|
|
138
|
-
./deployment/scripts/team-onboarding.sh
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
**CI/CD Experience**:
|
|
142
|
-
|
|
143
|
-
- Build stage runs on Linux (compatible)
|
|
144
|
-
- Development deployment uses Linux runners with Bash
|
|
145
|
-
- Production deployment uses Linux by default
|
|
146
|
-
- All pipeline results match local Bash deployment results
|
|
147
|
-
|
|
148
|
-
## Configuration Examples
|
|
149
|
-
|
|
150
|
-
### Azure DevOps Variable Groups
|
|
151
|
-
|
|
152
|
-
Create these variable groups in Azure DevOps:
|
|
153
|
-
|
|
154
|
-
```yaml
|
|
155
|
-
# dynamics-365-dev-secrets
|
|
156
|
-
D365_DEV_CLIENT_ID: 'your-dev-client-id'
|
|
157
|
-
D365_DEV_CLIENT_SECRET: 'your-dev-client-secret'
|
|
158
|
-
D365_DEV_TENANT_ID: 'your-dev-tenant-id'
|
|
159
|
-
D365_DEV_ORG_URL: 'https://yourdev.crm.dynamics.com'
|
|
160
|
-
|
|
161
|
-
# dynamics-365-test-secrets
|
|
162
|
-
D365_TEST_CLIENT_ID: 'your-test-client-id'
|
|
163
|
-
D365_TEST_CLIENT_SECRET: 'your-test-client-secret'
|
|
164
|
-
D365_TEST_TENANT_ID: 'your-test-tenant-id'
|
|
165
|
-
D365_TEST_ORG_URL: 'https://yourtest.crm.dynamics.com'
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### GitHub Actions Secrets
|
|
169
|
-
|
|
170
|
-
Add these secrets to your GitHub repository:
|
|
171
|
-
|
|
172
|
-
```yaml
|
|
173
|
-
# Development environment
|
|
174
|
-
D365_DEV_CLIENT_ID
|
|
175
|
-
D365_DEV_CLIENT_SECRET
|
|
176
|
-
D365_DEV_TENANT_ID
|
|
177
|
-
|
|
178
|
-
# Test environment
|
|
179
|
-
D365_TEST_CLIENT_ID
|
|
180
|
-
D365_TEST_CLIENT_SECRET
|
|
181
|
-
D365_TEST_TENANT_ID
|
|
182
|
-
|
|
183
|
-
# Production environment
|
|
184
|
-
D365_PROD_CLIENT_ID
|
|
185
|
-
D365_PROD_CLIENT_SECRET
|
|
186
|
-
D365_PROD_TENANT_ID
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Jenkins Credentials
|
|
190
|
-
|
|
191
|
-
Create these credential entries in Jenkins:
|
|
192
|
-
|
|
193
|
-
```groovy
|
|
194
|
-
// Username/Password credentials
|
|
195
|
-
d365-dev-credentials: [username: client-id, password: client-secret]
|
|
196
|
-
d365-test-credentials: [username: client-id, password: client-secret]
|
|
197
|
-
d365-prod-credentials: [username: client-id, password: client-secret]
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
## Platform-Specific Features
|
|
201
|
-
|
|
202
|
-
### Azure DevOps Highlights
|
|
203
|
-
|
|
204
|
-
- **Mixed Agents**: Linux for builds, Windows for PowerShell validation
|
|
205
|
-
- **Variable Groups**: Centralized secret management
|
|
206
|
-
- **Environment Gates**: Manual approvals for production
|
|
207
|
-
- **Cross-Platform Validation**: Parallel validation on both platforms
|
|
208
|
-
|
|
209
|
-
### GitHub Actions Highlights
|
|
210
|
-
|
|
211
|
-
- **Workflow Dispatch**: Manual triggers with platform selection
|
|
212
|
-
- **Matrix Builds**: Cross-platform validation in pull requests
|
|
213
|
-
- **Environment Protection**: Branch protection and approval workflows
|
|
214
|
-
- **Platform Detection**: Automatic runner selection based on strategy
|
|
215
|
-
|
|
216
|
-
### Jenkins Highlights
|
|
217
|
-
|
|
218
|
-
- **Agent Labels**: Flexible agent selection (linux, windows, docker)
|
|
219
|
-
- **Manual Approval**: Production deployment approval with platform choice
|
|
220
|
-
- **Parallel Validation**: Cross-platform validation stages
|
|
221
|
-
- **Artifact Management**: Centralized build artifact sharing
|
|
222
|
-
|
|
223
|
-
## Troubleshooting Cross-Platform Issues
|
|
224
|
-
|
|
225
|
-
### Common Platform-Specific Problems
|
|
226
|
-
|
|
227
|
-
#### Windows PowerShell Issues
|
|
228
|
-
|
|
229
|
-
```powershell
|
|
230
|
-
# Module installation problems
|
|
231
|
-
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force -AllowClobber -Scope CurrentUser
|
|
232
|
-
|
|
233
|
-
# Execution policy issues
|
|
234
|
-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
|
235
|
-
|
|
236
|
-
# Path separator issues (use either)
|
|
237
|
-
.\deployment\scripts\deploy.ps1 # Windows style
|
|
238
|
-
./deployment/scripts/deploy.ps1 # Cross-platform style
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
#### Linux/Mac Bash Issues
|
|
242
|
-
|
|
243
|
-
```bash
|
|
244
|
-
# Script permissions
|
|
245
|
-
chmod +x deployment/scripts/*.sh
|
|
246
|
-
|
|
247
|
-
# Missing dependencies
|
|
248
|
-
# Ubuntu/Debian:
|
|
249
|
-
sudo apt-get install jq curl nodejs npm
|
|
250
|
-
|
|
251
|
-
# macOS:
|
|
252
|
-
brew install jq curl node npm
|
|
253
|
-
|
|
254
|
-
# Path issues (always use forward slashes)
|
|
255
|
-
./deployment/scripts/deploy.sh
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### Pipeline-Specific Debugging
|
|
259
|
-
|
|
260
|
-
#### Azure DevOps
|
|
261
|
-
|
|
262
|
-
```yaml
|
|
263
|
-
# Enable verbose logging
|
|
264
|
-
- bash: ./deployment/scripts/deploy.sh dev --verbose
|
|
265
|
-
displayName: 'Deploy with verbose output'
|
|
266
|
-
|
|
267
|
-
# Platform detection
|
|
268
|
-
- bash: |
|
|
269
|
-
echo "Runner OS: $(Agent.OS)"
|
|
270
|
-
echo "Agent Name: $(Agent.Name)"
|
|
271
|
-
uname -a
|
|
272
|
-
displayName: 'Show platform information'
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
#### GitHub Actions
|
|
276
|
-
|
|
277
|
-
```yaml
|
|
278
|
-
# Debug runner environment
|
|
279
|
-
- name: Debug Platform
|
|
280
|
-
run: |
|
|
281
|
-
echo "Runner OS: ${{ runner.os }}"
|
|
282
|
-
echo "Runner Name: ${{ runner.name }}"
|
|
283
|
-
uname -a || systeminfo
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
#### Jenkins
|
|
287
|
-
|
|
288
|
-
```groovy
|
|
289
|
-
// Debug agent information
|
|
290
|
-
sh '''
|
|
291
|
-
echo "Node Name: ${NODE_NAME}"
|
|
292
|
-
echo "Agent OS: $(uname -a || systeminfo)"
|
|
293
|
-
echo "Available Scripts:"
|
|
294
|
-
ls -la deployment/scripts/ || dir deployment\\scripts\\
|
|
295
|
-
'''
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
## Best Practices
|
|
299
|
-
|
|
300
|
-
### 1. Script Compatibility
|
|
301
|
-
|
|
302
|
-
- ✅ Maintain parallel PowerShell (.ps1) and Bash (.sh) scripts
|
|
303
|
-
- ✅ Use identical command-line interfaces where possible
|
|
304
|
-
- ✅ Share JSON configuration files between platforms
|
|
305
|
-
- ✅ Test both script types produce identical results
|
|
306
|
-
|
|
307
|
-
### 2. Pipeline Strategy
|
|
308
|
-
|
|
309
|
-
- ✅ Use Linux for build performance
|
|
310
|
-
- ✅ Use Windows for PowerShell module testing
|
|
311
|
-
- ✅ Provide platform choice for production deployments
|
|
312
|
-
- ✅ Include cross-platform validation for pull requests
|
|
313
|
-
|
|
314
|
-
### 3. Team Onboarding
|
|
315
|
-
|
|
316
|
-
- ✅ Provide platform-specific quick start guides
|
|
317
|
-
- ✅ Include team onboarding scripts for both platforms
|
|
318
|
-
- ✅ Document command equivalents in team documentation
|
|
319
|
-
- ✅ Set up platform-specific development environments
|
|
320
|
-
|
|
321
|
-
### 4. Error Handling
|
|
322
|
-
|
|
323
|
-
- ✅ Include platform detection in error messages
|
|
324
|
-
- ✅ Provide platform-specific troubleshooting steps
|
|
325
|
-
- ✅ Log platform information in deployment logs
|
|
326
|
-
- ✅ Include rollback procedures for both platforms
|
|
327
|
-
|
|
328
|
-
## Command Equivalents Reference
|
|
329
|
-
|
|
330
|
-
| Task | Windows PowerShell | Mac/Linux Bash | Result |
|
|
331
|
-
| ------------------- | --------------------------------------------------------- | ---------------------------------- | ----------------------- |
|
|
332
|
-
| **Deploy to Dev** | `.\deploy.ps1 -Environment dev` | `./deploy.sh dev` | Identical deployment |
|
|
333
|
-
| **Health Check** | `.\health-check.ps1 -Environment prod` | `./health-check.sh prod` | Same validation |
|
|
334
|
-
| **Rollback** | `.\rollback.ps1 -Environment prod -BackupFile backup.zip` | `./rollback.sh prod backup.tar.gz` | Same rollback |
|
|
335
|
-
| **Team Onboarding** | `.\team-onboarding.ps1` | `./team-onboarding.sh` | Platform-specific setup |
|
|
336
|
-
|
|
337
|
-
## Getting Started
|
|
338
|
-
|
|
339
|
-
### For New Projects
|
|
340
|
-
|
|
341
|
-
1. **Choose Your Pipeline**: Select Azure DevOps, GitHub Actions, or Jenkins
|
|
342
|
-
2. **Copy Configuration**: Use the appropriate pipeline file as a starting point
|
|
343
|
-
3. **Configure Secrets**: Set up environment-specific credentials
|
|
344
|
-
4. **Test Cross-Platform**: Run validation on both Windows and Linux agents
|
|
345
|
-
5. **Document Team Process**: Share platform-specific guides with your team
|
|
346
|
-
|
|
347
|
-
### For Existing Projects
|
|
348
|
-
|
|
349
|
-
1. **Assess Current Setup**: Determine current platform dependencies
|
|
350
|
-
2. **Create Parallel Scripts**: Add missing PowerShell or Bash scripts
|
|
351
|
-
3. **Update Pipeline**: Modify existing pipeline for cross-platform support
|
|
352
|
-
4. **Validate Compatibility**: Test deployment results across platforms
|
|
353
|
-
5. **Train Team**: Provide platform-specific training and documentation
|
|
354
|
-
|
|
355
|
-
## Support and Troubleshooting
|
|
356
|
-
|
|
357
|
-
### Documentation Resources
|
|
358
|
-
|
|
359
|
-
- **Windows Setup**: `../QUICKSTART-WINDOWS.md`
|
|
360
|
-
- **Mac Setup**: `../QUICKSTART-MAC.md`
|
|
361
|
-
- **Deployment Guide**: `../README.md`
|
|
362
|
-
- **Team Standards**: `../../docs/team-standards/`
|
|
363
|
-
|
|
364
|
-
### Getting Help
|
|
365
|
-
|
|
366
|
-
- Check platform-specific logs in `../logs/`
|
|
367
|
-
- Review deployment scripts in `../scripts/`
|
|
368
|
-
- Consult team onboarding scripts for environment setup
|
|
369
|
-
- Contact DevOps team with platform and error details
|
|
370
|
-
|
|
371
|
-
---
|
|
372
|
-
|
|
373
|
-
This cross-platform CI/CD approach ensures that Windows and Mac developers can work together
|
|
374
|
-
seamlessly while leveraging the strengths of each platform for optimal build and deployment
|
|
375
|
-
performance.
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
# Azure DevOps Pipeline - Dual Platform Support
|
|
2
|
-
# Supports both Windows and Linux agents for mixed development teams
|
|
3
|
-
|
|
4
|
-
trigger:
|
|
5
|
-
branches:
|
|
6
|
-
include:
|
|
7
|
-
- main
|
|
8
|
-
- develop
|
|
9
|
-
- feature/*
|
|
10
|
-
paths:
|
|
11
|
-
exclude:
|
|
12
|
-
- docs/*
|
|
13
|
-
- "*.md"
|
|
14
|
-
|
|
15
|
-
pr:
|
|
16
|
-
branches:
|
|
17
|
-
include:
|
|
18
|
-
- main
|
|
19
|
-
- develop
|
|
20
|
-
|
|
21
|
-
variables:
|
|
22
|
-
- group: dynamics-365-variables # Variable group with environment configs
|
|
23
|
-
- name: node.version
|
|
24
|
-
value: "18.x"
|
|
25
|
-
- name: npm.cache
|
|
26
|
-
value: $(Pipeline.Workspace)/.npm
|
|
27
|
-
|
|
28
|
-
stages:
|
|
29
|
-
# Build Stage - Run on Linux for faster execution
|
|
30
|
-
- stage: Build
|
|
31
|
-
displayName: "Build Application"
|
|
32
|
-
jobs:
|
|
33
|
-
- job: BuildJob
|
|
34
|
-
displayName: "Build and Test"
|
|
35
|
-
pool:
|
|
36
|
-
vmImage: "ubuntu-latest" # Linux agent for faster builds
|
|
37
|
-
steps:
|
|
38
|
-
- task: NodeTool@0
|
|
39
|
-
displayName: "Install Node.js"
|
|
40
|
-
inputs:
|
|
41
|
-
versionSpec: $(node.version)
|
|
42
|
-
|
|
43
|
-
- task: Cache@2
|
|
44
|
-
displayName: "Cache npm dependencies"
|
|
45
|
-
inputs:
|
|
46
|
-
key: 'npm | "$(Agent.OS)" | package-lock.json'
|
|
47
|
-
restoreKeys: |
|
|
48
|
-
npm | "$(Agent.OS)"
|
|
49
|
-
path: $(npm.cache)
|
|
50
|
-
|
|
51
|
-
- script: |
|
|
52
|
-
npm config set cache $(npm.cache)
|
|
53
|
-
npm ci
|
|
54
|
-
displayName: "Install dependencies"
|
|
55
|
-
|
|
56
|
-
- script: npm run lint
|
|
57
|
-
displayName: "Run linting"
|
|
58
|
-
|
|
59
|
-
- script: npm run typecheck
|
|
60
|
-
displayName: "TypeScript validation"
|
|
61
|
-
|
|
62
|
-
- script: npm run test
|
|
63
|
-
displayName: "Run unit tests"
|
|
64
|
-
|
|
65
|
-
- script: npm run build:prod
|
|
66
|
-
displayName: "Build production bundle"
|
|
67
|
-
|
|
68
|
-
- task: PublishTestResults@2
|
|
69
|
-
displayName: "Publish test results"
|
|
70
|
-
inputs:
|
|
71
|
-
testResultsFormat: "JUnit"
|
|
72
|
-
testResultsFiles: "test-results.xml"
|
|
73
|
-
mergeTestResults: true
|
|
74
|
-
condition: succeededOrFailed()
|
|
75
|
-
|
|
76
|
-
- task: PublishCodeCoverageResults@1
|
|
77
|
-
displayName: "Publish code coverage"
|
|
78
|
-
inputs:
|
|
79
|
-
codeCoverageTool: "Cobertura"
|
|
80
|
-
summaryFileLocation: "coverage/cobertura-coverage.xml"
|
|
81
|
-
reportDirectory: "coverage"
|
|
82
|
-
condition: succeededOrFailed()
|
|
83
|
-
|
|
84
|
-
- task: PublishBuildArtifacts@1
|
|
85
|
-
displayName: "Publish build artifacts"
|
|
86
|
-
inputs:
|
|
87
|
-
PathtoPublish: "dist"
|
|
88
|
-
ArtifactName: "build-artifacts"
|
|
89
|
-
|
|
90
|
-
- task: PublishBuildArtifacts@1
|
|
91
|
-
displayName: "Publish deployment scripts"
|
|
92
|
-
inputs:
|
|
93
|
-
PathtoPublish: "deployment"
|
|
94
|
-
ArtifactName: "deployment-scripts"
|
|
95
|
-
|
|
96
|
-
# Development Deployment - Linux Agent with Bash
|
|
97
|
-
- stage: DeployDev
|
|
98
|
-
displayName: "Deploy to Development"
|
|
99
|
-
dependsOn: Build
|
|
100
|
-
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
|
|
101
|
-
jobs:
|
|
102
|
-
- deployment: DeployToDev
|
|
103
|
-
displayName: "Deploy to Development Environment"
|
|
104
|
-
pool:
|
|
105
|
-
vmImage: "ubuntu-latest" # Linux agent for Bash scripts
|
|
106
|
-
environment: "Dynamics365-Dev"
|
|
107
|
-
variables:
|
|
108
|
-
- group: dynamics-365-dev-secrets
|
|
109
|
-
strategy:
|
|
110
|
-
runOnce:
|
|
111
|
-
deploy:
|
|
112
|
-
steps:
|
|
113
|
-
- download: current
|
|
114
|
-
artifact: build-artifacts
|
|
115
|
-
displayName: "Download build artifacts"
|
|
116
|
-
|
|
117
|
-
- download: current
|
|
118
|
-
artifact: deployment-scripts
|
|
119
|
-
displayName: "Download deployment scripts"
|
|
120
|
-
|
|
121
|
-
- task: CopyFiles@2
|
|
122
|
-
displayName: "Copy build artifacts"
|
|
123
|
-
inputs:
|
|
124
|
-
SourceFolder: "$(Pipeline.Workspace)/build-artifacts"
|
|
125
|
-
TargetFolder: "$(System.DefaultWorkingDirectory)/dist"
|
|
126
|
-
|
|
127
|
-
- task: CopyFiles@2
|
|
128
|
-
displayName: "Copy deployment scripts"
|
|
129
|
-
inputs:
|
|
130
|
-
SourceFolder: "$(Pipeline.Workspace)/deployment-scripts"
|
|
131
|
-
TargetFolder: "$(System.DefaultWorkingDirectory)/deployment"
|
|
132
|
-
|
|
133
|
-
- bash: |
|
|
134
|
-
# Make scripts executable
|
|
135
|
-
chmod +x deployment/scripts/*.sh
|
|
136
|
-
|
|
137
|
-
# Set up environment variables from Azure DevOps variable group
|
|
138
|
-
export D365_CLIENT_ID="$(D365_DEV_CLIENT_ID)"
|
|
139
|
-
export D365_CLIENT_SECRET="$(D365_DEV_CLIENT_SECRET)"
|
|
140
|
-
export D365_TENANT_ID="$(D365_DEV_TENANT_ID)"
|
|
141
|
-
export D365_ORG_URL="$(D365_DEV_ORG_URL)"
|
|
142
|
-
|
|
143
|
-
# Run deployment using Bash script
|
|
144
|
-
./deployment/scripts/deploy.sh dev --verbose
|
|
145
|
-
displayName: "Deploy to Development (Bash)"
|
|
146
|
-
env:
|
|
147
|
-
D365_DEV_CLIENT_ID: $(D365_DEV_CLIENT_ID)
|
|
148
|
-
D365_DEV_CLIENT_SECRET: $(D365_DEV_CLIENT_SECRET)
|
|
149
|
-
D365_DEV_TENANT_ID: $(D365_DEV_TENANT_ID)
|
|
150
|
-
D365_DEV_ORG_URL: $(D365_DEV_ORG_URL)
|
|
151
|
-
|
|
152
|
-
# Test Deployment - Windows Agent with PowerShell
|
|
153
|
-
- stage: DeployTest
|
|
154
|
-
displayName: "Deploy to Test"
|
|
155
|
-
dependsOn: Build
|
|
156
|
-
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
|
|
157
|
-
jobs:
|
|
158
|
-
- deployment: DeployToTest
|
|
159
|
-
displayName: "Deploy to Test Environment"
|
|
160
|
-
pool:
|
|
161
|
-
vmImage: "windows-latest" # Windows agent for PowerShell scripts
|
|
162
|
-
environment: "Dynamics365-Test"
|
|
163
|
-
variables:
|
|
164
|
-
- group: dynamics-365-test-secrets
|
|
165
|
-
strategy:
|
|
166
|
-
runOnce:
|
|
167
|
-
deploy:
|
|
168
|
-
steps:
|
|
169
|
-
- download: current
|
|
170
|
-
artifact: build-artifacts
|
|
171
|
-
displayName: "Download build artifacts"
|
|
172
|
-
|
|
173
|
-
- download: current
|
|
174
|
-
artifact: deployment-scripts
|
|
175
|
-
displayName: "Download deployment scripts"
|
|
176
|
-
|
|
177
|
-
- task: CopyFiles@2
|
|
178
|
-
displayName: "Copy build artifacts"
|
|
179
|
-
inputs:
|
|
180
|
-
SourceFolder: "$(Pipeline.Workspace)/build-artifacts"
|
|
181
|
-
TargetFolder: "$(System.DefaultWorkingDirectory)/dist"
|
|
182
|
-
|
|
183
|
-
- task: CopyFiles@2
|
|
184
|
-
displayName: "Copy deployment scripts"
|
|
185
|
-
inputs:
|
|
186
|
-
SourceFolder: "$(Pipeline.Workspace)/deployment-scripts"
|
|
187
|
-
TargetFolder: "$(System.DefaultWorkingDirectory)/deployment"
|
|
188
|
-
|
|
189
|
-
- task: PowerShell@2
|
|
190
|
-
displayName: "Install PowerShell modules"
|
|
191
|
-
inputs:
|
|
192
|
-
targetType: "inline"
|
|
193
|
-
script: |
|
|
194
|
-
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell -Force -AllowClobber
|
|
195
|
-
Install-Module -Name Microsoft.PowerApps.PowerShell -Force -AllowClobber
|
|
196
|
-
|
|
197
|
-
- task: PowerShell@2
|
|
198
|
-
displayName: "Deploy to Test (PowerShell)"
|
|
199
|
-
inputs:
|
|
200
|
-
filePath: "$(System.DefaultWorkingDirectory)/deployment/scripts/deploy.ps1"
|
|
201
|
-
arguments: "-Environment test -Verbose"
|
|
202
|
-
env:
|
|
203
|
-
D365_TEST_CLIENT_ID: $(D365_TEST_CLIENT_ID)
|
|
204
|
-
D365_TEST_CLIENT_SECRET: $(D365_TEST_CLIENT_SECRET)
|
|
205
|
-
D365_TEST_TENANT_ID: $(D365_TEST_TENANT_ID)
|
|
206
|
-
D365_TEST_ORG_URL: $(D365_TEST_ORG_URL)
|
|
207
|
-
|
|
208
|
-
# Production Deployment - Support both platforms with approval gates
|
|
209
|
-
- stage: DeployProd
|
|
210
|
-
displayName: "Deploy to Production"
|
|
211
|
-
dependsOn: [DeployTest]
|
|
212
|
-
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
|
|
213
|
-
jobs:
|
|
214
|
-
- deployment: DeployToProd
|
|
215
|
-
displayName: "Deploy to Production Environment"
|
|
216
|
-
pool:
|
|
217
|
-
# Allow either Windows or Linux agents based on availability
|
|
218
|
-
vmImage: "ubuntu-latest" # Default to Linux for consistency
|
|
219
|
-
environment: "Dynamics365-Production"
|
|
220
|
-
variables:
|
|
221
|
-
- group: dynamics-365-prod-secrets
|
|
222
|
-
strategy:
|
|
223
|
-
runOnce:
|
|
224
|
-
deploy:
|
|
225
|
-
steps:
|
|
226
|
-
- download: current
|
|
227
|
-
artifact: build-artifacts
|
|
228
|
-
displayName: "Download build artifacts"
|
|
229
|
-
|
|
230
|
-
- download: current
|
|
231
|
-
artifact: deployment-scripts
|
|
232
|
-
displayName: "Download deployment scripts"
|
|
233
|
-
|
|
234
|
-
- task: CopyFiles@2
|
|
235
|
-
displayName: "Copy build artifacts"
|
|
236
|
-
inputs:
|
|
237
|
-
SourceFolder: "$(Pipeline.Workspace)/build-artifacts"
|
|
238
|
-
TargetFolder: "$(System.DefaultWorkingDirectory)/dist"
|
|
239
|
-
|
|
240
|
-
- task: CopyFiles@2
|
|
241
|
-
displayName: "Copy deployment scripts"
|
|
242
|
-
inputs:
|
|
243
|
-
SourceFolder: "$(Pipeline.Workspace)/deployment-scripts"
|
|
244
|
-
TargetFolder: "$(System.DefaultWorkingDirectory)/deployment"
|
|
245
|
-
|
|
246
|
-
# Production deployment with enhanced validation
|
|
247
|
-
- bash: |
|
|
248
|
-
# Make scripts executable
|
|
249
|
-
chmod +x deployment/scripts/*.sh
|
|
250
|
-
|
|
251
|
-
# Set up environment variables
|
|
252
|
-
export D365_CLIENT_ID="$(D365_PROD_CLIENT_ID)"
|
|
253
|
-
export D365_CLIENT_SECRET="$(D365_PROD_CLIENT_SECRET)"
|
|
254
|
-
export D365_TENANT_ID="$(D365_PROD_TENANT_ID)"
|
|
255
|
-
export D365_ORG_URL="$(D365_PROD_ORG_URL)"
|
|
256
|
-
|
|
257
|
-
echo "Starting production deployment..."
|
|
258
|
-
|
|
259
|
-
# Run pre-deployment validation
|
|
260
|
-
./deployment/scripts/validate-setup.sh
|
|
261
|
-
|
|
262
|
-
# Create backup before deployment
|
|
263
|
-
./deployment/scripts/backup.sh prod
|
|
264
|
-
|
|
265
|
-
# Deploy with backup enabled
|
|
266
|
-
./deployment/scripts/deploy.sh prod --verbose
|
|
267
|
-
|
|
268
|
-
# Post-deployment health check
|
|
269
|
-
./deployment/scripts/health-check.sh prod
|
|
270
|
-
|
|
271
|
-
echo "Production deployment completed successfully"
|
|
272
|
-
displayName: "Deploy to Production with Validation"
|
|
273
|
-
env:
|
|
274
|
-
D365_PROD_CLIENT_ID: $(D365_PROD_CLIENT_ID)
|
|
275
|
-
D365_PROD_CLIENT_SECRET: $(D365_PROD_CLIENT_SECRET)
|
|
276
|
-
D365_PROD_TENANT_ID: $(D365_PROD_TENANT_ID)
|
|
277
|
-
D365_PROD_ORG_URL: $(D365_PROD_ORG_URL)
|
|
278
|
-
|
|
279
|
-
# Rollback capability
|
|
280
|
-
- bash: |
|
|
281
|
-
echo "##vso[task.setvariable variable=BACKUP_FILE;isOutput=true]$(ls deployment/backups/backup-prod-*.tar.gz | tail -n1)"
|
|
282
|
-
displayName: "Set backup file variable"
|
|
283
|
-
name: backupInfo
|
|
284
|
-
condition: succeededOrFailed()
|
|
285
|
-
|
|
286
|
-
# Cross-Platform Development Support Documentation
|
|
287
|
-
- stage: Documentation
|
|
288
|
-
displayName: "Platform Compatibility Info"
|
|
289
|
-
dependsOn: Build
|
|
290
|
-
condition: always()
|
|
291
|
-
jobs:
|
|
292
|
-
- job: PlatformInfo
|
|
293
|
-
displayName: "Cross-Platform Development Information"
|
|
294
|
-
pool:
|
|
295
|
-
vmImage: "ubuntu-latest"
|
|
296
|
-
steps:
|
|
297
|
-
- script: |
|
|
298
|
-
echo "=== CROSS-PLATFORM DEVELOPMENT TEAM SUPPORT ==="
|
|
299
|
-
echo ""
|
|
300
|
-
echo "This pipeline supports mixed Windows/Mac development teams:"
|
|
301
|
-
echo ""
|
|
302
|
-
echo "🖥️ WINDOWS DEVELOPERS:"
|
|
303
|
-
echo " • Use PowerShell scripts: deployment/scripts/*.ps1"
|
|
304
|
-
echo " • Follow guide: deployment/QUICKSTART-WINDOWS.md"
|
|
305
|
-
echo " • Run: deployment/scripts/team-onboarding.ps1"
|
|
306
|
-
echo ""
|
|
307
|
-
echo "🍎 MAC/LINUX DEVELOPERS:"
|
|
308
|
-
echo " • Use Bash scripts: deployment/scripts/*.sh"
|
|
309
|
-
echo " • Follow guide: deployment/QUICKSTART-MAC.md"
|
|
310
|
-
echo " • Run: deployment/scripts/team-onboarding.sh"
|
|
311
|
-
echo ""
|
|
312
|
-
echo "✅ COMPATIBILITY GUARANTEE:"
|
|
313
|
-
echo " • Same deployment results across all platforms"
|
|
314
|
-
echo " • Shared JSON configuration files"
|
|
315
|
-
echo " • Identical entity generation and builds"
|
|
316
|
-
echo " • Compatible log formats for troubleshooting"
|
|
317
|
-
echo ""
|
|
318
|
-
echo "🔧 PIPELINE STRATEGY:"
|
|
319
|
-
echo " • Build: Linux agent (faster performance)"
|
|
320
|
-
echo " • Dev Deploy: Linux + Bash (developer testing)"
|
|
321
|
-
echo " • Test Deploy: Windows + PowerShell (integration testing)"
|
|
322
|
-
echo " • Prod Deploy: Linux + Bash (production stability)"
|
|
323
|
-
echo ""
|
|
324
|
-
echo "Command Equivalents:"
|
|
325
|
-
echo "Windows: .\\deploy.ps1 -Environment dev"
|
|
326
|
-
echo "Mac: ./deploy.sh dev"
|
|
327
|
-
echo "Result: Identical deployment to D365"
|
|
328
|
-
echo ""
|
|
329
|
-
echo "=== END PLATFORM INFO ==="
|
|
330
|
-
displayName: "Show Platform Compatibility Information"
|