forked from leodotcloud/swiss-army-knife
-
Notifications
You must be signed in to change notification settings - Fork 98
/
.drone.yml
76 lines (67 loc) · 1.44 KB
/
.drone.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
68
69
70
71
72
73
74
75
76
#
# This file is used for local development/builds
# Need to keep this in sync with .drone.ci.yml
#
kind: pipeline
name: default-linux-amd64
platform:
os: linux
arch: amd64
workspace:
base: /go
path: src/github.com/leodotcloud/swiss-army-knife
volumes:
- name: docker
host:
path: /var/lib/docker
- name: docker_socket
host:
path: /var/run/docker.sock
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
volumes:
- name: docker
path: /var/lib/docker
- name: docker_socket
path: /var/run/docker.sock
settings:
username:
from_secret: docker_username
password:
from_secret: docker_password
repo: rancherlabs/swiss-army-knife
tags:
- ${DRONE_BUILD_NUMBER}
- ${DRONE_COMMIT_BRANCH}
- latest
dockerfile: package/Dockerfile
when:
branch: master
event:
include:
- push