Pipeline Integration
Azure DevOps Pipeline
# azure-pipelines.yml
trigger:
branches:
include:
- main
- develop
pool:
vmImage: 'ubuntu-latest'
variables:
- group: 'Flowon-Credentials'
stages:
- stage: Build
jobs:
- job: Export
steps:
- task: UseDotNet@2
inputs:
version: '10.0.x'
- script: dotnet tool install --global FlowOn.Xrm.Tools.CommandLine
displayName: 'Install Logic Fabric CLI'
- script: |
flowon-dynamics export \
--connectionstring "$(DevConnectionString)" \
--project-name "$(ProjectName)" \
--output-directory "$(Build.ArtifactStagingDirectory)" \
--solution-managed \
--solution-unmanaged \
--data-spec-file-path "./specs/data-spec.xml"
displayName: 'Export Artifacts'
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'flowon-artifacts'
- stage: DeployUAT
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
jobs:
- deployment: DeployToUAT
environment: 'UAT'
strategy:
runOnce:
deploy:
steps:
- task: UseDotNet@2
inputs:
version: '10.0.x'
- script: dotnet tool install --global FlowOn.Xrm.Tools.CommandLine
displayName: 'Install Logic Fabric CLI'
- script: |
flowon-dynamics import \
--connectionstring "$(UATConnectionString)" \
--solution-file-path "$(Pipeline.Workspace)/flowon-artifacts/$(SolutionName)_managed.zip" \
--package-file-path "$(Pipeline.Workspace)/flowon-artifacts/$(ProjectName).flop" \
--map-file-path "./mappings/uat/configuration.datamap.xml" \
"./mappings/uat/entity.datamap.xml" \
--data-file-path "$(Pipeline.Workspace)/flowon-artifacts/data/crm_documenttype.xml"
displayName: 'Deploy to UAT'
- stage: DeployProduction
dependsOn: Build
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
jobs:
- deployment: DeployToProduction
environment: 'Production'
strategy:
runOnce:
deploy:
steps:
- task: UseDotNet@2
inputs:
version: '10.0.x'
- script: dotnet tool install --global FlowOn.Xrm.Tools.CommandLine
displayName: 'Install Logic Fabric CLI'
- script: |
flowon-dynamics disable-plugins \
--connectionstring "$(ProdConnectionString)"
displayName: 'Disable Plugins'
- script: |
flowon-dynamics import \
--connectionstring "$(ProdConnectionString)" \
--solution-file-path "$(Pipeline.Workspace)/flowon-artifacts/$(SolutionName)_managed.zip" \
--package-file-path "$(Pipeline.Workspace)/flowon-artifacts/$(ProjectName).flop" \
--map-file-path "./mappings/production/configuration.datamap.xml" \
"./mappings/production/entity.datamap.xml" \
--data-file-path "$(Pipeline.Workspace)/flowon-artifacts/data/crm_documenttype.xml"
displayName: 'Deploy to Production'
- script: |
flowon-dynamics enable-plugins \
--connectionstring "$(ProdConnectionString)"
displayName: 'Enable Plugins'
GitHub Actions
# .github/workflows/deploy.yml
name: Logic Fabric CLI
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install Logic Fabric CLI
run: dotnet tool install --global FlowOn.Xrm.Tools.CommandLine
- name: Export Artifacts
run: |
flowon-dynamics export \
--connectionstring "${{ secrets.DEV_CONNECTION_STRING }}" \
--project-name "${{ vars.PROJECT_NAME }}" \
--output-directory "./artifacts" \
--solution-managed \
--data-spec-file-path "./specs/data-spec.xml"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: flowon-artifacts
path: ./artifacts
deploy-uat:
needs: build
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
environment: UAT
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: flowon-artifacts
path: ./artifacts
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install Logic Fabric CLI
run: dotnet tool install --global FlowOn.Xrm.Tools.CommandLine
- name: Deploy to UAT
run: |
flowon-dynamics import \
--connectionstring "${{ secrets.UAT_CONNECTION_STRING }}" \
--solution-file-path "./artifacts/${{ vars.SOLUTION_NAME }}_managed.zip" \
--package-file-path "./artifacts/${{ vars.PROJECT_NAME }}.flop" \
--map-file-path "./mappings/uat/configuration.datamap.xml" \
"./mappings/uat/entity.datamap.xml"
deploy-production:
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: Production
steps:
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: flowon-artifacts
path: ./artifacts
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install Logic Fabric CLI
run: dotnet tool install --global FlowOn.Xrm.Tools.CommandLine
- name: Deploy to Production
run: |
flowon-dynamics import \
--connectionstring "${{ secrets.PROD_CONNECTION_STRING }}" \
--solution-file-path "./artifacts/${{ vars.SOLUTION_NAME }}_managed.zip" \
--package-file-path "./artifacts/${{ vars.PROJECT_NAME }}.flop" \
--map-file-path "./mappings/production/configuration.datamap.xml" \
"./mappings/production/entity.datamap.xml"
Pipeline Variables and Secrets
Azure DevOps Variable Groups
Create a variable group named Flowon-Credentials with:
| Variable | Description | Secret |
|---|---|---|
DevConnectionString | Dev environment connection string | Yes |
UATConnectionString | UAT environment connection string | Yes |
ProdConnectionString | Production environment connection string | Yes |
SolutionName | Dataverse solution name | No |
ProjectName | Logic Fabric project name | No |
GitHub Secrets
Configure these secrets in your repository settings:
| Secret | Description |
|---|---|
DEV_CONNECTION_STRING | Dev environment connection string |
UAT_CONNECTION_STRING | UAT environment connection string |
PROD_CONNECTION_STRING | Production environment connection string |
Configure these variables:
| Variable | Description |
|---|---|
SOLUTION_NAME | Dataverse solution name |
PROJECT_NAME | Logic Fabric project name |
Environment Protection
Azure DevOps Environments
Configure environment approvals in Azure DevOps:
- Go to Pipelines > Environments
- Create environments:
UAT,Production - Add approval checks for Production
GitHub Environments
Configure environment protection in GitHub:
- Go to Settings > Environments
- Create environments:
UAT,Production - Add required reviewers for Production
- Configure deployment branches