40 lines
739 B
YAML
40 lines
739 B
YAML
|
kind: pipeline
|
||
|
name: default
|
||
|
|
||
|
steps:
|
||
|
- name: test
|
||
|
image: rust:{{ .input.rust_ver }}
|
||
|
commands:
|
||
|
- cargo build --verbose --all
|
||
|
- cargo test --verbose --all
|
||
|
- name: test_fmt
|
||
|
image: rustdocker/rustfmt:{{ .input.rust_ver }}
|
||
|
commands:
|
||
|
- cargo fmt -- --check
|
||
|
failure: ignore
|
||
|
- name: deploy
|
||
|
image: rust:{{ .input.rust_ver }}
|
||
|
commands:
|
||
|
- echo "deploying staging..."
|
||
|
when:
|
||
|
event:
|
||
|
include: [ promote ]
|
||
|
target:
|
||
|
include: [ staging ]
|
||
|
depends_on:
|
||
|
- test
|
||
|
- test_fmt
|
||
|
|
||
|
- name: deploy_prod
|
||
|
image: rust:{{ .input.rust_ver }}
|
||
|
commands:
|
||
|
- echo "deploying production..."
|
||
|
when:
|
||
|
event:
|
||
|
include: [ promote ]
|
||
|
target:
|
||
|
include: [ production ]
|
||
|
depends_on:
|
||
|
- test
|
||
|
- test_fmt
|