Skip to content

Instantly share code, notes, and snippets.

@Depado
Created July 3, 2018 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Depado/084edc64a34e8c4c275dbfbc27a2d60a to your computer and use it in GitHub Desktop.
Save Depado/084edc64a34e8c4c275dbfbc27a2d60a to your computer and use it in GitHub Desktop.
workspace:
base: /go
path: src/github.com/Depado/dummy
pipeline:
prerequisites:
image: "golang:latest"
commands:
- go version
- go get -u github.com/golang/dep/cmd/dep
- dep ensure -vendor-only
linter:
image: "golang:latest"
commands:
- go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
- golangci-lint run
build:
image: "golang:latest"
commands:
- go build
gcr:
image: plugins/gcr
repo: project-id/dummy
tags:
- latest
- "${DRONE_COMMIT_SHA}"
secrets: [google_credentials]
when:
event: push
branch: master
tagged_gcr:
image: plugins/gcr
repo: project-id/dummy
tags:
- "${DRONE_TAG##v}"
- "${DRONE_COMMIT_SHA}"
- latest
secrets: [google_credentials]
when:
event: tag
branch: master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment