From 4d60a9b1b6727d8e0abac5c082070506033c261a Mon Sep 17 00:00:00 2001 From: "Stanislav N. aka pztrn" Date: Sat, 12 Oct 2019 14:26:46 +0500 Subject: [PATCH] Switching to Drone CI and giredore. --- .drone.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 8 ++++---- 2 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..081b661 --- /dev/null +++ b/.drone.yml @@ -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}}" \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 8054cd3..6b093d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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. " -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