Add build pipeline
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
657143849b
commit
0694081fc9
|
@ -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
|
||||||
|
|
|
@ -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"]
|
||||||
|
|
Loading…
Reference in New Issue