mrsmn/gitlab-ci-jumpstart
Composer 安装命令:
composer require mrsmn/gitlab-ci-jumpstart
包简介
The aim of this package is to provide a jumpstart when using Gitlab CI for PHP projects.
README 文档
README
Introduction
The aim of this package is to provide a jumpstart when using Gitlab CI for PHP projects.
After installing this package (see setup) you'll have the following things set up:
A git pre-commit hook that will take the files in the commit, and put them through a syntax checker, followed by a formatting checker. It will also attempt to autocorrect the formatting issues where possible. Files that fail either the syntax opr the formatting check won't be able to be committed.
A base Gitlab CI config file that will check for syntax & formatting, run your unit tests and run a security check on your dependencies.
Setup
These setup steps assume you have enabled Gitlab CI for your project and have a docker enabled runner set up.
There's only 2 steps required to start using Gitlab CI in your current project
- require this package =>
composer require ... - run the setup script =>
./vendor/bin/ci-setup
The setup script will do 2 things
1) place config files in your root folder, that will be used by the various tools. If these files already exist, they will not be overwritten. 2) Place the git pre-commit hook in the .git directory.
Config files used:
| File | Description |
|---|---|
| .gitlab-ci.yml | contains the basic config defining what needs to be run |
| phpcs.xml | contains the config for phpcs |
| phpunit.xml.dist | contains the config for phpunit |
Remarks
Codesniffer by default will run on the PSR1/2 standards, with one exception, the line length rule. This rule has been modified to throw a warning on exceeding 160 characters and throw an error on exceeding 200 characters. I changed that rule because I found the base PSR rule on line length to be quite restrictive.
Gitlab CI also won't fail on warnings for Codesniffer, only on errors.
mrsmn/gitlab-ci-jumpstart 适用场景与选型建议
mrsmn/gitlab-ci-jumpstart 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 30 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 05 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mrsmn/gitlab-ci-jumpstart 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mrsmn/gitlab-ci-jumpstart 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-19