-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
105 lines (98 loc) · 3.48 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
workspace:
base: /go
path: src/git.xfyun.cn/AIaaS/webgate-aipaas
pipeline:
# code_analysis:
# image: 172.16.59.153/xfyun/drone-sonar:20190113
# commands:
# - go_sonar --help
# - go_sonar ${DRONE_REPO} vendor/\**,aclient_example/\**,tests/\**,auth/\**,benchmark/\**,*/*_test.go
# when:
# event: push
build:
image: artifacts.iflytek.com/docker-private/golang:1.16.4
commands:
- pwd && ls
#- go mod init "git.xfyun.cn/AIaaS/webgate-ws"
# - go build -v -mod=vendor
- go version
- export GOPATH=/go
- export GOPROXY=https://goproxy.cn
- go build -v -o webgate-aipaas
# - go build -v -o webgate-http-aipaas -tags phttp
publish_server_ws:
image: plugins/docker
secrets: [ docker_username,docker_password ]
registry: artifacts.iflytek.com
repo: artifacts.iflytek.com/docker-private/opensource/webgate-open
tags:
- latest
dockerfile: Dockerfile
insecure: true
when:
event: push
publish_release_ws:
image: plugins/docker
secrets: [ docker_username,docker_password ]
registry: hub.iflytek.com
repo: artifacts.iflytek.com/docker-private/opensource/webgate-open
tags: [ "${DRONE_TAG}" ]
dockerfile: Dockerfile
insecure: true
when:
event: tag
# publish_server_http:
# image: plugins/docker
# secrets: [ docker_username,docker_password ]
# registry: hub.iflytek.com
# repo: hub.iflytek.com/aiaas/webgate-http-aipaas
# tags:
# - latest
# dockerfile: Dockerfile_http
# insecure: true
# when:
# event: push
#
#
# publish_release_http:
# image: plugins/docker
# secrets: [ docker_username,docker_password ]
# registry: hub.iflytek.com
# repo: hub.iflytek.com/aiaas/webgate-http-aipaas
# tags: [ "${DRONE_TAG}" ]
# dockerfile: Dockerfile_http
# insecure: true
# when:
# event: tag
# deploy_dev:
# image: hub.xfyun.cn/yqzhang9/kubectl:test
# commands:
# - mkdir -p /root/.kube && cp kube/config-dev /root/.kube/config
# #- sed -i "s/\$DRONE_TAG/${DRONE_COMMIT}/g" deployment.yml
# #- sed -i "s/\$DRONE_TAG/${DRONE_COMMIT}/g" deployment.yml
# # - sed -i "s/\$NAMESPACE/webgate-ws-test/g" deployment.yml
# - kubectl delete -f deployment.yml || true
# - sleep 5
# - kubectl apply -f deployment.yml
# - sleep 60
# bvt_dev:
# image: 172.16.59.153/aiaas/webgate-bvt:025c3dd846541bec0d4e9158f4b4f541cd510422
# commands:
# - cd /opt/bvt
# - pwd && ls
# - ./iatbvt -url ws://10.1.87.70:8000/v2/iat -key 88c3834437402ae1e88d9b95fd4146c4 -secret 7lkm0gQKVEn7g94azteEhhy8EH4gqimY -appid igrdail
#
# autokit_result:
# image: 172.16.59.153/xfyun/devops-golang:iflytek
# commands:
# - autobvt2 ${DRONE_REPO} ${DRONE_BUILD_NUMBER} ${DRONE_COMMIT_AUTHOR} ${DRONE_BUILD_LINK}
# - autokit ${DRONE_REPO_NAME} ${DRONE_REPO_NAME} ${DRONE_COMMIT_AUTHOR} ${DRONE_BUILD_CREATED} ${DRONE_BUILD_LINK} ${DRONE_PREV_BUILD_STATUS}
# when:
# status: [ success, failure ]
#
# report_result:
# image: 172.16.59.153/xfyun/devops-golang:iflytek
# commands:
# - report_email [email protected] ${DRONE_REPO} ${DRONE_BUILD_NUMBER} ${DRONE_COMMIT} ${DRONE_BUILD_LINK}
# when:
# status: [ success, failure ]