gocd
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoCD with orbit CLI
使用orbit CLI管理GoCD
Comprehensive GoCD management through the CLI. Covers pipelines, pipeline groups, agents, environments, config repos, server administration, users, roles, authorization, plugins, backups, materials, artifact stores, elastic agent profiles, cluster profiles, stages, jobs, server configuration, templates, packages, package repositories, notification filters, dashboard, access tokens, secret configs, and server version. Works with self-hosted GoCD instances via the REST API, with multi-profile support and 1Password secret resolution.
orbit通过 CLI对GoCD进行全面管理,涵盖流水线、流水线组、Agent、环境、配置仓库、服务器管理、用户、角色、授权、插件、备份、材料、制品仓库、弹性Agent配置文件、集群配置文件、阶段、任务、服务器配置、模板、包、包仓库、通知过滤器、仪表盘、访问令牌、机密配置以及服务器版本。通过REST API对接自托管GoCD实例,支持多配置文件和1Password机密解析。
orbitPrerequisites
前提条件
- binary built and accessible
orbit - A profile with a service configured in
gocd~/.config/orbit/config.yaml - Valid credentials (API token or basic auth) — can be stored in 1Password with prefix
op:// - is required (GoCD is always self-hosted)
base_url
- 已构建二进制文件且可访问
orbit - 在中配置了包含
~/.config/orbit/config.yaml服务的配置文件gocd - 有效凭据(API令牌或基础认证)——可存储在1Password中,前缀为
op:// - 必须提供(GoCD始终为自托管)
base_url
Quick Reference
快速参考
All commands follow the pattern:
orbit -p <profile> gocd <command> [flags]Alias:
orbit -p <profile> cd <command> [flags]All commands support and for structured output. For full command details and all flags, see .
-o json-o yamlreferences/commands.md所有命令遵循以下格式:
orbit -p <profile> gocd <command> [flags]别名:
orbit -p <profile> cd <command> [flags]所有命令支持和以输出结构化数据。完整命令详情及所有参数请参阅。
-o json-o yamlreferences/commands.mdCommand Groups
命令组
| Group | Alias | Description |
|---|---|---|
| Pipeline CRUD, status, history, trigger, pause/unpause, comment, export, compare, lock/unlock | |
| | Pipeline group CRUD |
| Agent list, get, enable, disable, delete, kill-task, update, job-history | |
| | Environment CRUD, patch |
| | Config repo CRUD, status, trigger, definitions, preflight |
| Server health, maintenance mode | |
| | Site URL, artifact config, job timeout, mail server |
| User CRUD, bulk delete, current user | |
| Security role CRUD | |
| | Authorization config CRUD |
| Plugin info, settings CRUD | |
| Backup config CRUD, schedule | |
| Material list, get, usage, trigger-update | |
| Artifact store CRUD | |
| | Elastic agent cluster profile CRUD |
| | Elastic agent profile CRUD, usage |
| Stage cancel, run | |
| Job run | |
| Encrypt values | |
| | Pipeline template CRUD |
| | Package repository CRUD |
| | Package CRUD, usage |
| | Notification filter CRUD |
| Dashboard overview | |
| Server version info | |
| | Access token CRUD (user and admin) |
| | Secret configuration CRUD |
| 组 | 别名 | 描述 |
|---|---|---|
| 流水线的增删改查、状态查看、历史记录、触发、暂停/恢复、评论、导出、对比、锁定/解锁 | |
| | 流水线组的增删改查 |
| Agent的列表、详情查看、启用、禁用、删除、终止任务、更新、任务历史 | |
| | 环境的增删改查、补丁更新 |
| | 配置仓库的增删改查、状态查看、触发、定义查看、预检查 |
| 服务器健康状态、维护模式 | |
| | 站点URL、制品配置、任务超时、邮件服务器 |
| 用户的增删改查、批量删除、当前用户查看 | |
| 安全角色的增删改查 | |
| | 授权配置的增删改查 |
| 插件信息、设置的增删改查 | |
| 备份配置的增删改查、调度 | |
| 材料的列表、详情查看、使用情况、触发更新 | |
| 制品仓库的增删改查 | |
| | 弹性Agent集群配置文件的增删改查 |
| | 弹性Agent配置文件的增删改查、使用情况 |
| 阶段的取消、运行 | |
| 任务的运行 | |
| 加密值 | |
| | 流水线模板的增删改查 |
| | 包仓库的增删改查 |
| | 包的增删改查、使用情况 |
| | 通知过滤器的增删改查 |
| 仪表盘概览 | |
| 服务器版本信息 | |
| | 访问令牌的增删改查(用户及管理员权限) |
| | 机密配置的增删改查 |
Core Workflows
核心工作流
Pipeline CRUD
流水线增删改查
bash
undefinedbash
undefinedList all pipelines by group
List all pipelines by group
orbit -p myprofile gocd pipeline list
orbit -p myprofile gocd pipeline list
Create a pipeline from file
Create a pipeline from file
orbit -p myprofile cd pipeline create --group my-group --from-file pipeline.yaml
orbit -p myprofile cd pipeline create --group my-group --from-file pipeline.yaml
Update a pipeline configuration
Update a pipeline configuration
orbit -p myprofile cd pipeline update my-pipeline --from-file pipeline.yaml
orbit -p myprofile cd pipeline update my-pipeline --from-file pipeline.yaml
Delete a pipeline
Delete a pipeline
orbit -p myprofile cd pipeline delete my-pipeline
orbit -p myprofile cd pipeline delete my-pipeline
Check pipeline status
Check pipeline status
orbit -p myprofile cd pipeline status my-pipeline
orbit -p myprofile cd pipeline status my-pipeline
View pipeline run history
View pipeline run history
orbit -p myprofile gocd pipeline history my-pipeline --limit 5
orbit -p myprofile gocd pipeline history my-pipeline --limit 5
Get a specific pipeline instance
Get a specific pipeline instance
orbit -p myprofile gocd pipeline get my-pipeline --counter 42
orbit -p myprofile gocd pipeline get my-pipeline --counter 42
Trigger a pipeline run
Trigger a pipeline run
orbit -p myprofile cd pipeline trigger my-pipeline
orbit -p myprofile cd pipeline trigger my-pipeline
Pause/unpause a pipeline
Pause/unpause a pipeline
orbit -p myprofile gocd pipeline pause my-pipeline --reason "Maintenance window"
orbit -p myprofile gocd pipeline unpause my-pipeline
orbit -p myprofile gocd pipeline pause my-pipeline --reason "Maintenance window"
orbit -p myprofile gocd pipeline unpause my-pipeline
Comment on a pipeline instance
Comment on a pipeline instance
orbit -p myprofile cd pipeline comment my-pipeline --counter 42 --message "Deployed to staging"
orbit -p myprofile cd pipeline comment my-pipeline --counter 42 --message "Deployed to staging"
Export pipeline configuration
Export pipeline configuration
orbit -p myprofile cd pipeline export my-pipeline --plugin-id yaml.config.plugin
orbit -p myprofile cd pipeline export my-pipeline --plugin-id yaml.config.plugin
Compare two pipeline instances
Compare two pipeline instances
orbit -p myprofile cd pipeline compare my-pipeline --from 1 --to 5
orbit -p myprofile cd pipeline compare my-pipeline --from 1 --to 5
Lock/unlock a pipeline
Lock/unlock a pipeline
orbit -p myprofile gocd pipeline lock my-pipeline
orbit -p myprofile gocd pipeline unlock my-pipeline
undefinedorbit -p myprofile gocd pipeline lock my-pipeline
orbit -p myprofile gocd pipeline unlock my-pipeline
undefinedPipeline Group Management
流水线组管理
bash
undefinedbash
undefinedList pipeline groups
List pipeline groups
orbit -p myprofile gocd pipeline-group list
orbit -p myprofile cd pg list
orbit -p myprofile gocd pipeline-group list
orbit -p myprofile cd pg list
Get pipeline group details
Get pipeline group details
orbit -p myprofile cd pg get my-group
orbit -p myprofile cd pg get my-group
Create/update/delete pipeline groups
Create/update/delete pipeline groups
orbit -p myprofile cd pg create --from-file group.yaml
orbit -p myprofile cd pg update my-group --from-file group.yaml
orbit -p myprofile cd pg delete my-group
undefinedorbit -p myprofile cd pg create --from-file group.yaml
orbit -p myprofile cd pg update my-group --from-file group.yaml
orbit -p myprofile cd pg delete my-group
undefinedAgent Management
Agent管理
bash
undefinedbash
undefinedList all agents
List all agents
orbit -p myprofile gocd agent list
orbit -p myprofile gocd agent list
View agent details
View agent details
orbit -p myprofile cd agent get <uuid>
orbit -p myprofile cd agent get <uuid>
Enable/disable agents
Enable/disable agents
orbit -p myprofile gocd agent enable <uuid>
orbit -p myprofile gocd agent disable <uuid>
orbit -p myprofile gocd agent enable <uuid>
orbit -p myprofile gocd agent disable <uuid>
Update agent configuration
Update agent configuration
orbit -p myprofile cd agent update <uuid> --from-file agent.yaml
orbit -p myprofile cd agent update <uuid> --from-file agent.yaml
View agent job history
View agent job history
orbit -p myprofile cd agent job-history <uuid>
orbit -p myprofile cd agent job-history <uuid>
Kill running tasks on an agent
Kill running tasks on an agent
orbit -p myprofile cd agent kill-task <uuid>
orbit -p myprofile cd agent kill-task <uuid>
Delete an agent
Delete an agent
orbit -p myprofile gocd agent delete <uuid>
undefinedorbit -p myprofile gocd agent delete <uuid>
undefinedEnvironment Management
环境管理
bash
undefinedbash
undefinedList environments
List environments
orbit -p myprofile gocd environment list
orbit -p myprofile gocd environment list
View environment details
View environment details
orbit -p myprofile cd env get production
orbit -p myprofile cd env get production
Create environment with pipelines
Create environment with pipelines
orbit -p myprofile gocd environment create staging --pipeline my-app --pipeline my-api
orbit -p myprofile gocd environment create staging --pipeline my-app --pipeline my-api
Update environment from file
Update environment from file
orbit -p myprofile cd env update staging --from-file env.yaml
orbit -p myprofile cd env update staging --from-file env.yaml
Patch environment (add/remove pipelines and agents)
Patch environment (add/remove pipelines and agents)
orbit -p myprofile cd env patch staging --add-pipeline my-app --remove-pipeline old-app --add-agent agent1
orbit -p myprofile cd env patch staging --add-pipeline my-app --remove-pipeline old-app --add-agent agent1
Delete environment
Delete environment
orbit -p myprofile gocd environment delete staging
undefinedorbit -p myprofile gocd environment delete staging
undefinedConfig Repo Operations
配置仓库操作
bash
undefinedbash
undefinedList config repos
List config repos
orbit -p myprofile gocd cr list
orbit -p myprofile gocd cr list
Get config repo details
Get config repo details
orbit -p myprofile cd cr get my-repo
orbit -p myprofile cd cr get my-repo
Create/update/delete config repos
Create/update/delete config repos
orbit -p myprofile cd cr create --from-file repo.yaml
orbit -p myprofile cd cr update my-repo --from-file repo.yaml
orbit -p myprofile cd cr delete my-repo
orbit -p myprofile cd cr create --from-file repo.yaml
orbit -p myprofile cd cr update my-repo --from-file repo.yaml
orbit -p myprofile cd cr delete my-repo
Check sync status
Check sync status
orbit -p myprofile cd cr status my-repo
orbit -p myprofile cd cr status my-repo
Trigger config repo update
Trigger config repo update
orbit -p myprofile cd cr trigger my-repo
orbit -p myprofile cd cr trigger my-repo
View definitions from a config repo
View definitions from a config repo
orbit -p myprofile cd cr definitions my-repo
orbit -p myprofile cd cr definitions my-repo
Run preflight check
Run preflight check
orbit -p myprofile cd cr preflight --plugin-id yaml.config.plugin --from-file pipeline.yaml
undefinedorbit -p myprofile cd cr preflight --plugin-id yaml.config.plugin --from-file pipeline.yaml
undefinedUser Management
用户管理
bash
undefinedbash
undefinedList users
List users
orbit -p myprofile gocd user list
orbit -p myprofile gocd user list
Get user details
Get user details
orbit -p myprofile cd user get admin
orbit -p myprofile cd user get admin
Create/update/delete users
Create/update/delete users
orbit -p myprofile cd user create --from-file user.yaml
orbit -p myprofile cd user update admin --from-file user.yaml
orbit -p myprofile cd user delete admin
orbit -p myprofile cd user create --from-file user.yaml
orbit -p myprofile cd user update admin --from-file user.yaml
orbit -p myprofile cd user delete admin
Bulk delete users
Bulk delete users
orbit -p myprofile cd user delete-bulk --user user1 --user user2
orbit -p myprofile cd user delete-bulk --user user1 --user user2
View current authenticated user
View current authenticated user
orbit -p myprofile cd user current
orbit -p myprofile cd user current
Update current user
Update current user
orbit -p myprofile cd user update-current --from-file user.yaml
undefinedorbit -p myprofile cd user update-current --from-file user.yaml
undefinedSecurity: Roles & Authorization
安全:角色与授权
bash
undefinedbash
undefinedList roles
List roles
orbit -p myprofile gocd role list
orbit -p myprofile gocd role list
CRUD roles
CRUD roles
orbit -p myprofile cd role get my-role
orbit -p myprofile cd role create --from-file role.yaml
orbit -p myprofile cd role update my-role --from-file role.yaml
orbit -p myprofile cd role delete my-role
orbit -p myprofile cd role get my-role
orbit -p myprofile cd role create --from-file role.yaml
orbit -p myprofile cd role update my-role --from-file role.yaml
orbit -p myprofile cd role delete my-role
List authorization configs
List authorization configs
orbit -p myprofile cd auth-config list
orbit -p myprofile cd auth-config list
CRUD authorization configs
CRUD authorization configs
orbit -p myprofile cd auth-config get my-auth
orbit -p myprofile cd auth-config create --from-file auth.yaml
orbit -p myprofile cd auth-config update my-auth --from-file auth.yaml
orbit -p myprofile cd auth-config delete my-auth
undefinedorbit -p myprofile cd auth-config get my-auth
orbit -p myprofile cd auth-config create --from-file auth.yaml
orbit -p myprofile cd auth-config update my-auth --from-file auth.yaml
orbit -p myprofile cd auth-config delete my-auth
undefinedPlugin Management
插件管理
bash
undefinedbash
undefinedList plugins
List plugins
orbit -p myprofile gocd plugin list
orbit -p myprofile gocd plugin list
Get plugin info
Get plugin info
orbit -p myprofile cd plugin get my-plugin-id
orbit -p myprofile cd plugin get my-plugin-id
Plugin settings CRUD
Plugin settings CRUD
orbit -p myprofile cd plugin get-settings my-plugin-id
orbit -p myprofile cd plugin create-settings --from-file settings.yaml
orbit -p myprofile cd plugin update-settings my-plugin-id --from-file settings.yaml
undefinedorbit -p myprofile cd plugin get-settings my-plugin-id
orbit -p myprofile cd plugin create-settings --from-file settings.yaml
orbit -p myprofile cd plugin update-settings my-plugin-id --from-file settings.yaml
undefinedBackup Management
备份管理
bash
undefinedbash
undefinedView backup configuration
View backup configuration
orbit -p myprofile gocd backup get-config
orbit -p myprofile gocd backup get-config
Create/delete backup config
Create/delete backup config
orbit -p myprofile cd backup create-config --from-file backup.yaml
orbit -p myprofile cd backup delete-config
orbit -p myprofile cd backup create-config --from-file backup.yaml
orbit -p myprofile cd backup delete-config
Schedule a backup
Schedule a backup
orbit -p myprofile cd backup schedule
undefinedorbit -p myprofile cd backup schedule
undefinedMaterial Operations
材料操作
bash
undefinedbash
undefinedList materials
List materials
orbit -p myprofile gocd material list
orbit -p myprofile gocd material list
Get material details
Get material details
orbit -p myprofile cd material get <fingerprint>
orbit -p myprofile cd material get <fingerprint>
View material usage (which pipelines use it)
View material usage (which pipelines use it)
orbit -p myprofile cd material usage <fingerprint>
orbit -p myprofile cd material usage <fingerprint>
Trigger material update check
Trigger material update check
orbit -p myprofile cd material trigger-update <fingerprint>
undefinedorbit -p myprofile cd material trigger-update <fingerprint>
undefinedArtifact Store Management
制品仓库管理
bash
undefinedbash
undefinedList artifact stores
List artifact stores
orbit -p myprofile gocd artifact list-store
orbit -p myprofile gocd artifact list-store
CRUD artifact stores
CRUD artifact stores
orbit -p myprofile cd artifact get-store my-store
orbit -p myprofile cd artifact create-store --from-file store.yaml
orbit -p myprofile cd artifact update-store my-store --from-file store.yaml
orbit -p myprofile cd artifact delete-store my-store
undefinedorbit -p myprofile cd artifact get-store my-store
orbit -p myprofile cd artifact create-store --from-file store.yaml
orbit -p myprofile cd artifact update-store my-store --from-file store.yaml
orbit -p myprofile cd artifact delete-store my-store
undefinedElastic Agent Infrastructure
弹性Agent基础设施
bash
undefinedbash
undefinedCluster profiles
Cluster profiles
orbit -p myprofile cd cp list
orbit -p myprofile cd cp get my-cluster
orbit -p myprofile cd cp create --from-file cluster.yaml
orbit -p myprofile cd cp update my-cluster --from-file cluster.yaml
orbit -p myprofile cd cp delete my-cluster
orbit -p myprofile cd cp list
orbit -p myprofile cd cp get my-cluster
orbit -p myprofile cd cp create --from-file cluster.yaml
orbit -p myprofile cd cp update my-cluster --from-file cluster.yaml
orbit -p myprofile cd cp delete my-cluster
Elastic agent profiles
Elastic agent profiles
orbit -p myprofile cd eap list
orbit -p myprofile cd eap get my-profile
orbit -p myprofile cd eap create --from-file profile.yaml
orbit -p myprofile cd eap update my-profile --from-file profile.yaml
orbit -p myprofile cd eap delete my-profile
orbit -p myprofile cd eap usage my-profile
undefinedorbit -p myprofile cd eap list
orbit -p myprofile cd eap get my-profile
orbit -p myprofile cd eap create --from-file profile.yaml
orbit -p myprofile cd eap update my-profile --from-file profile.yaml
orbit -p myprofile cd eap delete my-profile
orbit -p myprofile cd eap usage my-profile
undefinedStage & Job Operations
阶段与任务操作
bash
undefinedbash
undefinedCancel a running stage
Cancel a running stage
orbit -p myprofile cd stage cancel --pipeline my-pipeline --counter 5 --stage build --stage-counter 1
orbit -p myprofile cd stage cancel --pipeline my-pipeline --counter 5 --stage build --stage-counter 1
Run/re-run a stage
Run/re-run a stage
orbit -p myprofile cd stage run --pipeline my-pipeline --counter 5 --stage build
orbit -p myprofile cd stage run --pipeline my-pipeline --counter 5 --stage build
Run specific jobs in a stage
Run specific jobs in a stage
orbit -p myprofile cd job run --pipeline my-pipeline --stage build --pipeline-counter 5 --stage-counter 1 --job unit-test --job integration-test
undefinedorbit -p myprofile cd job run --pipeline my-pipeline --stage build --pipeline-counter 5 --stage-counter 1 --job unit-test --job integration-test
undefinedServer Administration
服务器管理
bash
undefinedbash
undefinedServer health
Server health
orbit -p myprofile gocd server health
orbit -p myprofile gocd server health
Maintenance mode
Maintenance mode
orbit -p myprofile cd server maintenance
orbit -p myprofile cd server maintenance-on
orbit -p myprofile cd server maintenance-off
orbit -p myprofile cd server maintenance
orbit -p myprofile cd server maintenance-on
orbit -p myprofile cd server maintenance-off
Site URLs
Site URLs
orbit -p myprofile cd sc site-url get
orbit -p myprofile cd sc site-url update --url https://gocd.example.com --secure-url https://gocd.example.com
orbit -p myprofile cd sc site-url get
orbit -p myprofile cd sc site-url update --url https://gocd.example.com --secure-url https://gocd.example.com
Artifact config
Artifact config
orbit -p myprofile cd sc artifact-config get
orbit -p myprofile cd sc artifact-config update --from-file artifact.yaml
orbit -p myprofile cd sc artifact-config get
orbit -p myprofile cd sc artifact-config update --from-file artifact.yaml
Job timeout
Job timeout
orbit -p myprofile cd sc job-timeout get
orbit -p myprofile cd sc job-timeout update --timeout 30
orbit -p myprofile cd sc job-timeout get
orbit -p myprofile cd sc job-timeout update --timeout 30
Mail server
Mail server
orbit -p myprofile cd sc mail-server get
orbit -p myprofile cd sc mail-server update --from-file mail.yaml
orbit -p myprofile cd sc mail-server delete
orbit -p myprofile cd sc mail-server get
orbit -p myprofile cd sc mail-server update --from-file mail.yaml
orbit -p myprofile cd sc mail-server delete
Encryption
Encryption
orbit -p myprofile gocd encrypt my-secret-password
undefinedorbit -p myprofile gocd encrypt my-secret-password
undefinedPipeline Template Management
流水线模板管理
bash
undefinedbash
undefinedList templates
List templates
orbit -p myprofile gocd template list
orbit -p myprofile cd tmpl list
orbit -p myprofile gocd template list
orbit -p myprofile cd tmpl list
Get template details
Get template details
orbit -p myprofile cd tmpl get my-template
orbit -p myprofile cd tmpl get my-template
Create/update/delete templates
Create/update/delete templates
orbit -p myprofile cd tmpl create --from-file template.yaml
orbit -p myprofile cd tmpl update my-template --from-file template.yaml
orbit -p myprofile cd tmpl delete my-template
undefinedorbit -p myprofile cd tmpl create --from-file template.yaml
orbit -p myprofile cd tmpl update my-template --from-file template.yaml
orbit -p myprofile cd tmpl delete my-template
undefinedPackage Repository & Package Management
包仓库与包管理
bash
undefinedbash
undefinedList package repositories
List package repositories
orbit -p myprofile gocd package-repo list
orbit -p myprofile cd pkg-repo list
orbit -p myprofile gocd package-repo list
orbit -p myprofile cd pkg-repo list
CRUD package repositories
CRUD package repositories
orbit -p myprofile cd pkg-repo get repo-id
orbit -p myprofile cd pkg-repo create --from-file repo.yaml
orbit -p myprofile cd pkg-repo update repo-id --from-file repo.yaml
orbit -p myprofile cd pkg-repo delete repo-id
orbit -p myprofile cd pkg-repo get repo-id
orbit -p myprofile cd pkg-repo create --from-file repo.yaml
orbit -p myprofile cd pkg-repo update repo-id --from-file repo.yaml
orbit -p myprofile cd pkg-repo delete repo-id
List packages
List packages
orbit -p myprofile gocd package list
orbit -p myprofile cd pkg list
orbit -p myprofile gocd package list
orbit -p myprofile cd pkg list
CRUD packages
CRUD packages
orbit -p myprofile cd pkg get pkg-id
orbit -p myprofile cd pkg create --from-file package.yaml
orbit -p myprofile cd pkg update pkg-id --from-file package.yaml
orbit -p myprofile cd pkg delete pkg-id
orbit -p myprofile cd pkg get pkg-id
orbit -p myprofile cd pkg create --from-file package.yaml
orbit -p myprofile cd pkg update pkg-id --from-file package.yaml
orbit -p myprofile cd pkg delete pkg-id
View package usage (which pipelines use it)
View package usage (which pipelines use it)
orbit -p myprofile cd pkg usage pkg-id
undefinedorbit -p myprofile cd pkg usage pkg-id
undefinedNotification Filter Management
通知过滤器管理
bash
undefinedbash
undefinedList notification filters
List notification filters
orbit -p myprofile gocd notification-filter list
orbit -p myprofile cd nf list
orbit -p myprofile gocd notification-filter list
orbit -p myprofile cd nf list
Get/create/delete notification filters
Get/create/delete notification filters
orbit -p myprofile cd nf get 1
orbit -p myprofile cd nf create --from-file filter.yaml
orbit -p myprofile cd nf delete 1
undefinedorbit -p myprofile cd nf get 1
orbit -p myprofile cd nf create --from-file filter.yaml
orbit -p myprofile cd nf delete 1
undefinedDashboard & Version
仪表盘与版本
bash
undefinedbash
undefinedView dashboard overview
View dashboard overview
orbit -p myprofile gocd dashboard
orbit -p myprofile gocd dashboard
Check server version
Check server version
orbit -p myprofile gocd version
undefinedorbit -p myprofile gocd version
undefinedAccess Token Management
访问令牌管理
bash
undefinedbash
undefinedList your access tokens
List your access tokens
orbit -p myprofile gocd access-token list
orbit -p myprofile cd token list
orbit -p myprofile gocd access-token list
orbit -p myprofile cd token list
Create a new token
Create a new token
orbit -p myprofile cd token create --description "CI token"
orbit -p myprofile cd token create --description "CI token"
Revoke a token
Revoke a token
orbit -p myprofile cd token revoke 42 --cause "No longer needed"
orbit -p myprofile cd token revoke 42 --cause "No longer needed"
Admin: list all tokens across users
Admin: list all tokens across users
orbit -p myprofile cd token list-all
orbit -p myprofile cd token list-all
Admin: revoke any user's token
Admin: revoke any user's token
orbit -p myprofile cd token revoke-admin 42 --cause "Security review"
undefinedorbit -p myprofile cd token revoke-admin 42 --cause "Security review"
undefinedSecret Configuration Management
机密配置管理
bash
undefinedbash
undefinedList secret configurations
List secret configurations
orbit -p myprofile gocd secret-config list
orbit -p myprofile cd secret list
orbit -p myprofile gocd secret-config list
orbit -p myprofile cd secret list
CRUD secret configurations
CRUD secret configurations
orbit -p myprofile cd secret get my-secret
orbit -p myprofile cd secret create --from-file secret.yaml
orbit -p myprofile cd secret update my-secret --from-file secret.yaml
orbit -p myprofile cd secret delete my-secret
undefinedorbit -p myprofile cd secret get my-secret
orbit -p myprofile cd secret create --from-file secret.yaml
orbit -p myprofile cd secret update my-secret --from-file secret.yaml
orbit -p myprofile cd secret delete my-secret
undefinedCommon Patterns
通用模式
Create/Update Resources from File
从文件创建/更新资源
Most CRUD commands accept for YAML or JSON input:
--from-filebash
orbit -p myprofile cd pipeline create --group my-group --from-file pipeline.yaml
orbit -p myprofile cd cr create --from-file config-repo.json
orbit -p myprofile cd role create --from-file role.yaml大多数增删改查命令接受参数,支持YAML或JSON输入:
--from-filebash
orbit -p myprofile cd pipeline create --group my-group --from-file pipeline.yaml
orbit -p myprofile cd cr create --from-file config-repo.json
orbit -p myprofile cd role create --from-file role.yamlETag-Based Updates
基于ETag的更新
For resources that require optimistic locking (pipelines, pipeline groups, environments, config repos, roles, auth configs, plugins, cluster profiles, elastic agent profiles, artifact stores), the CLI handles ETag retrieval automatically — just provide the with updated config.
--from-file对于需要乐观锁的资源(流水线、流水线组、环境、配置仓库、角色、授权配置、插件、集群配置文件、弹性Agent配置文件、制品仓库),CLI会自动处理ETag获取——只需提供包含更新配置的参数即可。
--from-fileDebug a Failing Config Repo
调试失败的配置仓库
bash
orbit -p myprofile cd cr status my-config-repo
orbit -p myprofile cd cr definitions my-config-repo
orbit -p myprofile cd cr trigger my-config-repobash
orbit -p myprofile cd cr status my-config-repo
orbit -p myprofile cd cr definitions my-config-repo
orbit -p myprofile cd cr trigger my-config-repoPrepare for Maintenance
Prepare for Maintenance
bash
orbit -p myprofile cd agent list
orbit -p myprofile cd server maintenance-onbash
orbit -p myprofile cd agent list
orbit -p myprofile cd server maintenance-on... perform maintenance ...
... perform maintenance ...
orbit -p myprofile cd server maintenance-off
undefinedorbit -p myprofile cd server maintenance-off
undefinedImportant Notes
重要说明
- GoCD API uses versioned Accept headers — handled automatically by the CLI.
- Update operations use ETag-based optimistic locking — the CLI handles this transparently.
- The flag is only needed when a profile has multiple GoCD services configured.
--service - is required in service configuration (GoCD is always self-hosted).
base_url - All destructive operations execute immediately without confirmation prompts.
- Output formats: (default),
table,json.yaml
- GoCD API使用版本化的Accept请求头——CLI会自动处理。
- 更新操作使用基于ETag的乐观锁——CLI会透明处理此过程。
- 当配置文件中配置了多个GoCD服务时,才需要使用参数。
--service - 服务配置中必须包含(GoCD始终为自托管)。
base_url - 所有破坏性操作会立即执行,无确认提示。
- 输出格式:(默认)、
table、json。yaml