-
Notifications
You must be signed in to change notification settings - Fork 0
GitLab Pipeline
Krzysztof Tomasz Zembrowski edited this page Nov 22, 2020
·
6 revisions
Make sure Pipelines are enabled in projects Settings
> General
> Visibility, project features, permissions
> Repository
> Pipelines
.
Add .gitlab-ci.yml
to your repository.
Example:
image: rechtlogisch/ffier
stages:
- test
- deploy
test:
stage: test
cache:
paths:
- vendor/
script:
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
- composer test
deploy:
stage: deploy
script:
- dep deploy production
GitLab triggers Pipeline jobs on every push to the repository. You can adjust this behavior by adding only
or rules
in the .gitlab-ci.yml
file (cf. GitLab Documentation)
For deployment add deploy.php
and hosts.yml
to your repository (cf. Deployer documentation)
To run tests with composer test
add for example vendor/bin/pest
to the scripts
property of your composer.json
(cf. Composer documentation and Pest PHP)