forked from labring/sealos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
56 lines (51 loc) · 1.51 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
kind: pipeline
name: default
workspace:
base: /go
path: src/github.com/fanux/sealos
# go mod vender
#environment:
# GO111MODULE: on
steps:
- name: build
image: golang:1.15.2-alpine
commands:
- go build -o sealos -ldflags "-s -w -X github.com/fanux/sealos/version.Version=${DRONE_TAG=latest}" main.go
- apk add --update upx && upx /go/src/github.com/fanux/sealos/sealos
- echo "wget -c https://github.com/fanux/sealos/releases/download/${DRONE_TAG=latest}/sealos && chmod +x sealos && mv sealos /usr/bin " > Note.md
- echo "[oss 下载地址](https://sealyun.oss-cn-beijing.aliyuncs.com/${DRONE_TAG=latest}/sealos)" >> Note.md
- echo "[latest 版本 oss下载地址](https://sealyun.oss-cn-beijing.aliyuncs.com/latest/sealos)" >> Note.md
- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: git-release-token
files: sealos
title: ${DRONE_TAG}
note: Note.md
when:
event:
- tag
#- name: publish-oss
# image: fanux/ossutil
# environment:
# OSS_CONFIG:
# from_secret: oss-config
# commands:
# - echo $OSS_CONFIG |base64 --decode >> .ossutilconfig
# - tar zcvf sealos.tar.gz sealos
# - ossutil64 -c .ossutilconfig cp sealos.tar.gz oss://sealyun/${DRONE_TAG=latest}/sealos.tar.gz
# when:
# event:
# - tag
# 42 is the build number
# drone build promote fanux/sealos 42 test
- name: e2etest
image: golang:1.12
commands:
- echo "this is sealos test"
when:
event:
- promote
target:
- test