gitlab-ci.yml state prepare for mysql
This commit is contained in:
parent
44297f4dc8
commit
677f04fd49
@ -1,7 +1,12 @@
|
|||||||
image: openjdk:latest
|
image: openjdk:latest
|
||||||
|
|
||||||
services:
|
#services:
|
||||||
- mysql:latest
|
# - mysql:latest
|
||||||
|
stages:
|
||||||
|
- prepare
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
- deploy
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
# Configure mysql environment variables (https://hub.docker.com/_/mysql/)
|
# Configure mysql environment variables (https://hub.docker.com/_/mysql/)
|
||||||
@ -9,11 +14,14 @@ variables:
|
|||||||
MYSQL_ROOT_PASSWORD: "andio2009"
|
MYSQL_ROOT_PASSWORD: "andio2009"
|
||||||
MYSQL_DATABASE: "aitrainer"
|
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;"
|
||||||
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- test
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- echo `pwd` # debug
|
- echo `pwd` # debug
|
||||||
|
Loading…
Reference in New Issue
Block a user