Switching to Drone CI and giredore.

This commit is contained in:
Stanislav Nikitin 2019-10-12 14:26:46 +05:00
parent e042c4414f
commit 4d60a9b1b6
No known key found for this signature in database
GPG Key ID: 106900B32F8192EE
2 changed files with 46 additions and 4 deletions

42
.drone.yml Normal file
View File

@ -0,0 +1,42 @@
---
kind: pipeline
type: docker
name: build
steps:
- name: notify-start
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_secret
message: 'Starting building **{{repo.name}}#{{build.number}}@{{build.commit}}** @ {{datetime build.started "02-Jan-2006 15:04:05 MST" "Asia/Yekaterinburg"}} (See {{build.link}} for logs).'
- name: docker
image: plugins/docker
settings:
username:
from_secret: dockerhub_user
password:
from_secret: dockerhub_password
repo: pztrn/bitlbee
auto_tag: true
- name: notify-end
when:
status:
- success
- failure
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_secret
message: "
{{#success build.status}}
**{{repo.name}}#{{build.number}}@{{build.commit}}** built and pushed to hub.docker.com.
{{ else }}
**{{repo.name}}#{{build.number}}@{{build.commit}}** failed. See {{build.link}}.
{{/success}}"

View File

@ -1,16 +1,16 @@
FROM golang:1.13-alpine AS build
FROM golang:1.13.1-alpine AS build
WORKDIR /go/src/gitlab.com/pztrn/fastpastebin
WORKDIR /go/src/go.dev.pztrn.name/fastpastebin
COPY . .
WORKDIR /go/src/gitlab.com/pztrn/fastpastebin/cmd/fastpastebin
WORKDIR /go/src/go.dev.pztrn.name/fastpastebin/cmd/fastpastebin
RUN go build
FROM alpine:3.10
LABEL maintainer "Stanislav N. <pztrn@pztrn.name>"
COPY --from=build /go/src/gitlab.com/pztrn/fastpastebin/cmd/fastpastebin/fastpastebin /app/fastpastebin
COPY --from=build /go/src/go.dev.pztrn.name/fastpastebin/cmd/fastpastebin/fastpastebin /app/fastpastebin
COPY docker/fastpastebin.docker.yaml /app/fastpastebin.yaml
EXPOSE 25544