|Joshua Westerheide 3b69e51b7a||5 years ago|
|logs||5 years ago|
|.gitignore||5 years ago|
|LICENSE||5 years ago|
|README.md||5 years ago|
|composer.json||5 years ago|
|composer.lock||5 years ago|
|deploy-config.example.php||5 years ago|
|deploy.php||5 years ago|
This project contains a simple script to deploy GitLab artifacts.
Build artifcats can be build using the GitLab CI (more here).
This project was heavily inspired by simple-php-git-deploy.
php >= 5.6.
composeris required for creating project with composer.
sendmailis required to send notifications on errors.
curlis required to download artifacts from gitlab using the api,
unzipis required to extract the artifacts and finally
rsyncis required to move files from cache to the defined target.
git clone https://github.com/jdoubleu/small-php-gitlab-cd.gitor
composer create-project jdoubleu/small-php-gitlab-cd
deploy-config.php. The deploy script looks for a file with its name appended with "config" so
you can create as much configurations as you want.
Have a look at the comments in the config file(s)!
Go into your GitLab instance (or to gitlab.com), then go to the settings of your project and create a Webhook.
Build events and enter the url with appended value of
Now you're done! Every time a build happens your script is called. Only on fitting and successful builds your script tries to deploy the artifacts.
Run the deploy script manually using your php interpreter like this:
/usr/bin/php path/to/deploy.php -p 1 -b 10
If the script failed check the error log!
Some errors are not displayed in the error log:
Please keep this in mind! Try to check this by executing the curl command manually on your shell.
You are welcome to contribute to this project. Either in creating issues or submitting code.
develop branch. If you want to introduce a new feature you should create a feature
branch out of the
If you are finished just create a PR on