Added docker stage
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
fc3dd1435e
commit
1c0e382693
40
.drone.yml
40
.drone.yml
|
@ -13,7 +13,7 @@ steps:
|
|||
- cd ui
|
||||
- npm install
|
||||
- npm run build
|
||||
- cp -R ./build /app/dist
|
||||
- cp -R ./build /app/ui
|
||||
|
||||
|
||||
- name: test
|
||||
|
@ -23,10 +23,14 @@ steps:
|
|||
- cargo clippy
|
||||
- cargo test --all
|
||||
|
||||
|
||||
- name: binary-deploy
|
||||
image: rust:latest
|
||||
volumes:
|
||||
- name: temp
|
||||
path: /app
|
||||
commands:
|
||||
- cp -R /app/dist ./ui/build
|
||||
- cp -R /app/ui ./ui/build
|
||||
- cargo build --release
|
||||
- tar cvzf mailspy.tar.gz -C target/release mailspy
|
||||
- wget https://dl.min.io/client/mc/release/linux-amd64/mc
|
||||
|
@ -40,6 +44,38 @@ steps:
|
|||
# - staging
|
||||
# - production
|
||||
|
||||
- name: build-musl
|
||||
image: rust
|
||||
volumes:
|
||||
- name: temp
|
||||
path: /app
|
||||
commands:
|
||||
- cp -R /app/ui ./ui/build
|
||||
- rustup target add x86_64-unknown-linux-musl
|
||||
- apt update && apt install -y musl-tools musl-dev
|
||||
- update-ca-certificates
|
||||
- cargo build --target x86_64-unknown-linux-musl --release
|
||||
- mkdir /app/build
|
||||
- cp target/x86_64-unknown-linux-musl/release/mailspy /app/build/mailspy
|
||||
|
||||
- name: stage-deploy
|
||||
image: plugins/docker
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: temp
|
||||
path: /app
|
||||
settings:
|
||||
username:
|
||||
from_secret: CONTAINER_USER
|
||||
password:
|
||||
from_secret: CONTAINER_PASSWORD
|
||||
registry: git.5sigma.io
|
||||
context: /app/build
|
||||
repo: git.5sigma.io/mailspy/mailspy
|
||||
tags: latest
|
||||
|
||||
|
||||
|
||||
volumes:
|
||||
- name: temp
|
||||
temp: {}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
FROM alpine:latest
|
||||
COPY mailspy /app/mailspy
|
||||
EXPOSE 8089
|
||||
WORKDIR app
|
||||
EXPOSE 7777
|
||||
EXPOSE 7778
|
||||
CMD ./mailspy
|
Loading…
Reference in New Issue