mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
add database test
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=shpping_portal
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
DB_PASSWORD=root
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
|
||||
+27
-3
@@ -9,9 +9,9 @@ stages:
|
||||
# Variables
|
||||
variables:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_USER: mysql_user
|
||||
MYSQL_PASSWORD: mysql_password
|
||||
MYSQL_DATABASE: mysql_db
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: root
|
||||
MYSQL_DATABASE: shpping_portal
|
||||
DB_HOST: mysql
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ before_script:
|
||||
|
||||
|
||||
#jobs
|
||||
|
||||
#buld the backend
|
||||
composer_php:
|
||||
stage: service_build
|
||||
@@ -61,4 +62,27 @@ node_gulp:
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /.*/'
|
||||
|
||||
#mysql
|
||||
database:
|
||||
stage: database
|
||||
services:
|
||||
- name: mysql:8.0
|
||||
command: [ "--default-authentication-plugin=mysql_native_password" ]
|
||||
dependencies:
|
||||
- composer_php
|
||||
before_script:
|
||||
- cp .env.example .env
|
||||
- echo "extension=pdo_mysql.so" >> /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini
|
||||
- php artisan config:cache
|
||||
script:
|
||||
- php artisan migrate:fresh
|
||||
- php artisan db:seed
|
||||
- mysqldump --host="${DB_HOST}" --user="${MYSQL_USER}" --password="${MYSQL_PASSWORD}" "${MYSQL_DATABASE}" > db.sql
|
||||
|
||||
rules:
|
||||
- if: '$CI_COMMIT_BRANCH =~ /.*/'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user