Skip to content

feat(pipelines): Add Power Platform Pipelines ALM plugin#65

Open
suskumar-MSFT wants to merge 5 commits intomicrosoft:mainfrom
suskumar-MSFT:feat/pipelines-plugin
Open

feat(pipelines): Add Power Platform Pipelines ALM plugin#65
suskumar-MSFT wants to merge 5 commits intomicrosoft:mainfrom
suskumar-MSFT:feat/pipelines-plugin

Conversation

@suskumar-MSFT
Copy link
Copy Markdown

@suskumar-MSFT suskumar-MSFT commented Mar 27, 2026

PR: feat(pipelines): Add Power Platform Pipelines ALM Plugin

Summary

New plugin for AI-assisted creation, configuration, and management of Power Platform deployment pipelines via Dataverse OData APIs. Enables developers and makers to create, configure, and run deployment pipelines through conversational AI (Claude Code / GitHub Copilot CLI).

What's Included

32 files, ~3,400 lines

Plugin Infrastructure: plugin.json, .mcp.json, AGENTS.md, README.md, hooks.json

15 Deterministic Node.js Scripts (scripts/)

Category Scripts
Pipeline CRUD register-environment, create-pipeline, associate-environment, create-stage, list-pipelines, get-pipeline-info
Deployment start-deployment, validate-deployment, deploy-package, check-deployment-status, update-deployment-settings
Operations retry-deployment, cancel-deployment
Infrastructure dataverse-request, verify-dataverse-access, lib/pipeline-helpers

5 Skills (skills/)

Skill Description
/create-pipeline 6-phase workflow: verify -> discover envs -> plan -> create resources -> verify -> summary
/list-pipelines List available pipelines for a source environment
/deploy-solution 8-phase deployment: verify -> discover -> plan -> confirm -> validate -> deploy -> monitor -> summary
/pipeline-status Check deployment run status with polling
/configure-stages Add/modify stages in existing pipelines

1 Agent -- pipeline-architect.md: Read-only advisory agent for pipeline design.

3 Reference Docs -- Entity schemas with all option set values, OData patterns, and troubleshooting guide.

21 Unit Tests -- pipeline-helpers and check-deployment-status test coverage.

Architecture

Follows the same plugin patterns as power-pages, model-apps, and code-apps:

  • LLM = intent/orchestration -- Skills define phased workflows
  • Scripts = deterministic execution -- All Dataverse API calls go through Node.js scripts
  • Auth via Azure CLI (az account get-access-token)

Deployment Flow

The deployment is a multi-phase orchestration matching the maker portal UX:

CreateStageRun -> ValidatePackageAsync -> Configure Settings -> DeployPackageAsync -> Poll Status

Pipeline Entity Model (3 environments)

Host Environment (pipeline config storage)
  |-- DeploymentPipeline
  |     |-- DeploymentEnvironment (source/dev) -- M:N association
  |     +-- DeploymentStage -> DeploymentEnvironment (target)
  |           +-- DeploymentStageRun (deployment execution)
  |                 +-- deploymentsettingsjson (env vars + connection refs)

Testing

  • All 15 scripts pass node --check syntax validation
  • 21 unit tests pass (node --test)
  • 11 scripts live-tested against Aurora Dataverse environment (org9f2d5d3a.crmtest.dynamics.com)
  • Full E2E deployment: Empty solution deployed from host env to target env through complete lifecycle:
    • Register dev environment -> Create pipeline -> Associate source -> Create stage
    • Create stage run -> ValidatePackageAsync -> DeployPackageAsync -> Succeeded
    • All test data cleaned up after verification

Data Model Reference

Option set values sourced from CRM.Client.PowerAppsExtensions entity metadata (11 StageRunStatus values, 3 deployment types, approval statuses, sub-operation tracking).

Known Limitations / Future Work

  1. Deployment settings -- Scripts support env vars + connection refs, but SKILL.md doesn't yet auto-detect what a solution needs
  2. Delegated deployment -- SPN connection sharing not yet implemented (/setup-delegated skill planned)
  3. Approval gates -- Power Automate extension not yet implemented (/add-approval skill planned)
  4. Poller refinement -- Fixed: --waitFor validation stops polling at ValidationSucceeded

Related

  • Pipeline entity metadata: CRM.Client.PowerAppsExtensions/AppDeployment/solutions/AppDeploymentMetadata/
  • Maker portal UX: power-platform-ux/packages/powerapps-appdeployment-ux/src/hooks/
  • Pipelines Overview

New plugin for AI-assisted creation, configuration, and management of
Power Platform deployment pipelines via Dataverse OData APIs.

## Plugin Structure
- 15 Node.js scripts for deterministic Dataverse API operations
- 5 skills: create-pipeline, list-pipelines, deploy-solution,
  pipeline-status, configure-stages
- 1 agent: pipeline-architect (read-only design advisor)
- 3 reference docs: entity schemas, OData patterns, troubleshooting

## Scripts (15)
Pipeline CRUD: register-environment, create-pipeline, associate-environment,
  create-stage, list-pipelines, get-pipeline-info
Deployment: start-deployment, validate-deployment, deploy-package,
  check-deployment-status, update-deployment-settings
Operations: retry-deployment, cancel-deployment
Infrastructure: dataverse-request, verify-dataverse-access, pipeline-helpers

## Key Features
- Full pipeline lifecycle: create environments, pipeline, stages
- Multi-phase deployment: CreateStageRun -> ValidatePackageAsync ->
  configure settings -> DeployPackageAsync -> poll status
- Deployment settings support (env vars + connection references)
- Cross-tenant auth support (--tenant parameter)
- Correct option set values from CRM.Client.PowerAppsExtensions metadata
- 11 status codes for StageRunStatus with proper terminal detection

## Tested
- All 15 scripts pass syntax validation
- 11 scripts live-tested against Aurora Dataverse environment
- Full E2E: empty solution deployed from host env to target env
  (register -> create pipeline -> validate -> deploy -> succeeded)
Copilot AI review requested due to automatic review settings March 27, 2026 08:23
@suskumar-MSFT suskumar-MSFT requested a review from a team as a code owner March 27, 2026 08:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new plugins/pipelines plugin that enables AI-assisted creation and operation of Power Platform Pipelines via deterministic Node.js scripts calling Dataverse Web API, plus supporting skills, references, and an advisory agent.

Changes:

  • Introduces the Pipelines plugin scaffold (manifest, MCP config, hooks, README, conventions).
  • Adds 15 Node.js scripts for pipeline CRUD and deployment lifecycle operations (start/validate/deploy/poll/cancel/retry).
  • Adds 5 user-invocable skills + 1 advisory agent, along with reference docs for entities, OData patterns, and troubleshooting.

Reviewed changes

Copilot reviewed 31 out of 31 changed files in this pull request and generated 23 comments.

Show a summary per file
File Description
plugins/pipelines/.claude-plugin/plugin.json Plugin manifest metadata.
plugins/pipelines/.mcp.json Configures Microsoft Learn MCP server endpoint.
plugins/pipelines/AGENTS.md Documents plugin conventions/workflow for skills and scripts.
plugins/pipelines/README.md User-facing overview, prerequisites, and quick start.
plugins/pipelines/hooks/hooks.json Adds PostToolUse hook (currently a placeholder echo).
plugins/pipelines/agents/pipeline-architect.md Read-only advisory agent for pipeline topology planning.
plugins/pipelines/references/pipeline-entities.md Dataverse entity/option-set reference for pipelines.
plugins/pipelines/references/odata-patterns.md OData call patterns/examples for common operations.
plugins/pipelines/references/troubleshooting.md Common failure modes and remediation guidance.
plugins/pipelines/skills/create-pipeline/SKILL.md Skill workflow to register envs, create pipeline, associate source, create stages.
plugins/pipelines/skills/list-pipelines/SKILL.md Skill workflow to list pipelines for a source environment.
plugins/pipelines/skills/deploy-solution/SKILL.md Skill workflow to run a stage deployment end-to-end with validation + polling.
plugins/pipelines/skills/pipeline-status/SKILL.md Skill workflow to fetch and display stage run status.
plugins/pipelines/skills/configure-stages/SKILL.md Skill workflow to add stages / register new target envs.
plugins/pipelines/scripts/lib/pipeline-helpers.js Shared constants, auth/token helper, HTTP helper, PAC discovery helpers.
plugins/pipelines/scripts/dataverse-request.js Generic Dataverse request tool with retry/backoff.
plugins/pipelines/scripts/verify-dataverse-access.js WhoAmI-based access verification script.
plugins/pipelines/scripts/list-pipelines.js Calls RetrieveDeploymentPipelines and normalizes response.
plugins/pipelines/scripts/get-pipeline-info.js Calls RetrieveDeploymentPipelineInfo for stages + artifact details.
plugins/pipelines/scripts/register-environment.js Registers a deployment environment in host env.
plugins/pipelines/scripts/create-pipeline.js Creates a deployment pipeline record.
plugins/pipelines/scripts/associate-environment.js Associates a source environment to a pipeline (M:N).
plugins/pipelines/scripts/create-stage.js Creates deployment stages bound to target env registrations.
plugins/pipelines/scripts/start-deployment.js Creates a deployment stage run record.
plugins/pipelines/scripts/validate-deployment.js Triggers ValidatePackageAsync.
plugins/pipelines/scripts/update-deployment-settings.js Updates deploymentsettingsjson on a stage run.
plugins/pipelines/scripts/deploy-package.js Triggers DeployPackageAsync (optionally patches notes/versions).
plugins/pipelines/scripts/check-deployment-status.js Fetches/polls stage run status with phase-specific stop conditions.
plugins/pipelines/scripts/cancel-deployment.js Cancels a running stage run by patching iscanceled.
plugins/pipelines/scripts/retry-deployment.js Calls RetryFailedDeploymentAsync for failed runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/pipelines/skills/pipeline-status/SKILL.md
Comment thread plugins/pipelines/AGENTS.md
Comment thread plugins/pipelines/skills/create-pipeline/SKILL.md
Comment thread plugins/pipelines/references/odata-patterns.md
Comment thread plugins/pipelines/skills/list-pipelines/SKILL.md Outdated
Comment thread plugins/pipelines/skills/list-pipelines/SKILL.md Outdated
Comment thread plugins/pipelines/skills/pipeline-status/SKILL.md
Comment thread plugins/pipelines/scripts/register-environment.js
Comment thread plugins/pipelines/skills/create-pipeline/SKILL.md Outdated
Comment thread plugins/pipelines/references/troubleshooting.md Outdated
- Add test suite: 21 tests (pipeline-helpers + check-deployment-status)
- Standardize error handling (consistent 2xx success check across all scripts)
- Add schema validation for deployment settings JSON
- Fix associate-environment @odata.id to use absolute URL
- Add cancellation/retry guidance to deploy-solution skill
- Add idempotency check to create-pipeline skill
- Increase default polling maxWait from 300s to 900s
- Fix wrong Failed status code in troubleshooting.md (200000002 -> 200000003)
- Fix statuscode -> stagerunstatus in odata-patterns.md and pipeline-status SKILL
- Fix SolutionId@odata.bind -> plain solutionid in odata-patterns.md
- Fix register-environment.js: update header comment, add GUID validation,
  remove bad fallback to input environmentId
- Fix create-pipeline SKILL: deploymentEnvironmentId naming, --noAI flag,
  auto-detect envUrl in Phase 1
- Add --tenant support to dataverse-request.js
- Add AskUserQuestion to list-pipelines and pipeline-status allowed-tools
- Fix AGENTS.md convention about dataverse-request.js vs makeRequest
- Fix list-pipelines SKILL summary to match actual script output
- Add Installation and License sections to plugin README
Copilot AI review requested due to automatic review settings March 27, 2026 08:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 33 out of 33 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugins/pipelines/scripts/dataverse-request.js
Comment thread plugins/pipelines/scripts/dataverse-request.js
Comment thread plugins/pipelines/scripts/get-pipeline-info.js
Comment thread plugins/pipelines/scripts/create-pipeline.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants