Added promotion requirement for builds
continuous-integration/drone/push Build is failing Details
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
Joe Bellus 2022-09-28 13:40:33 -04:00
parent 6e678779f9
commit e2fa2d0a6c
1 changed files with 31 additions and 16 deletions

View File

@ -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: