Update .gitlab-ci.yml

This commit is contained in:
Bossanyi Tibor 2020-05-10 08:11:42 +00:00
parent 698dc60116
commit fe550f013b

View File

@ -1,11 +1,9 @@
image: openjdk:latest mysql:latest
services: services:
- mysql:latest - mysql:latest
stages: stages:
- prepare
- build - build
- prepare
- test - test
- deploy - deploy
@ -15,15 +13,6 @@ variables:
MYSQL_ROOT_PASSWORD: "andio2009" MYSQL_ROOT_PASSWORD: "andio2009"
MYSQL_DATABASE: "aitrainer" MYSQL_DATABASE: "aitrainer"
connect:
stage: prepare
image: mysql:latest
script:
- apt-get update && apt-get --assume-yes install mysql-client
- 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
@ -37,6 +26,7 @@ cache:
build: build:
stage: build stage: build
image: openjdk:latest
script: script:
- ./gradlew assemble - ./gradlew assemble
artifacts: artifacts:
@ -46,8 +36,18 @@ build:
only: only:
- master - master
connect:
stage: prepare
image: mysql:latest
script:
- apt-get update && apt-get --assume-yes install mysql-client
- echo "SELECT 'OK';" | mysql -uroot -p "$MYSQL_ROOT_PASSWORD" -h mysql "SHOW DATABASES;"
test: test:
stage: test stage: test
image: openjdk:latest
script: script:
- ./gradlew check -Pargs='spring.profiles.active=deploy' - ./gradlew check -Pargs='spring.profiles.active=deploy'