funivan / ci
此包已被废弃,不再维护。未建议替代包。
简单快速的 CI 服务器
dev-master
2016-11-24 11:54 UTC
Requires
- php: >=5.6
- doctrine/dbal: ^2.5
- franzl/laravel-plates: ^1.0
- laravel/framework: 5.2.*
- monolog/monolog: ^1.17
- symfony/yaml: ^3.0
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~4.0
- symfony/css-selector: 2.8.*|3.0.*
- symfony/dom-crawler: 2.8.*|3.0.*
This package is not auto-updated.
Last update: 2020-01-20 23:43:43 UTC
README
git clone https://github.com/funivan/ci.git
cd ci
composer install
touch database/database.sqlite
php artisan migrate
- 编辑配置文件
ci.app.php
- 添加到 cron
* * * * * php artisan schedule:run >> /dev/null 2>&1
- 将您的仓库克隆到
build
目录。您可以在ci.app.php
中更改位置
手动使用
- 将提交添加到队列
php artisan ci:add master 0270966ad4a47e73c1ffcd28f5895b74da1b205f dev@funivan.com
- 检查提交
php artisan ci:check 1
如何自动检查提交?
创建 git 钩子 post-receive
#!/bin/sh # # An example hook script for the "post-receive" event. # # The "post-receive" script is run after receive-pack has accepted a pack # and the repository has been updated. It is passed arguments in through # stdin in the form # <oldrev> <newrev> <refname> # For example: # aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master # SERVER_URL="ci.yourserver.com"; trigger_hook() { NEWREV="$2" REFNAME="$3" if [ "$NEWREV" = "0000000000000000000000000000000000000000" ]; then # Ignore deletion return fi case "$REFNAME" in # Triggers only on branches and tags refs/heads/*|refs/tags/*) ;; # Bail out on other references *) return ;; esac BRANCH=$(git rev-parse --symbolic --abbrev-ref "$REFNAME") COMMITTER=$(git log -1 "$NEWREV" --pretty=format:%ce) MESSAGE=$(git log -1 "$NEWREV" --pretty=format:%s) echo "Sending webhook" curl "http://$SERVER_URL/add-commit?hash=$NEWREV$branch=$BRANCH" } if [ -n "$1" -a -n "$2" -a -n "$3" ]; then PAGER= trigger_hook $1 $2 $3 else while read oldrev newrev refname; do trigger_hook $oldrev $newrev $refname done fi
为开发者
- 克隆此仓库
- 运行
touch database/database.sqlite
- 创建包含以下代码的
.env
文件
APP_ENV = dev
- 运行
php artisan migrate:refresh
- 启动服务器
./artisan serve
- 打开
http://localhost:8000/