forked from untangle/mfw_feeds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
barney.yaml
227 lines (212 loc) · 8.96 KB
/
barney.yaml
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
222
223
224
225
226
227
# Copyright (c) 2022 Arista Networks, Inc. All rights reserved.
# Arista Networks, Inc. Confidential and Proprietary.
images:
mfw_pkg/backup-scripts:
units:
- floor: code.arista.io/mfw/build%toolchain
sources:
- code.arista.io/mfw/build
- github.com/untangle/openwrt
- github.com/untangle/mfw_feeds
build: |
set -e
# copy build%toolchain's staging_dir into our source tree
cp -a /mfw-toolchain/staging_dir /src/github.com/untangle/openwrt/
# use barney-supplied feeds instead of fetching from github
perl -i -pe 's|^src-git mfw .+|src-link mfw /src/github.com/untangle/mfw_feeds|' /src/code.arista.io/mfw/build/feeds.conf.mfw
# barney sets DESTDIR to /dest, but this really confuses openwrt
unset DESTDIR
# build our package
cd /src/github.com/untangle/openwrt
/src/code.arista.io/mfw/build/build.sh -f /src -t package/feeds/mfw/backup-scripts/compile
# copy resulting packages to destination image
mkdir -p /dest/mfw-packages/backup-scripts
cp bin/packages/x86_64/*/* /dest/mfw-packages/backup-scripts
test/backup-scripts:
units:
- image: code.arista.io/mfw/build%world
- image: .%mfw_pkg/backup-scripts
finalizers:
- - sh
- -c
- mkdir /var/lock && opkg install /mfw-packages/*/*
mfw_pkg/crash-collector:
units:
- floor: code.arista.io/mfw/build%toolchain
sources:
- code.arista.io/mfw/build
- github.com/untangle/openwrt
- github.com/untangle/mfw_feeds
build: |
set -e
# copy build%toolchain's staging_dir into our source tree
cp -a /mfw-toolchain/staging_dir /src/github.com/untangle/openwrt/
# use barney-supplied feeds instead of fetching from github
perl -i -pe 's|^src-git mfw .+|src-link mfw /src/github.com/untangle/mfw_feeds|' /src/code.arista.io/mfw/build/feeds.conf.mfw
# barney sets DESTDIR to /dest, but this really confuses openwrt
unset DESTDIR
# build our package
cd /src/github.com/untangle/openwrt
/src/code.arista.io/mfw/build/build.sh -f /src -t package/feeds/mfw/crash-collector/compile
# copy resulting packages to destination image
mkdir -p /dest/mfw-packages/crash-collector
cp bin/packages/x86_64/*/* /dest/mfw-packages/crash-collector
test/crash-collector:
units:
- image: code.arista.io/mfw/build%world
- image: .%mfw_pkg/crash-collector
finalizers:
- - sh
- -c
- mkdir /var/lock && opkg install /mfw-packages/*/*
mfw_pkg/license-scripts:
units:
- floor: code.arista.io/mfw/build%toolchain
sources:
- code.arista.io/mfw/build
- github.com/untangle/openwrt
- github.com/untangle/mfw_feeds
build: |
set -e
# copy build%toolchain's staging_dir into our source tree
cp -a /mfw-toolchain/staging_dir /src/github.com/untangle/openwrt/
# use barney-supplied feeds instead of fetching from github
perl -i -pe 's|^src-git mfw .+|src-link mfw /src/github.com/untangle/mfw_feeds|' /src/code.arista.io/mfw/build/feeds.conf.mfw
# barney sets DESTDIR to /dest, but this really confuses openwrt
unset DESTDIR
# build our package
cd /src/github.com/untangle/openwrt
/src/code.arista.io/mfw/build/build.sh -f /src -t package/feeds/mfw/license-scripts/compile
# copy resulting packages to destination image
mkdir -p /dest/mfw-packages/license-scripts
cp bin/packages/x86_64/*/* /dest/mfw-packages/license-scripts
test/license-scripts:
units:
- image: code.arista.io/mfw/build%world
- image: .%mfw_pkg/license-scripts
finalizers:
- - sh
- -c
- mkdir /var/lock && opkg install /mfw-packages/*/*
mfw_pkg/mfw-eu:
units:
- floor: code.arista.io/mfw/build%toolchain
sources:
- code.arista.io/mfw/build
- github.com/untangle/openwrt
- github.com/untangle/mfw_feeds
build: |
set -e
# copy build%toolchain's staging_dir into our source tree
cp -a /mfw-toolchain/staging_dir /src/github.com/untangle/openwrt/
# use barney-supplied feeds instead of fetching from github
perl -i -pe 's|^src-git mfw .+|src-link mfw /src/github.com/untangle/mfw_feeds|' /src/code.arista.io/mfw/build/feeds.conf.mfw
# barney sets DESTDIR to /dest, but this really confuses openwrt
unset DESTDIR
# build our package
cd /src/github.com/untangle/openwrt
/src/code.arista.io/mfw/build/build.sh -f /src -r eu -t package/feeds/mfw/mfw-eu/compile
# copy resulting packages to destination image
mkdir -p /dest/mfw-packages/mfw-eu
cp bin/packages/x86_64/*/* /dest/mfw-packages/mfw-eu
test/mfw-eu:
units:
- image: code.arista.io/mfw/build%world
- image: .%mfw_pkg/mfw-eu
finalizers:
- - sh
- -c
- mkdir /var/lock && opkg install /mfw-packages/*/*
mfw_pkg/pyconnector:
units:
- floor: code.arista.io/mfw/build%toolchain
sources:
- code.arista.io/mfw/build
- github.com/untangle/openwrt
- github.com/untangle/mfw_feeds
build: |
set -e
# copy build%toolchain's staging_dir into our source tree
cp -a /mfw-toolchain/staging_dir /src/github.com/untangle/openwrt/
# use barney-supplied feeds instead of fetching from github
perl -i -pe 's|^src-git mfw .+|src-link mfw /src/github.com/untangle/mfw_feeds|' /src/code.arista.io/mfw/build/feeds.conf.mfw
# barney sets DESTDIR to /dest, but this really confuses openwrt
unset DESTDIR
# build our package
cd /src/github.com/untangle/openwrt
/src/code.arista.io/mfw/build/build.sh -f /src -t package/feeds/mfw/pyconnector/compile
# copy resulting packages to destination image
mkdir -p /dest/mfw-packages/pyconnector
cp bin/packages/x86_64/*/* /dest/mfw-packages/pyconnector
test/pyconnector:
units:
- image: code.arista.io/mfw/build%world
- image: .%mfw_pkg/pyconnector
finalizers:
- - sh
- -c
- mkdir /var/lock && opkg install /mfw-packages/*/*
mfw_pkg/upgrade-scripts:
units:
- floor: code.arista.io/mfw/build%toolchain
sources:
- code.arista.io/mfw/build
- github.com/untangle/openwrt
- github.com/untangle/mfw_feeds
build: |
set -e
# copy build%toolchain's staging_dir into our source tree
cp -a /mfw-toolchain/staging_dir /src/github.com/untangle/openwrt/
# use barney-supplied feeds instead of fetching from github
perl -i -pe 's|^src-git mfw .+|src-link mfw /src/github.com/untangle/mfw_feeds|' /src/code.arista.io/mfw/build/feeds.conf.mfw
# barney sets DESTDIR to /dest, but this really confuses openwrt
unset DESTDIR
# build our package
cd /src/github.com/untangle/openwrt
/src/code.arista.io/mfw/build/build.sh -f /src -t package/feeds/mfw/upgrade-scripts/compile
# copy resulting packages to destination image
mkdir -p /dest/mfw-packages/upgrade-scripts
cp bin/packages/x86_64/*/* /dest/mfw-packages/upgrade-scripts
test/upgrade-scripts:
units:
- image: code.arista.io/mfw/build%world
- image: .%mfw_pkg/upgrade-scripts
finalizers:
- - sh
- -c
- mkdir /var/lock && opkg install /mfw-packages/*/*
mfw_pkg/wan-manager:
units:
- floor: code.arista.io/mfw/build%toolchain
sources:
- code.arista.io/mfw/build
- github.com/untangle/openwrt
- github.com/untangle/mfw_feeds
build: |
set -e
# copy build%toolchain's staging_dir into our source tree
cp -a /mfw-toolchain/staging_dir /src/github.com/untangle/openwrt/
# use barney-supplied feeds instead of fetching from github
perl -i -pe 's|^src-git mfw .+|src-link mfw /src/github.com/untangle/mfw_feeds|' /src/code.arista.io/mfw/build/feeds.conf.mfw
# barney sets DESTDIR to /dest, but this really confuses openwrt
unset DESTDIR
# avoid rebuilding wan-utils, as it's already built from its own
# repository; removing the dependency is a bit nasty, but we
# consider it acceptable still because for MFW we install all
# the packages together at image creation time, and we don't
# have to support further upgrades
perl -i -pe 's/ .?wan-utils//' /src/github.com/untangle/mfw_feeds/wan-manager/Makefile
# build our package
cd /src/github.com/untangle/openwrt
/src/code.arista.io/mfw/build/build.sh -f /src -t package/feeds/mfw/wan-manager/compile
# copy resulting packages to destination image
mkdir -p /dest/mfw-packages/wan-manager
cp bin/packages/x86_64/*/* /dest/mfw-packages/wan-manager
test/wan-manager:
units:
- image: code.arista.io/mfw/build%world
- image: .%mfw_pkg/wan-manager
finalizers:
- - sh
- -c
- mkdir /var/lock && opkg install /mfw-packages/*/*