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 name: default
steps: steps:
- name: test
image: rust:latest
commands:
- rustup component add clippy
- cargo clippy
- cargo test --all
- name: build-ui - name: build-ui
image: node:18.9.1-slim image: node:18.9.1-slim
volumes: volumes:
@ -14,15 +21,12 @@ steps:
- npm install - npm install
- npm run build - npm run build
- cp -R ./build /app/ui - cp -R ./build /app/ui
when:
event:
- name: test - promote
image: rust:latest target:
commands: - staging
- rustup component add clippy - production
- cargo clippy
- cargo test --all
- name: binary-deploy - name: binary-deploy
image: rust:latest image: rust:latest
@ -38,12 +42,12 @@ steps:
- chmod +x mc - chmod +x mc
- ./mc alias set fivesigma https://objects.5sigma.io $MINIOID $MINIOSECRET - ./mc alias set fivesigma https://objects.5sigma.io $MINIOID $MINIOSECRET
- ./mc cp mailspy.tar.gz fivesigma/public/mailspy.tar.gz - ./mc cp mailspy.tar.gz fivesigma/public/mailspy.tar.gz
# when: when:
# event: event:
# - promote - promote
# target: target:
# - staging - staging
# - production - production
- name: build-musl - name: build-musl
image: rust image: rust
@ -59,6 +63,12 @@ steps:
- cargo build --target x86_64-unknown-linux-musl --release - cargo build --target x86_64-unknown-linux-musl --release
- mkdir /app/build - mkdir /app/build
- cp target/x86_64-unknown-linux-musl/release/mailspy /app/build/mailspy - cp target/x86_64-unknown-linux-musl/release/mailspy /app/build/mailspy
when:
event:
- promote
target:
- staging
- production
- name: stage-deploy - name: stage-deploy
image: plugins/docker image: plugins/docker
@ -76,7 +86,12 @@ steps:
context: /app/build context: /app/build
repo: git.5sigma.io/mailspy/mailspy repo: git.5sigma.io/mailspy/mailspy
tags: latest tags: latest
when:
event:
- promote
target:
- staging
- production
volumes: volumes: