Merge branch 'tibor' into 'master'
Tibor See merge request bossanyit/aitrainer_server!9
This commit is contained in:
commit
58e97691f0
@ -1,11 +1,10 @@
|
||||
services:
|
||||
- mysql:latest
|
||||
|
||||
|
||||
stages:
|
||||
- build
|
||||
- prepare
|
||||
- test
|
||||
# - deploy
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
# Configure mysql environment variables (https://hub.docker.com/_/mysql/)
|
||||
@ -43,7 +42,7 @@ connect:
|
||||
script:
|
||||
- apt-get update && apt-get --assume-yes install mysql-client
|
||||
- mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql -e "use $MYSQL_DATABASE; show tables;"
|
||||
- mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql -e "use $MYSQL_DATABASE; DROP table customer; DROP table exercises; DROP table exercise_types; DROP table exercise_ages;"
|
||||
- mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql -e "use $MYSQL_DATABASE; DROP table if exists customer; DROP table if exists exercises; DROP table if exists exercise_type; DROP table if exists exercise_ages;"
|
||||
- mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql < "data/db/install.sql" #first time
|
||||
|
||||
test:
|
||||
@ -53,10 +52,14 @@ test:
|
||||
- export spring_profiles_active=test
|
||||
- ./gradlew check
|
||||
|
||||
#deploy:
|
||||
# stage: deploy
|
||||
# script:
|
||||
# - ./deploy
|
||||
deploy:
|
||||
stage: deploy
|
||||
image: mysql:latest
|
||||
script:
|
||||
- apt-get update && apt-get --assume-yes install sshpass
|
||||
- ci-cd/deploy.sh
|
||||
only:
|
||||
- master
|
||||
|
||||
after_script:
|
||||
- echo "End CI"
|
||||
|
1
ci-cd/.ssh/.scp
Normal file
1
ci-cd/.ssh/.scp
Normal file
@ -0,0 +1 @@
|
||||
tbi6012AndiBossanyi
|
1
ci-cd/deploy.sh
Normal file
1
ci-cd/deploy.sh
Normal file
@ -0,0 +1 @@
|
||||
sshpass -f /ci-cd/.ssh/.scp scp build/libs/aitrainer_server-0.0.2.jar bosi@andio.shop:/home/bosi/deploy/aitrainer_server.jar
|
Loading…
Reference in New Issue
Block a user