1
0
Fork 0

Add build pipeline
continuous-integration/drone/push Build is passing Details

master
Ambrose Chua 2019-08-04 03:18:01 +08:00
parent 657143849b
commit 0694081fc9
Signed by: ambrose
GPG Key ID: B34FBE029276BA5D
2 changed files with 47 additions and 0 deletions

16
.drone.yml Normal file
View File

@ -0,0 +1,16 @@
kind: pipeline
name: default
steps:
- name: docker
image: plugins/docker
settings:
registry: registry.makerforce.io
repo: registry.makerforce.io/pwd/paste
tags:
- latest
username:
from_secret: docker_username
password:
from_secret: docker_password

31
Dockerfile Executable file
View File

@ -0,0 +1,31 @@
FROM rustlang/rust:nightly as build
# args
ARG version="0.1.0"
ARG repo="github.com/productionwentdown/paste"
# source
COPY . .
# build
RUN cargo build --release
RUN cp target/release/paste /paste
FROM scratch
ARG version
# labels
LABEL org.label-schema.vcs-url="https://github.com/productionwentdown/paste"
LABEL org.label-schema.version=${version}
LABEL org.label-schema.schema-version="1.0"
# copy binary and ca certs
COPY --from=build /paste /paste
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
EXPOSE 8000
ENTRYPOINT ["/paste"]