-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdeploy.yml
More file actions
46 lines (37 loc) · 1.48 KB
/
deploy.yml
File metadata and controls
46 lines (37 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
platform: linux
image_resource:
type: registry-image
source:
repository: alpine
tag: 3
inputs:
- name: repo-liquidity-provider-server-testnet
outputs:
- name: out
params:
SSH_DEPLOY_KEY: ((ssh-deploy))
FLYOVER_SSH_KEY: ((ssh-ro-spoof-fling))
run:
path: sh
args:
- -ceux
- |
ssh_deploy_keyfile=$(pwd)/ssh_deploy_key
flyover_ssh_keyfile=$(pwd)/flyover_ssh_key
out_message_file=$(pwd)/out/message.txt
echo "Liquidity-provider-server deployment to testnet" > $out_message_file
umask 077
echo "$SSH_DEPLOY_KEY" > $ssh_deploy_keyfile
echo "$FLYOVER_SSH_KEY" > $flyover_ssh_keyfile
umask 022
apk add -q --no-progress openssh ansible gnupg git
eval $(ssh-agent)
ssh-add $ssh_deploy_keyfile $flyover_ssh_keyfile
mkdir ~/.ssh/
touch ~/.ssh/known_hosts
ssh-keyscan flyover-01-testnet.aws-us-east-1.testnet.flyover.rif.technology >> ~/.ssh/known_hosts
ssh -o "StrictHostKeyChecking=no" -A ubuntu@flyover-01-testnet.aws-us-east-1.testnet.flyover.rif.technology sh -s << EOF
cd /home/ubuntu/flyover-deploy/docker-compose && git pull origin Stable-Test && docker system prune -f && docker-compose -f docker-compose.yml -f loki-testnet.yml --env-file .env.testnet build --no-cache && docker-compose -f docker-compose.yml -f loki-testnet.yml --env-file .env.testnet up --force-recreate -d
EOF
echo "Flyover Testnet server: deployment complete" > $out_message_file