97 lines
1.8 KiB
YAML
97 lines
1.8 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
platform:
|
|
os: linux
|
|
arch: arm
|
|
|
|
steps:
|
|
- name: validate
|
|
image: rust:1.49
|
|
commands:
|
|
- cargo test --release --target=armv7-unknown-linux-gnueabihf
|
|
environment:
|
|
APP_NAME: deploytest
|
|
CARGO_TARGET_DIR: /cache/target
|
|
volumes:
|
|
- name: cargo
|
|
path: /usr/local/cargo
|
|
- name: target
|
|
path: /cache/target
|
|
- name: rustup
|
|
path: /usr/local/rustup
|
|
|
|
- name: test
|
|
image: rust:1.49
|
|
commands:
|
|
- cargo test --release --target=armv7-unknown-linux-gnueabihf
|
|
environment:
|
|
APP_NAME: deploytest
|
|
CARGO_TARGET_DIR: /cache/target
|
|
volumes:
|
|
- name: cargo
|
|
path: /usr/local/cargo
|
|
- name: target
|
|
path: /cache/target
|
|
- name: rustup
|
|
path: /usr/local/rustup
|
|
depends_on:
|
|
- validate
|
|
|
|
- name: build
|
|
image: rust:1.49
|
|
commands:
|
|
- cargo build --release --target=armv7-unknown-linux-gnueabihf
|
|
environment:
|
|
APP_NAME: deploytest
|
|
CARGO_TARGET_DIR: /cache/target
|
|
volumes:
|
|
- name: cargo
|
|
path: /usr/local/cargo
|
|
- name: target
|
|
path: /cache/target
|
|
- name: rustup
|
|
path: /usr/local/rustup
|
|
depends_on:
|
|
- test
|
|
|
|
- name: deploy
|
|
image: rust:1.49
|
|
commands:
|
|
- sh scripts/deploy.sh
|
|
environment:
|
|
APP_NAME: deploytest
|
|
CARGO_TARGET_DIR: /cache/target
|
|
SSH_PRIVATE_KEY:
|
|
from_secret: ssh_pk_base64
|
|
SSH_USER:
|
|
from_secret: SSH_USER
|
|
TARGET_DIR: /cache/target/armv7-unknown-linux-gnueabihf/release
|
|
volumes:
|
|
- name: cargo
|
|
path: /usr/local/cargo
|
|
- name: target
|
|
path: /cache/target
|
|
- name: rustup
|
|
path: /usr/local/rustup
|
|
depends_on:
|
|
- build
|
|
|
|
volumes:
|
|
- name: target
|
|
temp: {}
|
|
- name: cargo
|
|
host:
|
|
path: /home/pi/.cargo
|
|
- name: rustup
|
|
host:
|
|
path: /home/pi/.rustup
|
|
|
|
---
|
|
kind: signature
|
|
hmac: 5d42ee9863b09aa2c5b1140903b659ec25660acdab89f20a6d070c30d46898b0
|
|
|
|
...
|