mysql service for ci

This commit is contained in:
Bossanyi Tibor 2020-05-08 23:29:52 +02:00
parent 9079c2b509
commit 98c2de8e5e
3 changed files with 3 additions and 4 deletions

View File

@ -19,7 +19,6 @@ before_script:
- echo `pwd` # debug
- echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
- export GRADLE_USER_HOME=`pwd`/.gradle
- mysql --version
cache:
paths:
@ -40,7 +39,6 @@ build:
test:
stage: test
script:
- echo "SELECT 'OK';" | mysql --user=root --password="${MYSQL_ROOT_PASSWORD}" --host=mysql "${MYSQL_DATABASE}"
- ./gradlew check -Pargs='spring.profiles.active=deploy'
deploy:

1
.gitlab-runner-register Normal file
View File

@ -0,0 +1 @@
docker run --rm -t -i -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register

View File

@ -1,7 +1,7 @@
spring.profiles.active=deploy
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
#spring.datasource.url = jdbc:mysql://localhost:3306/aitrainer?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false
spring.datasource.url = jdbc:mysql://172.18.0.1:3306/aitrainer?serverTimezone=CET&useSSL=false&characterEncoding=UTF-8&allowMultiQueries=true
spring.datasource.url = jdbc:mysql://mysql:3306/aitrainer?serverTimezone=CET&useSSL=false&characterEncoding=UTF-8&allowMultiQueries=true
spring.datasource.username = aitrainer
spring.datasource.password = andio2009