forked from sartura/replica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
221 lines (183 loc) · 5.08 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
---
kind: pipeline
type: exec
name: replica.one
clone:
depth: 25
steps:
- name: submodules
commands:
- git submodule update --init --recursive --depth 25
- name: makeDirectoryStructure
commands:
- echo $${DRONE_BRANCH} | iconv -t ascii//TRANSLIT | sed -r s/[~\^]+//g | sed -r s/[^a-zA-Z0-9]+/-/g | sed -r s/^-+\|-+$//g | tr A-Z a-z > branchName
- mkdir $(cat branchName)
- date '+%Y-%m-%d' > dateDirectory
# Build templates
- name: buildTemplate
nodeinfo: &buildTemplate
environment:
CTARGET: architecture
target: target
commands:
- make V=1 J=$(($(nproc) + 1)) package_$${target}
- mkdir -p ./$(cat branchName)/$${target}/$(cat dateDirectory)
- mv ./output/* ./$(cat branchName)/$${target}/$(cat dateDirectory)
- name: buildTemplateNoOutput
nodeinfo: &buildTemplateNoOutput
environment:
CTARGET: architecture
target: target
commands:
- make V=1 J=$(($(nproc) + 1)) package_$${target}
# Toolchain targets
- name: arm:toolchain
<<: *buildTemplate
environment:
CTARGET: armv7a-unknown-linux-gnueabihf
target: toolchain
- name: arm64:toolchain
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-gnu
target: toolchain
- name: amd64:toolchain
<<: *buildTemplate
environment:
CTARGET: x86_64-multilib-linux-gnu
target: toolchain
- name: arm-musl:toolchain
<<: *buildTemplate
environment:
CTARGET: armv7a-unknown-linux-musleabihf
target: toolchain
- name: arm64-musl:toolchain
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-musl
target: toolchain
- name: amd64-musl:toolchain
<<: *buildTemplate
environment:
CTARGET: x86_64-multilib-linux-musl
target: toolchain
# Device targets
- name: arm64:tn48m
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-gnu
target: tn48m
- name: arm64:tn4810m
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-gnu
target: tn4810m
- name: arm64:tx4810
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-gnu
target: tx4810
- name: arm64:as5114-48x
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-gnu
target: as5114-48x
- name: arm64:rpi4:gentoo
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-gnu
target: rpi4
- name: arm64:rpi4:debian
<<: *buildTemplate
environment:
TARGET_DISTRO: debian
CTARGET: aarch64-unknown-linux-gnu
target: rpi4
- name: amd64:sn2010
<<: *buildTemplate
environment:
CTARGET: x86_64-multilib-linux-gnu
target: sn2010
- name: arm:ecw5211-l-t
<<: *buildTemplate
environment:
CTARGET: armv7a-unknown-linux-gnueabihf
target: ecw5211-l-t
- name: arm64:methode-udpu
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-gnu
target: methode-udpu
# Generic targets
- name: arm:vmlinux
<<: *buildTemplate
environment:
CTARGET: armv7a-unknown-linux-gnueabihf
target: vmlinux
- name: arm64:vmlinux
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-gnu
target: vmlinux
- name: amd64:vmlinux
<<: *buildTemplate
environment:
CTARGET: x86_64-multilib-linux-gnu
target: vmlinux
# System targets
- name: arm:system
<<: *buildTemplateNoOutput
environment:
CTARGET: armv7a-unknown-linux-gnueabihf
target: system
- name: arm64:system
<<: *buildTemplateNoOutput
environment:
CTARGET: aarch64-unknown-linux-gnu
target: system
- name: amd64:system
<<: *buildTemplateNoOutput
environment:
CTARGET: x86_64-multilib-linux-gnu
target: system
- name: arm-musl:system
<<: *buildTemplateNoOutput
environment:
CTARGET: armv7a-unknown-linux-musleabihf
target: system
- name: arm64-musl:system
<<: *buildTemplateNoOutput
environment:
CTARGET: aarch64-unknown-linux-musl
target: system
- name: amd64-musl:system
<<: *buildTemplateNoOutput
environment:
CTARGET: x86_64-multilib-linux-musl
target: system
# Package targets
- name: arm64:package
<<: *buildTemplate
environment:
CTARGET: aarch64-unknown-linux-gnu
target: package
PACKAGE: "sys-apps/ethtool"
# File transfer
- name: transferArtifacts
environment:
DRONE_USER:
from_secret: droneUser
DRONE_PASSWORD:
from_secret: dronePassword
DRONE_SERVER:
from_secret: droneServer
DRONE_DIRECTORY_PATH:
from_secret: droneDirectoryPath
commands:
- echo -e $${DRONE_PASSWORD} | openssl base64 -A -d > ./key
- chmod 600 ./key
- scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o IdentityFile=./key -r $(cat branchName) $${DRONE_USER}@$${DRONE_SERVER}:$${DRONE_DIRECTORY_PATH}
---
kind: signature
hmac: 29b453b9fac9ed64c96c9b46a466659f07f7d926592793713d01a6ca5f0134d4
...