forked from codestation/drone-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
54 lines (49 loc) · 1.18 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
---
kind: pipeline
name: default
type: docker
platform:
os: linux
arch: arm64
steps:
- name: lint
image: golangci/golangci-lint:v1.45.2
commands:
- golangci-lint run --no-config -v --timeout 10m ./...
- name: test
image: golang:1.18
commands:
- go test -coverprofile cover.out -v ./...
- go tool cover -func cover.out
environment:
GOPROXY:
from_secret: goproxy_url
- name: build
image: registry.megpoid.xyz/drone-stack
settings:
cache:
- registry.megpoid.xyz/drone-stack:${DRONE_BRANCH}-cache
repos:
- registry.megpoid.xyz/drone-stack
- codestation/drone-stack
tags: latest
registry: registry.megpoid.xyz
platforms:
- linux/amd64
- linux/arm64
buildkit: true
build_args:
- CI_COMMIT_TAG=${DRONE_TAG}
- CI_COMMIT_BRANCH=${DRONE_BRANCH}
- CI_COMMIT_SHA=${DRONE_COMMIT_SHA}
- CI_PIPELINE_CREATED_AT=${DRONE_BUILD_CREATED}
username:
from_secret: docker_username
password:
from_secret: docker_password
environment:
GOPROXY:
from_secret: goproxy_url
trigger:
branch:
- master