funivan / ci
This package is abandoned and no longer maintained.
No replacement package was suggested.
Simple and fast CI server
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
- edit configuration file
ci.app.php
- add to cron
* * * * * php artisan schedule:run >> /dev/null 2>&1
- clone your repository to
build
directory. You can change location insideci.app.php
Manual usage
- add commit to the queue
php artisan ci:add master 0270966ad4a47e73c1ffcd28f5895b74da1b205f dev@funivan.com
- check commit
php artisan ci:check 1
How check commit automatically?
Create git hook 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
For developers
- clone this repository
- run
touch database/database.sqlite
- create
.env
file with the following code
APP_ENV = dev
- run
php artisan migrate:refresh
- start server
./artisan serve
- open
http://localhost:8000/