forked from mootdx/mootdx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
158 lines (150 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
---
kind: pipeline
type: docker
name: default
steps:
- name: test
image: mootdx:squash
commands:
- pytest -v tests
- name: pypi_publish
image: plugins/pypi
settings:
username: john
password: secret
- name: dingtalk
image: lddsb/drone-dingtalk-message
settings:
token: your-dingtalk-robot-access-token
type: markdown
- name: deploy
image: drillster/drone-rsync
settings:
hosts: [ "server-prod1", "server-prod2" ]
source: ./target
target: ~/packages
include: [ "app.jar", "app.jar.md5" ]
script:
- cd ~/packages
- md5sum -c app.jar.md5
# https://plugins.drone.io/plugins/git-push
# - name: push_github
# image: appleboy/drone-git-push'
# settings:
# branch: develop
# remote: [email protected]:mootdx/mootdx.git
# force: false
# commit: false
# ssh_key:
# from_secret: ssh_key
# - name: push
# image: appleboy/drone-git-push'
# settings:
# branch: develop
# remote: [email protected]:ibopo/mootdx.git
# force: false
# commit: true
# ssh_key:
# from_secret: ssh_key
# https://plugins.drone.io/plugins/github-release
# - name: publish
# image: plugins/github-release
# settings:
# api_key:
# from_secret: github_apikey
# files: dist/*
# when:
# event:
# - promote
# target:
# - production
# # https://plugins.drone.io/plugins/dingtalk-message
# - name: dingtalk
# image: lddsb/drone-dingtalk-message
# settings:
# token:
# from_secret: dingtalk_token
# type: markdown
# when:
# event:
# - promote
# target:
# - production
#
# # https://plugins.drone.io/plugins/ssh
# - name: ssh
# image: appleboy/drone-ssh
# settings:
# host:
# - example1.com
# - example2.com
# username: ubuntu
# password:
# from_secret: ssh_password
# port: 22
# command_timeout: 2m
# script:
# - echo "Hello World"
# when:
# event:
# - promote
# target:
# - production
#
# # https://plugins.drone.io/plugins/pypi
# - name: pypi
# image: plugins/pypi
# settings:
# username: __token__
# password:
# from_secret: pypi_password
# when:
# event:
# - promote
# target:
# - production
#
# # https://plugins.drone.io/plugins/ansible
# - name: check ansible syntax
# image: plugins/ansible:3
# settings:
# playbook: ansible/playbook.yml
# galaxy: ansible/requirements.yml
# inventory: ansible/inventory
# syntax_check: true
# when:
# event:
# - promote
# target:
# - production
#
# - name: sync
# image: mootdx:ci
# environment:
# SSH_KEY:
# from_secret: ssh_key
# commands:
# - echo "$SSH_KEY" > ~/.ssh/id_rsa
# - git remote add github [email protected]:mootdx/mootdx.git
# - git remote add gitee [email protected]:ibopo/mootdx.git
# - git checkout develop
# - git pull gitee develop
# - git push gitee develop
# - git pull github develop
# - git push github develop
#
# - name: publish
# image: mootdx:ci
# environment:
# USERNAME:
# from_secret: username
# PASSWORD:
# from_secret: password
# commands:
# - make history USERNAME=$USERNAME PASSWORD=$PASSWORD
# - make publish USERNAME=$USERNAME PASSWORD=$PASSWORD
# when:
# event:
# - promote
# target:
# - production