Hi all.
I’ve googled this question but found only testing but i need to deploy code to my server root.
Gitlab 8.x, runner – shell (configured from server with my application).
.gitlab-ci.yml
:
cache:
paths:
- vendor/
- logs/
before_script:
- composer selfupdate --no-progress --no-interaction
- composer install --no-progress --no-interaction
stages:
- test
- deploy
develop-deploy:
stage: deploy
script:
- php -v
- echo "IS_DEV=1" > ./.env
- ./vendor/bin/phinx migrate -e development
only:
- develop
develop-test:
stage: test
script:
- php -v
- ./vendor/bin/phpunit --configuration phpunit.xml --coverage-text
only:
- develop
master-deploy:
stage: deploy
script:
- php -v
- echo "IS_DEV=0" > ./.env
- ./vendor/bin/phinx migrate -e production
only:
- master
master-test:
stage: test
script:
- php -v
- ./vendor/bin/phpunit --configuration phpunit.xml --coverage-text
only:
- master
But there are two problems:
- Builds are in
/home/gitlab-runner/builds/
– how to change it to/var/www/myproject/builds/
(where is root for nginx)? - There is no
current
/latest
link to last success build – where i can find it? Or how to detect?
Thanks all for any help.