Skip to content

Commit

Permalink
Merge pull request #3 from ToolSense/drone
Browse files Browse the repository at this point in the history
[add] drone config
  • Loading branch information
daddy-shark authored Jul 24, 2020
2 parents 7aa9757 + b602638 commit 65a52c1
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 19 deletions.
49 changes: 37 additions & 12 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,40 @@
workspace:
base: /go
path: src/github.com/jmccann/drone-github-comment
kind: pipeline
type: docker
name: test

pipeline:
test:
image: golang:1.8
trigger:
event:
- push
- pull_request

steps:
- name: test
pull: if-not-exists
image: golang:1.14
commands:
- go test -cover
- go test -v ./...
- go build

---
kind: pipeline
type: docker
name: deploy-prod

trigger:
event:
- tag

build:
when:
local: false
image: plugins/docker:17.05
repo: jmccann/drone-github-comment
steps:
- name: publish
pull: if-not-exists
image: plugins/gcr
settings:
registry: eu.gcr.io
repo: toolsense/drone-github-comment
storage_driver: aufs
tags:
- latest
- ${DRONE_TAG}
environment:
GOOGLE_CREDENTIALS:
from_secret: google_credentials
7 changes: 0 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ WORKDIR /go/src/github.com/jmccann/drone-github-comment
# copy sources
COPY . .

RUN go get -d -v ./...

RUN go install -v ./...

# run tests
RUN go test -v ./...

# build binary
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o "/drone-github-comment"

Expand Down

0 comments on commit 65a52c1

Please sign in to comment.