Added promotion requirement for builds
This commit is contained in:
parent
6e678779f9
commit
e2fa2d0a6c
47
.drone.yml
47
.drone.yml
|
@ -2,6 +2,13 @@ kind: pipeline
|
|||
name: default
|
||||
|
||||
steps:
|
||||
- name: test
|
||||
image: rust:latest
|
||||
commands:
|
||||
- rustup component add clippy
|
||||
- cargo clippy
|
||||
- cargo test --all
|
||||
|
||||
- name: build-ui
|
||||
image: node:18.9.1-slim
|
||||
volumes:
|
||||
|
@ -14,15 +21,12 @@ steps:
|
|||
- npm install
|
||||
- npm run build
|
||||
- cp -R ./build /app/ui
|
||||
|
||||
|
||||
- name: test
|
||||
image: rust:latest
|
||||
commands:
|
||||
- rustup component add clippy
|
||||
- cargo clippy
|
||||
- cargo test --all
|
||||
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- staging
|
||||
- production
|
||||
|
||||
- name: binary-deploy
|
||||
image: rust:latest
|
||||
|
@ -38,12 +42,12 @@ steps:
|
|||
- chmod +x mc
|
||||
- ./mc alias set fivesigma https://objects.5sigma.io $MINIOID $MINIOSECRET
|
||||
- ./mc cp mailspy.tar.gz fivesigma/public/mailspy.tar.gz
|
||||
# when:
|
||||
# event:
|
||||
# - promote
|
||||
# target:
|
||||
# - staging
|
||||
# - production
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- staging
|
||||
- production
|
||||
|
||||
- name: build-musl
|
||||
image: rust
|
||||
|
@ -59,6 +63,12 @@ steps:
|
|||
- cargo build --target x86_64-unknown-linux-musl --release
|
||||
- mkdir /app/build
|
||||
- cp target/x86_64-unknown-linux-musl/release/mailspy /app/build/mailspy
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- staging
|
||||
- production
|
||||
|
||||
- name: stage-deploy
|
||||
image: plugins/docker
|
||||
|
@ -76,7 +86,12 @@ steps:
|
|||
context: /app/build
|
||||
repo: git.5sigma.io/mailspy/mailspy
|
||||
tags: latest
|
||||
|
||||
when:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- staging
|
||||
- production
|
||||
|
||||
|
||||
volumes:
|
||||
|
|
Loading…
Reference in New Issue