Added deploy phase to gitlab ci
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
a028dab281
commit
7bda3392e9
@ -7,6 +7,7 @@ stages:
|
|||||||
- test
|
- test
|
||||||
- package
|
- package
|
||||||
- release
|
- release
|
||||||
|
- deploy
|
||||||
|
|
||||||
# Disable the Gradle daemon for Continuous Integration servers as correctness
|
# Disable the Gradle daemon for Continuous Integration servers as correctness
|
||||||
# is usually a priority over speed in CI environments. Using a fresh
|
# is usually a priority over speed in CI environments. Using a fresh
|
||||||
@ -75,3 +76,12 @@ release-master:
|
|||||||
- docker push $CONTAINER_RELEASE_IMAGE
|
- docker push $CONTAINER_RELEASE_IMAGE
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
stage: deploy
|
||||||
|
before_script:
|
||||||
|
- 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