diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1c404e2..bb6fedc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,8 +19,7 @@ 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: - .gradle/wrapper @@ -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: diff --git a/.gitlab-runner-register b/.gitlab-runner-register new file mode 100644 index 0000000..644d1dc --- /dev/null +++ b/.gitlab-runner-register @@ -0,0 +1 @@ +docker run --rm -t -i -v /srv/gitlab-runner/config:/etc/gitlab-runner gitlab/gitlab-runner register \ No newline at end of file diff --git a/src/main/resources/application-deploy.properties b/src/main/resources/application-deploy.properties index 25cac9f..6ad5e57 100644 --- a/src/main/resources/application-deploy.properties +++ b/src/main/resources/application-deploy.properties @@ -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