Update .gitlab-ci.yml
This commit is contained in:
parent
698dc60116
commit
fe550f013b
@ -1,11 +1,9 @@
|
||||
image: openjdk:latest mysql:latest
|
||||
|
||||
services:
|
||||
- mysql:latest
|
||||
|
||||
stages:
|
||||
- prepare
|
||||
- build
|
||||
- prepare
|
||||
- test
|
||||
- deploy
|
||||
|
||||
@ -15,15 +13,6 @@ variables:
|
||||
MYSQL_ROOT_PASSWORD: "andio2009"
|
||||
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:
|
||||
- echo `pwd` # debug
|
||||
@ -37,6 +26,7 @@ cache:
|
||||
|
||||
build:
|
||||
stage: build
|
||||
image: openjdk:latest
|
||||
script:
|
||||
- ./gradlew assemble
|
||||
artifacts:
|
||||
@ -46,8 +36,18 @@ build:
|
||||
only:
|
||||
- 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:
|
||||
stage: test
|
||||
image: openjdk:latest
|
||||
script:
|
||||
- ./gradlew check -Pargs='spring.profiles.active=deploy'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user