merging remote
This commit is contained in:
commit
b254d8f477
@ -47,7 +47,7 @@ deploy:
|
|||||||
- docker
|
- docker
|
||||||
environment:
|
environment:
|
||||||
name: Production
|
name: Production
|
||||||
url: "$Live_Server_IP"
|
url: "$LIVE_SERVER_FQDN"
|
||||||
before_script:
|
before_script:
|
||||||
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y)'
|
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y)'
|
||||||
- eval $(ssh-agent -s)
|
- eval $(ssh-agent -s)
|
||||||
@ -56,4 +56,5 @@ deploy:
|
|||||||
- chmod 700 ~/.ssh
|
- chmod 700 ~/.ssh
|
||||||
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config'
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config'
|
||||||
script:
|
script:
|
||||||
- ssh -J "$Live_Server_User"@"$Live_Server_IP" "$Live_Server_User"@"$Live_Server_Target" "echo -e 'dev:\n image: \'$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\'\n restart: always\n ports:\n - \'8090:5000\'\n only:\n - master' > docker-compose.yml && docker-compose up -d --remove-orphans --force-recreate"
|
- echo 'sed 's/"$CI_REGISTRY_IMAGE".*/"$CI_REGISTRY_IMAGE":"$CI_COMMIT_SHA"''
|
||||||
|
- ssh -J "$PROD_SERVER_USER"@"$LIVE_SERVER_FQDN" "$PROD_SERVER_USER"@"$PROD_SERVER_LOCAL_HOST_NAME" "cd simple-blog-api && sed -i 's/simple-blog-api.*/simple-blog-api:"$CI_COMMIT_SHA"\x27/' docker-compose.yml && docker-compose up -d --remove-orphans --force-recreate"
|
||||||
|
|||||||
Reference in New Issue
Block a user