# CircleCI

**CircleCI** 是一个持续集成与持续交付（CI/CD）平台，以云服务和自托管服务器软件两种形式提供，可在代码推送到版本控制系统时自动构建、测试和部署软件。公司于2011年在旧金山成立，员工分布于全球各地；吉姆·罗斯（Jim Rose）任首席执行官，罗布·祖伯（Rob Zuber）任首席技术官。<sup>[1](https://circleci.com/about/)</sup> 公司列出的客户包括Adobe、Okta和[Hugging Face](https://www.edgepedia.org/zh/hugging-face)。<sup>[1](https://circleci.com/about/)</sup>

| 关键事实 | 详情 |
|---|---|
| 成立 | 2011年，旧金山；员工分布于全球各地<sup>[1](https://circleci.com/about/)</sup> |
| 配置 | 通过`.circleci/config.yml`路径下的YAML文件定义作业、工作流和执行器<sup>[2](https://circleci.com/docs//reference/concepts/)</sup> |
| 执行器 | Docker、machine（完整Ubuntu虚拟机）、macOS（可指定Xcode版本）和Windows<sup>[2](https://circleci.com/docs//reference/concepts/)</sup> |
| 版本控制 | GitHub（App、OAuth、Enterprise）、GitLab（云端与自托管）、Bitbucket Cloud和Cursor Origin（测试版）<sup>[3](https://circleci.com/docs/guides/integration/version-control-system-integration-overview/)</sup> |
| 定价模式 | 基于额度的用量套餐；免费版每月包含最多30,000额度及5名活跃用户，Performance版起价每月15美元<sup>[4](https://circleci.com/pricing/)</sup> |
| 融资 | 2021年5月完成1亿美元F轮融资；同年收购发布管理公司Vamp<sup>[5](https://circleci.com/blog/series-f/)</sup> |
| 2023年安全事件 | 一名工程师笔记本电脑上的恶意软件窃取了受双因素认证保护的SSO会话；客户环境变量、令牌和密钥于2022年12月22日被窃取<sup>[6](https://circleci.com/blog/jan-4-2023-incident-report/?trk=article-ssr-frontend-pulse_little-text-block)</sup> |

## 平台工作原理

项目的流水线在`.circleci/config.yml`路径下的YAML文件中定义，该文件可以手工编写，也可以在网页控制台中生成，并附带语法检查和模式验证。<sup>[2](https://circleci.com/docs//reference/concepts/)</sup><sup> • </sup><sup>[7](https://circleci.com/landing-pages/assets/machine-learning-circleci.pdf)</sup> 作业是配置的基本构建单元：每个作业是一组步骤的集合，且必须声明执行器，可选`docker`、`machine`、`windows`或`macos`。<sup>[2](https://circleci.com/docs//reference/concepts/)</sup>

**执行环境。** Docker执行器从Docker镜像启动容器，配置文件中列出的第一个镜像定义运行命令的主容器；其余镜像作为辅助容器或服务容器运行，与主容器共享网络。machine执行器启动完整的Ubuntu虚拟机，提供对操作系统资源的完全访问权限。CircleCI在[Docker Hub](https://www.edgepedia.org/zh/docker-hub)上为流行语言维护便捷镜像。<sup>[2](https://circleci.com/docs//reference/concepts/)</sup> 每个作业还可设置`resource_class`，决定分配给其容器的CPU和内存，该类可通过流水线表达式选择，例如主分支使用较大的类，其他分支使用较小的类。<sup>[8](https://circleci.com/docs/reference/configuration-reference/)</sup>

**工作流与编排。** 工作流由可顺序或并行运行的作业组成。作业默认并行运行，因此必须通过`requires`选项显式声明依赖关系，分支过滤器可将工作流限制在特定分支（如主分支）上。<sup>[7](https://circleci.com/landing-pages/assets/machine-learning-circleci.pdf)</sup><sup> • </sup><sup>[8](https://circleci.com/docs/reference/configuration-reference/)</sup> `serial-group`设置可将某个作业（如部署）限制为在整个组织的流水线中同时最多运行一个实例，同时测试和构建作业并行推进。<sup>[8](https://circleci.com/docs/reference/configuration-reference/)</sup>

**密钥与复用。** 上下文（Context）提供了一种跨项目安全共享环境变量的机制：管理员创建上下文并添加名称/值对，工作流通过配置文件中的`context`键获取访问权限。<sup>[2](https://circleci.com/docs//reference/concepts/)</sup> 可复用执行器定义让单一执行环境在多个作业间共享，第三方工具则通过认证orb和合作伙伴orb集成。<sup>[8](https://circleci.com/docs/reference/configuration-reference/)</sup><sup> • </sup><sup>[9](https://circleci.com/docs/)</sup>

## 托管选项与运行器

CircleCI可在自有云、自托管运行器上运行作业，也可通过CircleCI Server在客户自有基础设施上运行，后者将代码和数据保留在私有网络内，代价是需要搭建和维护专用服务器。<sup>[1](https://circleci.com/about/)</sup><sup> • </sup><sup>[10](https://circleci.com/landing-pages/assets/HybridCloud-ebook.pdf)</sup>

自托管执行有两种形式。容器运行器安装在[Kubernetes](https://www.edgepedia.org/zh/kubernetes)集群中，在临时Pod中调度作业，可同时运行数百个作业；它既可使用CircleCI的便捷镜像，也可使用自定义Docker镜像。机器运行器安装在虚拟或物理机上，在同一环境中执行每个作业，适用于作业未容器化的情况。<sup>[11](https://circleci.com/docs/guides/execution-runner/runner-overview/)</sup> 支持的平台包括：两种运行器均支持Ubuntu 18.04或更高版本；容器运行器支持Kubernetes；机器运行器支持Intel和Apple芯片上的macOS 11.2及更高版本、[Windows Server 2019](https://www.edgepedia.org/zh/windows-server-2019)及更高版本，以及RHEL8、SUSE等Linux发行版，覆盖ARM64、s390x和ppc64le等多种架构。<sup>[11](https://circleci.com/docs/guides/execution-runner/runner-overview/)</sup> 运行器执行本身不消耗额度，但账户中至少需有一个额度，以备作业使用存储或网络资源。<sup>[11](https://circleci.com/docs/guides/execution-runner/runner-overview/)</sup>

## 定价模式

CircleCI以额度计费，额度需预先购买，并实时消耗，用于支付月度活跃用户、计算时间、附加功能以及超出套餐阈值的网络和存储用量。<sup>[4](https://circleci.com/pricing/)</sup> 额度按秒消耗，费率因机器类型和资源类而异，机器越大每分钟费用越高；`large`资源类拥有4个CPU和8 GB内存，`small`类为1个CPU和2 GB。<sup>[12](https://circleci.com/docs/guides/plans-pricing/plan-overview/)</sup>

免费版包含最多30,000额度（在小型Docker资源类上约合6,000构建分钟）、每月5名活跃用户和30倍并发；Performance版起价每月15美元，含30,000额度、80倍并发，额外额度为每25,000额度15美元；Scale版增加企业级管控、最大资源类和GPU环境。<sup>[4](https://circleci.com/pricing/)</sup> 付费额度可逐月结转，一年后过期，而免费版额度按月过期。<sup>[4](https://circleci.com/pricing/)</sup> 免费版上的开源项目每月可使用最多400,000额度，相当于80,000构建分钟，适用于Linux、Arm和Docker。<sup>[4](https://circleci.com/pricing/)</sup> 并发影响的是实际耗时而非费用：一个由十个5分钟作业组成的工作流，在1倍并发下耗时50分钟，在10倍并发下耗时5分钟，两种情况下计费计算时间均为50分钟。<sup>[4](https://circleci.com/pricing/)</sup>

## 采用情况与竞争地位

CircleCI与[GitHub Actions](https://www.edgepedia.org/zh/github-actions)、GitLab CI/CD、Jenkins及其他CI服务竞争。一项针对2,557个开源Android应用的实证研究考察了四个流行服务（包括CircleCI）的CI/CD配置实践，发现配置主要集中于构建设置，约半数项目执行标准测试，仅9%包含部署环节。<sup>[13](https://arxiv.org/abs/2411.06077)</sup> 一项针对GitHub上18,924个Java项目（2008年1月至2024年12月）的研究覆盖包括CircleCI在内的八个CI服务，发现近五分之一的项目存在同一项目内使用多个CI服务的重复模式，往往反映服务间的迁移。<sup>[14](https://arxiv.org/abs/2507.20095)</sup>

CircleCI自己发布的基准测试将其性能与企业级规模下的GitHub Actions进行比较。<sup>[15](https://circleci.com/blog/ci-cd-at-scale-circleci-vs-github-actions/)</sup> 公司发布的案例研究描述了多种用途：2019年被[H&R Block](https://www.edgepedia.org/zh/h-and-r-block)收购的金融科技公司Wave使用CircleCI进行Docker镜像构建、部署和回滚，并称依赖Insights仪表盘查看哪些流水线运行最频繁、消耗额度最多；<sup>[16](https://circleci.com/case-studies/wave-financial/)</sup> 个人理财应用Toss采用了并发和Docker层缓存；<sup>[17](https://circleci.com/customers/)</sup> City Hive以CircleCI作为执行引擎发布了1,000多个移动应用。<sup>[17](https://circleci.com/customers/)</sup>

## 2023年1月安全事件

2023年1月4日，CircleCI向客户发出安全事件警报。调查发现，部署在CircleCI一名工程师笔记本电脑上的恶意软件窃取了一个有效的、受双因素认证保护的SSO会话，该电脑于2022年12月16日被攻陷，恶意软件未被杀毒软件检测到。由于该员工拥有生成生产访问令牌的权限，入侵者访问并窃取了部分数据库和存储中的数据，包括客户环境变量、令牌和密钥；窃取行为发生于2022年12月22日，尽管数据在静态存储时已加密，攻击者仍从运行中的进程里提取了加密密钥。<sup>[6](https://circleci.com/blog/jan-4-2023-incident-report/?trk=article-ssr-frontend-pulse_little-text-block)</sup>

CircleCI的应对措施包括：1月4日关停被攻陷的账户及几乎所有生产访问权限，轮换生产主机，1月5日撤销所有项目API令牌，撤销1月5日之前创建的个人API令牌，与[Atlassian](https://www.edgepedia.org/zh/atlassian)合作轮换所有Bitbucket令牌，完成12月31日启动的GitHub OAuth令牌轮换，并与AWS合作在1月12日前告知客户哪些AWS令牌可能受影响。<sup>[6](https://circleci.com/blog/jan-4-2023-incident-report/?trk=article-ssr-frontend-pulse_little-text-block)</sup> 首席技术官罗布·祖伯表示，攻击者还获取了解密客户数据所需的加密密钥，并将该事件定性为系统性故障，而非仅仅是某位员工笔记本电脑被利用。<sup>[18](https://www.axios.com/2023/01/17/circleci-cybersecurity-attack)</sup> [红帽公司](https://www.edgepedia.org/zh/red-hat)2023年产品安全风险报告将该入侵列为软件供应链攻击中威胁行为者以窃取机密信息为目标的突出案例。<sup>[19](https://www.redhat.com/rhdc/managed-files/rh-product-security-risk-report-2023-1090925pr-202404-en.pdf)</sup>

## 平台近期变化

平台更新日志记录了2026年的若干进展。对[Bitbucket](https://www.edgepedia.org/zh/bitbucket) Data Center作为版本控制集成的支持将于2026年10月1日终止，原因是采用率始终很低，且Atlassian的许可政策变化表明其对Data Center产品线的长期承诺减弱；客户被引导转向GitHub、GitLab、Bitbucket Cloud或Cursor Origin。<sup>[20](https://circleci.com/changelog/)</sup> 与Cursor Origin的测试版集成可原样运行现有的`.circleci/config.yml`文件，在推送和拉取请求时触发流水线，并将状态回传到Origin的拉取请求。<sup>[20](https://circleci.com/changelog/)</sup> CircleCI还在`https://mcp.circleci.com/v1/mcp`托管了一个MCP服务器，通过OAuth2登录的AI助手可借助24种工具读取并操作客户的CI，每种工具均以已认证用户的身份运行。<sup>[20](https://circleci.com/changelog/)</sup>

## References

1. [About CircleCI](https://circleci.com/about/)
2. [Concepts, CircleCI Docs](https://circleci.com/docs//reference/concepts/)
3. [Version control systems, pipeline types, and feature support, CircleCI Docs](https://circleci.com/docs/guides/integration/version-control-system-integration-overview/)
4. [Pricing and Plan Information, CircleCI](https://circleci.com/pricing/)
5. [We raised $100M in our Series F: here's what we're building next, CircleCI blog](https://circleci.com/blog/series-f/)
6. [CircleCI Jan 4, 2023 security incident report, CircleCI blog](https://circleci.com/blog/jan-4-2023-incident-report/?trk=article-ssr-frontend-pulse_little-text-block)
7. [Machine learning on CircleCI (PDF)](https://circleci.com/landing-pages/assets/machine-learning-circleci.pdf)
8. [Configuration reference, CircleCI Docs](https://circleci.com/docs/reference/configuration-reference/)
9. [Welcome to CircleCI Documentation](https://circleci.com/docs/)
10. [Hybrid cloud ebook (PDF)](https://circleci.com/landing-pages/assets/HybridCloud-ebook.pdf)
11. [CircleCI's self-hosted runner overview, CircleCI Docs](https://circleci.com/docs/guides/execution-runner/runner-overview/)
12. [CircleCI plans overview, CircleCI Docs](https://circleci.com/docs/guides/plans-pricing/plan-overview/)
13. [CI/CD Configuration Practices in Open-Source Android Apps: An Empirical Study, arXiv](https://arxiv.org/abs/2411.06077)
14. [From First Use to Final Commit: Studying the Evolution of Multi-CI Service Adoption, arXiv](https://arxiv.org/abs/2507.20095)
15. [CI/CD at scale: A performance analysis of CircleCI vs GitHub Actions, CircleCI blog](https://circleci.com/blog/ci-cd-at-scale-circleci-vs-github-actions/)
16. [Wave's choice to use best-in-class CI/CD pays dividends at every stage of growth, CircleCI case study](https://circleci.com/case-studies/wave-financial/)
17. [CircleCI customer stories](https://circleci.com/customers/)
18. [What to know about CircleCI's recent cybersecurity incident, Axios](https://www.axios.com/2023/01/17/circleci-cybersecurity-attack)
19. [Red Hat Product Security Risk Report 2023 (PDF)](https://www.redhat.com/rhdc/managed-files/rh-product-security-risk-report-2023-1090925pr-202404-en.pdf)
20. [CircleCI Changelog](https://circleci.com/changelog/)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Named software products and platforms › Cloud, virtualization, and containers › CI/CD and deployment tools

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/circleci

English original: https://www.edgepedia.org/circleci
