gitlab-ci.yml state prepare for mysql
This commit is contained in:
parent
44297f4dc8
commit
677f04fd49
@ -1,19 +1,27 @@
|
|||||||
image: openjdk:latest
|
image: openjdk:latest
|
||||||
|
|
||||||
services:
|
#services:
|
||||||
- mysql:latest
|
# - mysql:latest
|
||||||
|
|
||||||
variables:
|
|
||||||
# Configure mysql environment variables (https://hub.docker.com/_/mysql/)
|
|
||||||
MYSQL_DATABASE: "aitrainer"
|
|
||||||
MYSQL_ROOT_PASSWORD: "andio2009"
|
|
||||||
MYSQL_DATABASE: "aitrainer"
|
|
||||||
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- prepare
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
|
variables:
|
||||||
|
# Configure mysql environment variables (https://hub.docker.com/_/mysql/)
|
||||||
|
MYSQL_DATABASE: "aitrainer"
|
||||||
|
MYSQL_ROOT_PASSWORD: "andio2009"
|
||||||
|
MYSQL_DATABASE: "aitrainer"
|
||||||
|
|
||||||
|
connect:
|
||||||
|
stage: prepare
|
||||||
|
image: mysql:latest
|
||||||
|
script:
|
||||||
|
- service mysql start
|
||||||
|
- echo "SELECT 'OK';" | mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -h mysql "SHOW DATABASES;"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- echo `pwd` # debug
|
- echo `pwd` # debug
|
||||||
|
Loading…
Reference in New Issue
Block a user