Through the Alibaba Cloud CLI plugin aliyun-cli-devops call the Yunxiao OpenAPI. Do not use aliyun configure / AK/SK; the data plane uses only a personal access token (PAT).
Instructions
-
Only detect, do not preinstall:
aliyun version aliyun devops version- Pass: CLI ≥ 3.3.0 and the plugin returns a version → do not reinstall, continue to step 2.
- Fail:
aliyundoes not exist, version is lower than 3.3.0, ordevopsis unavailable → read and execute references/install.md(install the CLI, install the plugin, then guide the user to get the PAT / orgId and fill them in).
-
Check credentials(only check whether they exist, never print the token):
- PowerShell:
[bool]$env:ALIBABA_CLOUD_YUNXIAO_ACCESS_TOKEN, andORGANIZATION_IDorAPI_BASE_URL - bash:
[ -n "$ALIBABA_CLOUD_YUNXIAO_ACCESS_TOKEN" ]
- PowerShell:
-
Not configured: read references/install.md 's "Get and fill in credentials", guide the user to get the PAT and organization-id (or the Region version api-base-url) from the console,wait for the user to fill them in, then write them to the environment variables. Do not reinstall the CLI. Do not echo the token in the reply.
-
Unsure about the command/parameters:
aliyun devops --helporaliyun devops <command> --help, do not guess. -
Call:
aliyun devops <command> [flags]. Prefer environment variables; use--cli-queryto narrow the output.
Organization type
| Central version | Region version | |
|---|---|---|
| Endpoint | Built-in openapi-rdc.aliyuncs.com, do not set api-base-url |
Console instance access domain → ALIBABA_CLOUD_YUNXIAO_API_BASE_URL |
| Organization ID | Must ALIBABA_CLOUD_YUNXIAO_ORGANIZATION_ID |
Do not set |
PAT: Yunxiao Workbench → Avatar → Personal Settings → Personal Access Token. It is shown only once at creation. Least privilege, set an expiration time.
Environment variables
Central version:ALIBABA_CLOUD_YUNXIAO_ACCESS_TOKEN + ALIBABA_CLOUD_YUNXIAO_ORGANIZATION_ID
Region version:ALIBABA_CLOUD_YUNXIAO_ACCESS_TOKEN + ALIBABA_CLOUD_YUNXIAO_API_BASE_URL
It is forbidden to write the token into the command line, replies, logs, or commits. When checking, only report 已设置 / 未设置。
Module prefix
app-stack-* AppStack · base-* organization member · codeup-* Codeup · flow-* Flow · insight-* Insight · packages-* Packages · projex-* Projex · test-hub-* TestHub
Examples
List repositories:
aliyun devops codeup-list-repositories --page 1 --per-page 20
Search projects:
aliyun devops projex-search-projects --page 1 --per-page 10
For more input/output see examples.md。
Additional resources
- Installation and first-time credential entry:references/install.md
- Commands and troubleshooting:references/reference.md
- Usage examples:examples.md