Our php artisan migrate fails without a clear error on screen .So I want to tail the laravel log afterwards. But the script calls the teardown without the laravel log....
How can I tail logs after the build fails?
My bitbucket-pipelines
image: php:7.1.1
pipelines:
default:
- step:
services:
- mysql
deployment: test
caches:
- composer
script:
- apt-get update && apt-get install -y unzip
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- docker-php-ext-install pdo_mysql
- cp php.ini /usr/local/etc/php/php.ini
- composer install
- php -r "copy('.env.testing', '.env');"
- php --ini
- ls /usr/local/etc/php/
- export DB_CONNECTION=mysql
- composer dump-autoload
- php artisan migrate:install
- php artisan cache:clear
- php artisan migrate
- tail storage/logs/laravel.log -n 100
definitions:
services:
mysql:
image: mysql:5.7.22
entrypoint: ['/entrypoint.sh', '--character-set-server=utf8', '--collation-server=utf8_general_ci']
environment:
MYSQL_DATABASE: '********'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: '***********'
MYSQL_PASSWORD: '************'