Added the deploy phase of the CI/CD
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
09be3c9959
commit
42dd0e8dca
@ -7,6 +7,7 @@ stages:
|
||||
- test
|
||||
- package
|
||||
- release
|
||||
- deploy
|
||||
|
||||
# Disable the Gradle daemon for Continuous Integration servers as correctness
|
||||
# is usually a priority over speed in CI environments. Using a fresh
|
||||
@ -75,3 +76,13 @@ release-master:
|
||||
- docker push $CONTAINER_RELEASE_IMAGE
|
||||
only:
|
||||
- master
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
before_script:
|
||||
- eval $(ssh-agent -s)
|
||||
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||
- mkdir -p ~/.ssh
|
||||
- chmod 700 ~/.ssh
|
||||
script:
|
||||
- ssh -o StrictHostKeyChecking=no -p $SSH_PORT $SSH_DESTINATION "cd $PATH_TO_APPLICATION; $UPGRADE_COMMAND;"
|
||||
|
Loading…
Reference in New Issue
Block a user