deploy stage files

This commit is contained in:
Bossanyi Tibor 2020-05-12 21:29:05 +02:00
parent 8ccc7209ff
commit 9d8949130f
3 changed files with 9 additions and 6 deletions

View File

@ -5,7 +5,7 @@ stages:
- build - build
- prepare - prepare
- test - test
# - deploy - deploy
variables: variables:
# Configure mysql environment variables (https://hub.docker.com/_/mysql/) # Configure mysql environment variables (https://hub.docker.com/_/mysql/)
@ -43,7 +43,7 @@ connect:
script: script:
- apt-get update && apt-get --assume-yes install mysql-client - 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; 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 customer; DROP table exercises; DROP table exercise_type; DROP table exercise_ages;"
- mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql < "data/db/install.sql" #first time - mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql < "data/db/install.sql" #first time
test: test:
@ -53,10 +53,11 @@ test:
- export spring_profiles_active=test - export spring_profiles_active=test
- ./gradlew check - ./gradlew check
#deploy: deploy:
# stage: deploy stage: deploy
# script: script:
# - ./deploy - apt-get update && apt-get --assume-yes install sshpass
- ci-cd/deploy.sh
after_script: after_script:
- echo "End CI" - echo "End CI"

1
ci-cd/.ssh/.scp Normal file
View File

@ -0,0 +1 @@
tbi6012AndiBossanyi

1
ci-cd/deploy.sh Normal file
View 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