PHPackages                             pcit/pcit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. pcit/pcit

ActiveProject[DevOps &amp; Deployment](/categories/devops)

pcit/pcit
=========

A CI/CD System Based Docker Written by PHP

18.12.0(6y ago)2608[5 issues](https://github.com/pcit-ce/pcit/issues)MITPHPPHP ^7.3.0CI failing

Since May 8Pushed 5y ago2 watchersCompare

[ Source](https://github.com/pcit-ce/pcit)[ Packagist](https://packagist.org/packages/pcit/pcit)[ Docs](https://github.com/pcit-ce/pcit)[ RSS](/packages/pcit-pcit/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (27)Versions (23)Used By (0)

PCIT (PCIT is CI TOOLKIT Written by PHP)
========================================

[](#pcit-pcit-is-ci-toolkit-written-by-php)

[![GitHub stars](https://camo.githubusercontent.com/7a8c7b83097e868a00446c82f9abef573b39588af43c455032c1a31c36fbf8c8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f706369742d63652f706369742e7376673f7374796c653d736f6369616c266c6162656c3d5374617273)](https://github.com/pcit-ce/pcit) [![PHP from Packagist](https://camo.githubusercontent.com/7363ecdb0f8e07eb4ff3956d244fe20e5843c06cb4bf89a8c81977e48a65c101/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706369742f706369742e737667)](https://packagist.org/packages/pcit/pcit) [![GitHub (pre-)release](https://camo.githubusercontent.com/9ba42648e799284e8feb5db0a4fcf3356c46443375273c29bc01a89271677f09/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f706369742d63652f706369742f616c6c2e737667)](https://github.com/pcit-ce/pcit/releases) [![Build Status](https://camo.githubusercontent.com/342d6c350cbd4939b4f6c1a12a69b27d3f3260e089e9f6703808e3574213be1d/68747470733a2f2f6369322e6b6873313939342e636f6d3a31303030302f6769746875622f706369742d63652f706369742f7374617475733f6272616e63683d6d6173746572)](https://ci2.khs1994.com:10000/github/pcit-ce/pcit) [![codecov](https://camo.githubusercontent.com/3fff29553d03aa9b179e590e3b9a03ee1866353cd1272af1a73b343db479e30a/68747470733a2f2f636f6465636f762e696f2f67682f706369742d63652f706369742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/pcit-ce/pcit)

**国内首个基于 GitHub Checks API 使用 PHP 编写的运行于 Docker 之上的由 Tencent AI 驱动的开源云原生 CI/CD 系统**

- [Support Docs](https://docs.ci.khs1994.com)
- [Support Docs | mirror](https://pcit-ce.gitee.io/)
- [Changelog](https://github.com/pcit-ce/pcit/blob/master/CHANGELOG.md)
- [Feedback](https://github.com/pcit-ce/pcit/issues)
- [API endpoint](https://ci.khs1994.com/api)
- [API Docs](https://docs.ci.khs1994.com/api)
- [API Docs | mirror](https://pcit-ce.gitee.io/api)
- [Plugins](https://github.com/pcit-ce/pcit/tree/master/plugins)
- [Donate](https://zan.khs1994.com)
- [PCIT EE](https://github.com/pcit-ce/pcit/tree/master/docs#about-pcit-ce-and-ee)
- [openAPI](https://openapi-pcit.doc.coding.io)
- [openAPI](https://app.swaggerhub.com/apis-docs/pcit/pcit-api/1.0.0)

项目状态
----

[](#项目状态)

**积极开发中** 部分描述或功能只是 [**路线图**](ROADMAP.md) 中的一部分，有待实现，请点击 `Star` 或关注微信订阅号保持对 PCIT 的关注。

[![](https://user-images.githubusercontent.com/16733187/46847944-84a96b80-ce19-11e8-9f0c-ec84b2ac463e.jpg)](https://user-images.githubusercontent.com/16733187/46847944-84a96b80-ce19-11e8-9f0c-ec84b2ac463e.jpg)

**关注项目作者微信订阅号，接收项目最新动态**

预览
--

[](#预览)

点击  查看 PCIT 功能界面。

参与开发
----

[](#参与开发)

本项目适用于对 CI/CD 感兴趣的开发者（特别是 PHP 开发者），欢迎开发者 [参与 PCIT 开发](https://github.com/pcit-ce/pcit/blob/master/CONTRIBUTING.md)。

愿景
--

[](#愿景)

你尽管 `push`，其他的 PCIT 搞定。

push by you, test and deploy by us.

掌上 PCIT
-------

[](#掌上-pcit)

[![](https://user-images.githubusercontent.com/16733187/49062650-de41ea00-f24f-11e8-9f22-99b5cd3d0195.jpg)](https://user-images.githubusercontent.com/16733187/49062650-de41ea00-f24f-11e8-9f22-99b5cd3d0195.jpg)

**掌上 PCIT**

什么是持续集成 Continuous Integration (CI)?
------------------------------------

[](#什么是持续集成-continuous-integration-ci)

-

持续集成 (CI) 是一种 **软件开发实践**，即团队开发成员经常集成他们的工作，而不是在开发周期结束时进行集成，通过每个成员每天至少集成一次，这意味着每天可能会发生多次集成。每次集成都通过自动化的构建（包括编译，发布，自动化测试）来验证，从而尽早地发现集成错误。

持续集成 (CI) 的 **目标** 是通过以较小的增量进行 **开发** 和 **测试** 来构建更健康的软件。

[![ci](https://user-images.githubusercontent.com/16733187/41330207-9416717c-6f04-11e8-961f-c606303e7bb5.jpg)](https://user-images.githubusercontent.com/16733187/41330207-9416717c-6f04-11e8-961f-c606303e7bb5.jpg)

作为一个持续集成系统，**PCIT** 可以自动的在代码变更时进行 **构建** 和 **测试**，同时为代码变更的构建状态提供即时的反馈。**PCIT** 还可以通过管理 **部署** 和 **通知** 来自动化软件开发过程中的其他流程。

当开发者提交代码到 Git（即代码发生变更）， **PCIT** 会把 Git 仓库克隆到一个容器环境中，并执行一系列 **构建** 和 **测试** 代码的任务。如果其中一项或多项任务失败，则认为构建失败。如果没有任何任务失败，构建被认为通过。同时 **PCIT** 可以将代码部署到 Web 服务器、应用程序主机或容器集群中。

PCIT 架构
-------

[](#pcit-架构)

**PCIT** 由 **PHP 分布式后端（1+N）**（`Webhooks Server` + `Daemon CLI` + `Runner(N)`） + **GitHub App** + **CLI** + **开放平台**（`插件`、`API`）四部分组成

- **Webhooks Server** 接收 Git 事件
- **Daemon CLI** 后端常驻 (守护) 程序，解析 Git 事件生成一个 **build** 并将其分解为多个 **job** (Server 节点)，之后在 Docker 单机或集群（Kubernetes）中执行构建、测试、容器化部署的自动化过程（Runner）。
- **CLI** 提供各种实用的功能，例如命令行查看构建状态
- **开放平台** 包含用于功能扩展的 **插件** 和 **RESTFul API**，与开发者一道构建 PCIT 生态系统

### 开放(合作共赢)

[](#开放合作共赢)

- [GPI (Git Provider Interface)](https://github.com/pcit-ce/git-gpi)
- [Providers](https://github.com/pcit-ce/kernel-provider)
- [Runners](https://github.com/pcit-ce/kernel-runner)
- [Plugins](https://github.com/pcit-plugins)
- [Notifications](https://github.com/pcit-ce/kernel-notification)
- OpenAPI

使用方法（使用之前需要私有部署 PCIT EE）
------------------------

[](#使用方法使用之前需要私有部署-pcit-ee)

> 这里只是介绍部署 PCIT 之后如何使用 PCIT 进行 CI/CD 实践，如何部署 PCIT 请查看下一小节

**1.** 点击 [PCIT-CE GitHub App](https://github.com/apps/pcit-ce) 进行安装

**2.** Git 仓库根目录包含 [`.pcit.yml`](https://github.com/pcit-ce/pcit/tree/master/pcit_examples) 来配置 CI 规则

```
language: php

steps:

  before_install: ['echo exec init script']

  install: composer install

  script:
    - composer test

  after_success:
    image: bash
    if:
      status: success
    run:
      - echo "build is success"

services:
  redis:
  mysql:
```

> 为了智能补全、错误提示等功能，推荐使用 vsCode 编辑 `.pcit.yml` 文件。安装 `redhat.vscode-yaml` 扩展并在项目的 `.vscode/settings.json` 文件中增加以下内容。

```
{
+  "yaml.schemas": {
+    "https://github.com/pcit-ce/pcit/raw/master/config/config.schema.json": [
+      ".pcit.yaml",
+      ".pcit.yml",
+      ".pcit/**.yaml",
+      ".pcit/**.yml"
+    ]
+  }
}
```

**3.** 推送 git 仓库到 GitHub，PCIT 开始进行 **构建** **测试** **部署** 等一系列工作。

> 查看构建的聚合页面，请登录

PCIT CE vs PCIT EE
------------------

[](#pcit-ce-vs-pcit-ee)

在未来 PCIT 可能会提供 **公有云服务** 让开发者无需私有部署即可方便快捷的使用 PCIT。我们将这个有待实现的版本称为 PCIT CE。

所以 **CE** 和 **EE** 的区别为是否需要开发者自行部署。

部署 PCIT EE
----------

[](#部署-pcit-ee)

> 依托于 khs1994-docker/lnmp LNMP 容器化解决方案，私有部署 PCIT 也很方便。

- PHP
- MySQL
- Redis
- **仅仅** 需要 [安装 Docker](https://github.com/yeasy/docker_practice/tree/master/install) 和 [khs1994-docker/lnmp](https://github.com/khs1994-docker/lnmp) 和 [网站的 SSL/TLS 证书](https://github.com/Neilpang/acme.sh)

```
# 安装 Docker 这里不再赘述

# 安装 khs1994-docker/lnmp

$ git clone --depth=1 https://github.com/khs1994-docker/lnmp.git ~/lnmp

# 中国镜像
# $ git clone --depth=1 https://gitee.com/khs1994-docker/lnmp.git ~/lnmp

$ cd ~/lnmp
```

**1.** 在 GitHub [Settings &gt; Developer settings &gt; GitHub Apps](https://github.com/settings/apps) 注册一个 **GitHub App**

**2.** 启用 GitHub App 的 OAuth。

**3.** 准备证书文件，包括网站证书以及 GitHub App 的私钥证书

**4.** 编辑 `~/lnmp/pcit/.env.development` 文件中的变量，之后启动 PCIT

```
$ ./lnmp-docker pcit-up
```

**5.** 点击刚才注册好的 **GitHub App** 地址 [https://github.com/apps/YOUR\_APP\_NAME](https://github.com/apps/YOUR_APP_NAME) ，进行安装。

**6.** Git 仓库根目录包含 `.pcit.yml` 文件

**7.** 推送项目到 GitHub，在 **Commit** 详情处查看构建。

详细的步骤请查看

示例项目
----

[](#示例项目)

目前 PCIT 官方维护以下语言的示例项目。

语言地址构建页面**PHP**[![Build Status](https://camo.githubusercontent.com/94c316d8c59826bab7776fab979472cc1dc83720378e33b121c6b0b799e5d81f/68747470733a2f2f63692e6b6873313939342e636f6d2f6769746875622f6b6873313939342d7068702f74656e63656e742d61692f7374617475733f6272616e63683d6d6173746572)](https://ci.khs1994.com/github/khs1994-php/tencent-ai)**Node.js**[![Build Status](https://camo.githubusercontent.com/8753499a2bd17497ad8274f960f08d3e279e84d5271692a4485019c0822235b2/68747470733a2f2f63692e6b6873313939342e636f6d2f6769746875622f6b6873313939342f74656e63656e742d61692d6a732f7374617475733f6272616e63683d6d6173746572)](https://ci.khs1994.com/github/khs1994/tencent-ai-js)**微信小程序 (Node.js)****Hexo (Node.js)**[![Build Status](https://camo.githubusercontent.com/6c05aa047199410ef82f1df182e30741032d64d3841be01ec99ce5650085d720/68747470733a2f2f63692e6b6873313939342e636f6d2f6769746875622f6b6873313939342f6b6873313939342e6769746875622e696f2f7374617475733f6272616e63683d6865786f)](https://ci.khs1994.com/github/khs1994/khs1994.github.io)**Bash Shell**[![Build Status](https://camo.githubusercontent.com/c537448447d6fe8c6793d032419f84dfa8f0770a0a148e8b6bc89b738db6b490/68747470733a2f2f63692e6b6873313939342e636f6d2f6769746875622f6b6873313939342d646f636b65722f6c6e6d702f7374617475733f6272616e63683d6d6173746572)](https://ci.khs1994.com/github/khs1994-docker/lnmp)生态系统
----

[](#生态系统)

Why PCIT
--------

[](#why-pcit)

-

PCIT 子项目
--------

[](#pcit-子项目)

- [Docker PHP SDK](https://github.com/khs1994-docker/libdocker)
- [Docker Registry PHP SDK](https://github.com/khs1994-docker/libregistry)
- Tencent AI CLI
- [WeChat PHP SDK](https://github.com/khs1994-php/libwechat)

项目拆分
----

[](#项目拆分)

### 待拆分

[](#待拆分)

- [日志处理组件](https://github.com/pcit-ce/kernel-log)
- [任务执行组件 Runner](https://github.com/pcit-ce/kernel-runner)

### 已拆分

[](#已拆分)

- [前端 UI](https://github.com/pcit-ce/ui)
- [微信小程序](https://github.com/pcit-ce/miniprogram)

Docker Image
------------

[](#docker-image)

- pcit/pcit
- pcit/frontend

致谢
--

[](#致谢)

- [PHP](https://www.php.net)
- [Docker](https://www.docker.com)
- [Kubernetes](https://kubernetes.io/)
- [Travis CI](https://travis-ci.com)
- [Drone CI](https://drone.io)
- [Minio](https://github.com/minio/minio)
- [FastGit](https://github.com/FastGitORG)

国内友商
----

[](#国内友商)

- [PHP 实现 piplin.com](https://github.com/Piplin/Piplin)
- [JAVA 实现 flow.ci](https://flow.ci)

GitHub 上的其他 CI/CD 项目
--------------------

[](#github-上的其他-cicd-项目)

- [https://github.com/topics/continuous-integration?l=php&amp;o=desc&amp;s=stars](https://github.com/topics/continuous-integration?l=php&o=desc&s=stars)
- [https://github.com/topics/continuous-integration?o=desc&amp;s=stars](https://github.com/topics/continuous-integration?o=desc&s=stars)

什么是云原生 Cloud Native?
--------------------

[](#什么是云原生-cloud-native)

Cloud native computing uses an open source software stack to be:

1. **Containerized.** Each part (applications, processes, etc) is packaged in its own container. This facilitates reproducibility, transparency, and resource isolation.
2. **Dynamically orchestrated.** Containers are actively scheduled and managed to optimize resource utilization.
3. **Microservices oriented.** Applications are segmented into microservices. This significantly increases the overall agility and maintainability of applications.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 99.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~32 days

Recently: every ~97 days

Total

21

Last Release

2287d ago

Major Versions

0.0.20 → 18.06-rc12018-09-12

PHP version history (4 changes)0.0.1PHP &gt;=7.1

18.12.0-alpha5PHP ^7.1.3

18.12.0-beta1PHP ^7.2.0

18.12.0PHP ^7.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/69941311121544acc11e09be153f827d1c02ba629fba7b09bea32a96b92d8274?d=identicon)[khs1994](/maintainers/khs1994)

---

Top Contributors

[![khs1994](https://avatars.githubusercontent.com/u/16733187?v=4)](https://github.com/khs1994 "khs1994 (716 commits)")[![pcit-ce2[bot]](https://avatars.githubusercontent.com/in/11044?v=4)](https://github.com/pcit-ce2[bot] "pcit-ce2[bot] (4 commits)")

---

Tags

cicontinuous-integrationdockerpcitphpdockercipcit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pcit-pcit/health.svg)

```
[![Health](https://phpackages.com/badges/pcit-pcit/health.svg)](https://phpackages.com/packages/pcit-pcit)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
