workouttest_server/.gitlab-ci.yml
2020-05-10 11:00:42 +02:00

58 lines
1021 B
YAML

services:
- mysql:latest
stages:
- prepare
- test
- deploy
variables:
# Configure mysql environment variables (https://hub.docker.com/_/mysql/)
MYSQL_DATABASE: "aitrainer"
MYSQL_ROOT_PASSWORD: "andio2009"
MYSQL_USER: "aitrainer"
MYSQL_PASSWORD: "andio2009"
before_script:
- echo `pwd` # debug
- echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
- export GRADLE_USER_HOME=`pwd`/.gradle
cache:
paths:
- .gradle/wrapper
- .gradle/caches
#build:
# stage: build
# image: openjdk:latest
# script:
# - ./gradlew assemble
# artifacts:
# paths:
# - build/libs/*.jar
# expire_in: 1 week
# only:
# - master
connect:
stage: prepare
image: mysql:latest
script:
- apt-get update && apt-get --assume-yes install mysql-client
test:
stage: test
image: openjdk:latest
script:
- ./gradlew check -Pargs='spring.profiles.active=deploy'
deploy:
stage: deploy
script:
- ./deploy
after_script:
- echo "End CI"