-
Notifications
You must be signed in to change notification settings - Fork 29
/
.drone.ci.yml
68 lines (58 loc) · 1.17 KB
/
.drone.ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# This file is used for running on CI server
# Need to keep this in sync with .drone.yml
#
kind: pipeline
type: docker
name: default-amd64
platform:
os: linux
arch: amd64
trigger:
branch:
- main
workspace:
base: /go
path: src/github.com/leodotcloud/swiss-army-knife
steps:
- name: version
image: golang:1.13.9-buster
commands:
- ./scripts/version
- name: lint
image: golangci/golangci-lint:v1.24.0
commands:
- ./scripts/lint
- name: test
image: golang:1.13.9-buster
environment:
CGO_ENABLED: 0
GOFLAGS: -mod=vendor
commands:
- . ./version.env
- ./scripts/test
- name: build
image: golang:1.13.9-buster
environment:
CGO_ENABLED: 0
GOFLAGS: -mod=vendor
commands:
- . ./version.env
- ./scripts/build
- name: publish
image: plugins/docker
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
repo: leodotcloud/swiss-army-knife
dockerfile: package/Dockerfile
tags:
- latest
- ${DRONE_TAG}
when:
branch:
- main
event:
- tag