more fixes.

This commit is contained in:
2021-01-09 11:39:27 +03:00
parent 53b8a0bf18
commit e120989e5c

View File

@ -13,7 +13,7 @@ steps:
image: "rust:1.49" image: "rust:1.49"
volumes: volumes:
- name: "cache" - name: "cache"
path: "/.target" path: "./target"
commands: commands:
- "apt-get update && apt-get install -yqq musl-tools" - "apt-get update && apt-get install -yqq musl-tools"
- "rustup target add armv7-unknown-linux-musleabihf" - "rustup target add armv7-unknown-linux-musleabihf"
@ -26,16 +26,15 @@ steps:
depends_on: depends_on:
- "validate" - "validate"
environment: environment:
SSH_PK: SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY from_secret: SSH_PRIVATE_KEY
SSH_PARAMS: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known_hosts' SSH_PARAMS: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known_hosts'
TARGET_DIR: "./.target/armv7-unknown-linux-musleabihf/release" TARGET_DIR: "./.target/armv7-unknown-linux-musleabihf/release"
commands: commands:
- "mkdir /tmp/ssh 2>&1" # Start the SSH Agent and insert ssh private key.
- "echo -n ${SSH_PK} | base64 -d > /tmp/ssh/deploy_key "
- "eval $(ssh-agent -s)" - "eval $(ssh-agent -s)"
- "chmod 600 /tmp/ssh/deploy_key" - "echo '${SSH_PRIVATE_KEY}' | tr -d '\r' | ssh-add -"
- "ssh-add /tmp/ssh/deploy_key" # Copy the binary file to it.
- "scp ${SSH_PARAMS} ${TARGET_DIR}/alterego ${SSH_USER}@${SSH_HOST}:/home/pi/alterego" - "scp ${SSH_PARAMS} ${TARGET_DIR}/alterego ${SSH_USER}@${SSH_HOST}:/home/pi/alterego"
volumes: volumes: