1
0
Fork 0

Initial CI
continuous-integration/drone/push Build is failing Details

main
Ambrose Chua 2020-06-13 16:04:33 +08:00
parent 0ad912fab4
commit 25fa08c6dd
Signed by: ambrose
GPG Key ID: BC367D33F140B5C2
2 changed files with 73 additions and 0 deletions

56
build/drone.yml Normal file
View File

@ -0,0 +1,56 @@
kind: pipeline
type: docker
name: control
steps:
- name: docker
image: plugins/docker
settings:
dockerfile: build/control/Dockerfile
registry: registry.makerforce.io
repo: registry.makerforce.io/photos/control
tags:
- latest
username:
from_secret: docker_username
password:
from_secret: docker_password
---
kind: pipeline
type: docker
name: preview
steps:
- name: docker
image: plugins/docker
settings:
dockerfile: build/proxy/Dockerfile
registry: registry.makerforce.io
repo: registry.makerforce.io/photos/preview
tags:
- latest
username:
from_secret: docker_username
password:
from_secret: docker_password
---
kind: pipeline
type: docker
name: proxy
steps:
- name: docker
image: plugins/docker
settings:
dockerfile: build/proxy/Dockerfile
registry: registry.makerforce.io
repo: registry.makerforce.io/photos/proxy
tags:
- latest
username:
from_secret: docker_username
password:
from_secret: docker_password

17
build/proxy/Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM golang:latest AS build
RUN mkdir /src /dist
WORKDIR /src
COPY . ./
WORKDIR /src/cmd/proxy/
ENV CGO_ENABLED=0
RUN go build -o /dist/proxy
FROM scratch
COPY --from=build /dist/proxy /proxy
ENTRYPOINT ["/proxy"]