Commit 3c7e7b92 authored by Dominik Hebeler's avatar Dominik Hebeler

testing staged build process

parent b0d58f7e
update(144.76.113.134): stages:
- build
- test
- deploy
build metager1:
tags: tags:
- 144.76.113.134 - 144.76.113.134
only: only:
...@@ -10,38 +15,9 @@ update(144.76.113.134): ...@@ -10,38 +15,9 @@ update(144.76.113.134):
- which php - which php
- which sqlite3 - which sqlite3
script: script:
# Pfad zum neu geklonten Repo - sh build.sh
- path=`pwd`
- cd ~/
- if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
- git clone "$path" MetaGer_neu
- cd MetaGer_neu
- composer install
- scp -P 63824 metager@metager3.de:~/.env .
- scp -P 63824 metager@metager3.de:~/sumas.json config/
- scp -P 63824 metager@metager3.de:~/sumasEn.json config/
- scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
- scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
- scp -P 63824 metager@metager3.de:~/adBlacklistUrl.txt config/
- scp -P 63824 metager@metager3.de:~/adBlacklistDomains.txt config/
- touch storage/logs/laravel.log
- touch storage/logs/worker.log
- touch database/metager.sqlite
- chmod 777 config/sumas.json config/sumas.json database/metager.sqlite
- chmod -R 777 storage
- chmod -R 777 bootstrap/cache
- npm install
- npm run production
- php artisan migrate --force
- php artisan requests:gather
- if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
- cd ~/
- while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
- mv MetaGer_neu MetaGer
- sudo pkill --signal SIGHUP supervisord
- php ~/MetaGer/artisan up
update(metager2): build metager2:
tags: tags:
- metager2 - metager2
only: only:
...@@ -53,36 +29,10 @@ update(metager2): ...@@ -53,36 +29,10 @@ update(metager2):
- which php - which php
- which sqlite3 - which sqlite3
script: script:
# Pfad zum neu geklonten Repo - sh build.sh
- path=`pwd`
- cd ~/
- if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
- git clone "$path" MetaGer_neu
- cd MetaGer_neu
- composer install
- scp -P 63824 metager@metager3.de:~/.env .
- scp -P 63824 metager@metager3.de:~/sumas.json config/
- scp -P 63824 metager@metager3.de:~/sumasEn.json config/
- scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
- scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
- touch storage/logs/laravel.log
- touch storage/logs/worker.log
- touch database/metager.sqlite
- chmod 777 config/sumas.json config/sumas.json database/metager.sqlite
- chmod -R 777 storage
- chmod -R 777 bootstrap/cache
- npm install
- npm run production
- php artisan migrate --force
- php artisan requests:gather
- if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
- cd ~/
- while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
- mv MetaGer_neu MetaGer
- sudo pkill --signal SIGHUP supervisord
- php ~/MetaGer/artisan up
update(metager3.de): build metager3:
stage: build
tags: tags:
- metager3 - metager3
only: only:
...@@ -94,4 +44,24 @@ update(metager3.de): ...@@ -94,4 +44,24 @@ update(metager3.de):
- which php - which php
- which sqlite3 - which sqlite3
script: script:
- sh build.sh - sh build.sh
\ No newline at end of file
test metager3:
stage: test
tags:
- metager3
only:
-development@open-source/MetaGer
script:
- cd ~/MetaGer_neu
- sh test.sh
deploy metager3:
stage: deploy
tags:
- metager3
only:
- development@open-source/MetaGer
script:
- cd ~/MetaGer_neu
- sh test.sh
\ No newline at end of file
...@@ -6,7 +6,6 @@ path=`pwd` ...@@ -6,7 +6,6 @@ path=`pwd`
cd ~/ cd ~/
if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
git clone "$path" MetaGer_neu git clone "$path" MetaGer_neu
cd lkaklgn
cd MetaGer_neu cd MetaGer_neu
composer install composer install
scp -P 63824 metager@metager3.de:~/.env . scp -P 63824 metager@metager3.de:~/.env .
...@@ -24,11 +23,4 @@ chmod -R 777 storage ...@@ -24,11 +23,4 @@ chmod -R 777 storage
chmod -R 777 bootstrap/cache chmod -R 777 bootstrap/cache
npm install npm install
npm run production npm run production
php artisan migrate --force php artisan migrate --force
php artisan requests:gather \ No newline at end of file
if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
cd ~/
while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
mv MetaGer_neu MetaGer
sudo pkill --signal SIGHUP supervisord
php ~/MetaGer/artisan up
\ No newline at end of file
#!/bin/bash
set -e
cd ~/MetaGer_neu
php artisan requests:gather
if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
cd ~/
while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
mv MetaGer_neu MetaGer
sudo pkill --signal SIGHUP supervisord
php ~/MetaGer/artisan up
\ No newline at end of file
#!/bin/bash
set -e
cd ~/MetaGer_neu
# Start Webserver
php artisan serve >/dev/null 2>&1 &
servePid=$!
# Start the Browserstack Proxy
~/BrowserStackLocal --key gCyHqmJnNwLhp96LgiVG 2>&1 &
browserstackPid=$!
./vendor/bin/phpunit
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