Repository navigation
Expand file tree
/
Copy pathbarney.yaml
More file actions
93 lines (82 loc) · 3.14 KB
/
Copy pathbarney.yaml
File metadata and controls
93 lines (82 loc) · 3.14 KB
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
# Copyright (c) 2022 Arista Networks, Inc. All rights reserved.
# Arista Networks, Inc. Confidential and Proprietary.
images:
# as we product .pyc and txt we do not have dyn linking,
# there is no pressure on glibc / musl
mfw_pkg/support-diagnostics:
units:
- floor: code.arista.io/efw/build%toolchain
entry:
mutables:
- /mfw-toolchain # required as we link instead of copy
network:
enabled: true
firewall:
# Accessed domains (66): alpha.gnu.org., build.openvpn.net., ... ,www.tcpdump.org.
allow: ["fwgroup:any"]
deny: ["fwgroup:any"]
sources:
- code.arista.io/efw/build
- code.arista.io/efw/openwrt
- code.arista.io/efw/feeds
mappings:
/src/github.com/untangle/support-diagnostics:
snapshot: code.arista.io/efw/support-diagnostics
mutable: true
quota:
memory: 4Gi
cpu: 3.5
build: |
set -ex
# link build%toolchain's staging_dir into our source tree
# we used to copy here, but we link to reduce memory footprint
ln -s /mfw-toolchain/staging_dir /src/code.arista.io/efw/openwrt/staging_dir
# use barney-supplied feeds instead of fetching from github
perl -i -pe 's|^src-git mfw .+|src-link mfw /src/code.arista.io/efw/feeds|' /src/code.arista.io/efw/build/feeds.conf.mfw
# barney sets DESTDIR to /dest, but this really confuses openwrt
unset DESTDIR
# build our package
cd /src/code.arista.io/efw/openwrt
/src/code.arista.io/efw/build/build.sh -f /src -t "package/feeds/packages/python3/host/compile package/feeds/mfw/support-diagnostics/compile"
# copy resulting packages to destination image
mkdir -p /dest/mfw-packages/support-diagnostics
cp bin/packages/x86_64/*/* /dest/mfw-packages/support-diagnostics
cp bin/targets/x86/64/packages/* /dest/mfw-packages/support-diagnostics
test/mfw_pkg/support-diagnostics:
units:
- floor: code.arista.io/efw/build%world
entry:
mutables:
- /etc
- /usr
network:
enabled: false
sources: []
mappings:
/src/support-diagnostics:
snapshot: .%mfw_pkg/support-diagnostics
mutable: false
build: |
mkdir -p /var/lock
opkg install --force-downgrade /src/support-diagnostics/mfw-packages/*/*
ls /usr/bin/support-diagnostics
################
#
# Validate non-code files
#
#########
tests/internal/renovate-json5-floor:
units:
- image: barney.ci/debian%network
- image: barney.ci/debian%pkg/node-json5
tests/renovate-json5:
units:
- floor: .%tests/internal/renovate-json5-floor
sources:
- code.arista.io/efw/support-diagnostics # to get sources under stable path
quota:
memory: 500Mi
cpu: 1
entry: {network: {enabled: false}}
build: |
json5 --validate /src/code.arista.io/efw/support-diagnostics/renovate.json5