--- kind: pipeline type: docker name: default platform: os: "linux" arch: "arm" steps: - name: "deps" image: "rust:1.49" volumes: - name: "cache" path: "/.target" commands: - "apt-get update" - "apt-get install -yqq musl-tools make" - "rustup target add armv7-unknown-linux-musleabihf" - "cargo check" - "cargo test" - "cargo build --release --target=armv7-unknown-linux-musleabihf" - name: "check" image: "rust:1.49" depends_on: - "deps" volumes: - name: "cache" path: "/.target" commands: - "cargo check" - name: "test" image: "rust:1.49" depends_on: - "deps" volumes: - name: "cache" path: "/.target" commands: - "cargo test" - name: "deploy" image: "rust:1.49" depends_on: - "check" - "test" environment: SSH_PK: from_secret: SSH_PRIVATE_KEY SSH_PARAMS: '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known_hosts' TARGET_DIR: "./.target/armv7-unknown-linux-musleabihf/release" commands: - "mkdir /tmp/ssh 2>&1" - "echo -n ${SSH_PK} | base64 -d > /tmp/ssh/deploy_key " - "eval $(ssh-agent -s)" - "chmod 600 /tmp/ssh/deploy_key" - "ssh-add /tmp/ssh/deploy_key" - "scp ${SSH_PARAMS} ${TARGET_DIR}/alterego ${SSH_USER}@${SSH_HOST}:/home/pi/alterego" volumes: - name: "cache" temp: {}