自动检查并准备可用的 Power Platform Pipelines 主机环境,确保流水线操作可顺利执行。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "ensure-pipelines-host" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/power-platform-skills/main/plugins/power-pages/skills/ensure-pipelines-host/SKILL.md 2. 保存为 ~/.claude/skills/ensure-pipelines-host/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为这个 Power Platform 租户确保存在可用的 Pipelines host。按 Power Apps UI 的解析顺序检查现有 host;如果源环境没有绑定 host,则优先创建 Platform Host,并验证其可响应 Pipelines API。
返回主机检查结果,说明复用了哪个 host 或新建了哪个 host,并提供验证状态与可供后续 ALM 使用的检查产物。
我的环境提示没有 pipelines host。请自动检测现有 Platform 或 Custom host;如果都没有,创建新的 Platform Host。若自动创建失败,请给出 PPAC 安装或 New custom host 的手动操作指引。
输出检测结论、自动创建或失败原因、轮询进度,以及必要时的手动安装步骤说明。
请确保源环境具备可用的 pipelines host。若无法使用 Platform Host,则通过 BAP env-create API 按 D365_ProjectHost 模板创建 Custom Host,并在完成后验证 API 可用性。
给出自定义主机的创建与验证结果,包括生命周期轮询状态、最终可用性和后续可复用的主机信息。
<!-- alm-lint-ignore: SKILL-must-read-manifest — this skill manages the Pipelines host environment (deploymentenvironments / deploymentpipelines tables on the host), not the source-env solution. The site's .solution-manifest.json is irrelevant to host lifecycle: a host can be provisioned before any solution exists, and a single host is shared across many solutions. ALM-aware-by-default does not apply. -->Plugin check: Run
node "${CLAUDE_PLUGIN_ROOT}/scripts/check-version.js"— if it outputs a message, show it to the user before proceeding.
Scope: When no host is bound to the source env, this skill detects any existing host (Custom or PE) for reuse, or — in
NoHoststate — offers three provisioning paths: a new Platform Host (recommended; idempotent, ~3–5 min); a new Custom Host (admin-only, ~5–10 min); or PPAC manual provisioning (fallback). Implementation details — endpoint names, template names, BAP audience — live in Phase 4.0 / 4.A / 4.C below; user-facing prose stays focused on outcomes.
Power Platform Pipelines need a host environment — a Dataverse environment with the Power Platform Pipelines managed solution installed, where pipelines, stages, run history, and artifacts live. The existing setup-pipeline and deploy-pipeline skills assume a host is already configured. This skill closes that gap.
This plan is grounded in three primary sources, in priority order:
useGetOrCreatePlatformEnvironment.v4.tspower-platform-ux/packages/powerapps-appdeployment-ux/src/hooks/v4/ProjectHostProvider.tsx (same repo, src/components/ProjectHostProvider/). Defines the exact resolution order the Power Apps UI uses to determine which environment is the project host for a source environment. We mirror that order so this skill agrees with the UI.createcustompipelineshost (Microsoft-internal). Documents the Custom Host fast-path: a D365_ProjectHost org template that ships the Pipelines app pre-installed, callable through the standard environment-creation API.Public Microsoft Learn (learn.microsoft.com/power-platform/alm/{platform-host-pipelines, custom-host-pipelines, set-a-default-pipelines-host}) is the user-facing description of the same flows; we cite it for behaviors users will recognize. HARs in PipelinesDeployScenario.har and Pipelines.har confirm the read-side calls.
| Shape | How it got there | Where it lives | Org template |
|---|---|---|---|
| Platform Host (PE) | Auto-provisioned by getOrCreate BAP call (or as a side-effect of first navigation to the Pipelines page in make.powerapps.com). Hidden from the env picker. One per tenant. | Microsoft-managed Dataverse env in tenant's home geo | D365_1stPartyAdminApps |
| Custom Host | Created by an admin via PPAC Deployments → New custom host, or via the standard env-create API with the D365_ProjectHost template, or by installing the Power Platform Pipelines app on an existing Dataverse env. | A regular Dataverse env in the tenant | D365_ProjectHost (or app-installed-onto-existing-env) |
| No host bound to source env | Tenant has not used Pipelines from this env. | — | — |
The current discover-pipelines-host.js only checks the tenant-level DefaultCustomPipelinesHostEnvForTenant setting. That's one signal of many. This skill implements the full resolution order.
ProjectHostProvider.tsx)This is the load-bearing decision tree. It is what the Power Apps UI does. We replicate it so the skill agrees with the UI.
┌─────────────────────────────────────────────────────────────────────┐
│ 1. GetOrgDbOrgSetting('ProjectHostEnvironmentId') on source env │
…
为 Power Apps 代码应用接入 Azure DevOps 连接器,便于查询工单、提报缺陷与管理流水线。
为 Power Pages 站点配置环境变量与部署设置,支持多环境 ALM 发布。