Verified Commit d2b49ea2 authored by Mehdi Baaboura's avatar Mehdi Baaboura
Browse files

Updated GitLab CI script

parent 8ad6078f
......@@ -41,9 +41,43 @@ deploy:
- npm i
- npm rebuild node-sass
- npm run build
- rsync -aze ssh --exclude=.git --exclude=.env.local --exclude=var --exclude=vendor --exclude=node_modules ./ ssh-gigadrivegroup@zeryther.lima-ssh.de:~/html/qpost/
- rsync -aze ssh --exclude=.git --exclude=.env.local --exclude=var --exclude=vendor --exclude=node_modules ./ root@144.91.112.174:/home/web/qpost/
- rsync -aze ssh --exclude=.git --exclude=.env.local --exclude=.env.local.php --exclude=var --exclude=vendor --exclude=node_modules ./ ssh-gigadrivegroup@zeryther.lima-ssh.de:~/html/qpost/
- rsync -aze ssh --exclude=.git --exclude=.env.local --exclude=.env.local.php --exclude=var --exclude=vendor --exclude=node_modules ./ root@144.91.112.174:/home/web/qpost/
- ssh -t ssh-gigadrivegroup@zeryther.lima-ssh.de 'cd ~/html/qpost/ && /opt/lima-php/7.2/bin/php ~/phpbin/composer.phar install --no-dev && /opt/lima-php/7.2/bin/php ~/phpbin/composer.phar dump-autoload -o && /opt/lima-php/7.2/bin/php bin/console doctrine:migrations:migrate --no-interaction'
- ssh -t root@144.91.112.174 'cd /home/web/qpost/ && composer install --no-dev && composer dump-autoload -o && chmod -R 777 ./* && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console messenger:stop-workers && php bin/console qpost:update-changelogs'
only:
- master
- master
deploy_stage:
stage: deploy
script:
- apk update
- 'which rsync || apk add rsync'
- 'which ssh-agent || apk add openssh-client'
- 'which git || apk add git'
- 'which php7 || apk add php7'
- 'which php7-fileinfo || apk add php7-fileinfo'
- 'which php7-curl || apk add php7-curl'
- 'which php7-ctype || apk add php7-ctype'
- 'which php7-gmp || apk add php7-gmp'
- 'which php7-gd || apk add php7-gd'
- 'which php7-mbstring || apk add php7-mbstring'
- 'which php7-pdo || apk add php7-pdo'
- 'which php7-tokenizer || apk add php7-tokenizer'
- 'which php7-xml || apk add php7-xml'
- 'which php7-mysqli || apk add php7-mysqli'
- 'which composer || apk add composer'
- 'which npm || apk add npm'
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- git submodule update --depth 50
- npm i
- npm rebuild node-sass
- npm run build
- rsync -aze ssh --exclude=.git --exclude=.env.local --exclude=.env.local.php --exclude=var --exclude=vendor --exclude=node_modules ./ root@144.91.112.174:/home/web/qpost-stage/
- ssh -t root@144.91.112.174 'cd /home/web/qpost-stage/ && composer install --no-dev && composer dump-autoload -o && chmod -R 777 ./* && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console messenger:stop-workers && php bin/console qpost:update-changelogs'
only:
- stage
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment