drone-ci-golang/.drone.yml

33 lines
651 B
YAML
Raw Normal View History

2020-01-07 08:56:43 +08:00
kind: pipeline
name: default
steps:
- name: linter
image: golang:latest
commands:
- go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
- golangci-lint run
- name: build
image: golang:latest
environment:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
commands:
- go build -o demo-app
- name: docker
image: plugins/docker
settings:
registry: docker.gitee.ltd
repo: docker.gitee.ltd/lxh/golang-demo
use_cache: true
username: docker
password: dockeruser
tags:
- latest
- 0.0.1
when:
event: push
branch: master