ci: switched to template
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
2717aeadde
commit
5cfcca74a7
44
.drone.yml
44
.drone.yml
@ -1,39 +1,5 @@
|
|||||||
kind: pipeline
|
kind: template
|
||||||
name: default
|
load: template.yml
|
||||||
|
data:
|
||||||
steps:
|
rust_img: "rust:1.77.2"
|
||||||
- name: test
|
rust_ver: "1.77.2"
|
||||||
image: rust:1.77.2-slim
|
|
||||||
commands:
|
|
||||||
- cargo build --verbose --all
|
|
||||||
- cargo test --verbose --all
|
|
||||||
- name: test_fmt
|
|
||||||
image: rust:1.77.2-slim
|
|
||||||
commands:
|
|
||||||
- cargo fmt -- --check
|
|
||||||
failure: ignore
|
|
||||||
- name: deploy
|
|
||||||
image: rust:1.77.2-slim
|
|
||||||
commands:
|
|
||||||
- echo "deploying staging..."
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
include: [ promote ]
|
|
||||||
target:
|
|
||||||
include: [ staging ]
|
|
||||||
depends_on:
|
|
||||||
- test
|
|
||||||
- test_fmt
|
|
||||||
|
|
||||||
- name: deploy_prod
|
|
||||||
image: rust:1.77.2-slim
|
|
||||||
commands:
|
|
||||||
- echo "deploying production..."
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
include: [ promote ]
|
|
||||||
target:
|
|
||||||
include: [ production ]
|
|
||||||
depends_on:
|
|
||||||
- test
|
|
||||||
- test_fmt
|
|
||||||
|
40
pipeline.yml
Normal file
40
pipeline.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user