Skip to content

Commit 5c3d40a

Browse files
[EFW-1790] Additional test, spacing changes, link instead of copy (#144)
* [EFW-1790] Additional test, spacing changes, link instead of copy * Simplify test to avoid using "file" binary
1 parent 21dc599 commit 5c3d40a

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

barney.yaml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
# Arista Networks, Inc. Confidential and Proprietary.
33

44
images:
5+
# as we product .pyc and txt we do not have dyn linking,
6+
# there is no pressure on glibc / musl
57
mfw_pkg/support-diagnostics:
68
units:
79
- floor: code.arista.io/efw/build%toolchain
10+
entry:
11+
mutables:
12+
- /mfw-toolchain # required as we link instead of copy
813
sources:
914
- code.arista.io/efw/build
1015
- code.arista.io/efw/openwrt
@@ -14,33 +19,47 @@ images:
1419
snapshot: code.arista.io/efw/support-diagnostics
1520
mutable: true
1621
quota:
17-
memory: 8Gi
22+
memory: 4Gi
1823
cpu: 3.5
1924
build: |
2025
set -ex
2126
22-
# copy build%toolchain's staging_dir into our source tree
23-
cp -a /mfw-toolchain/staging_dir /src/code.arista.io/efw/openwrt/
27+
# link build%toolchain's staging_dir into our source tree
28+
# we used to copy here, but we link to reduce memory footprint
29+
ln -s /mfw-toolchain/staging_dir /src/code.arista.io/efw/openwrt/staging_dir
30+
2431
# use barney-supplied feeds instead of fetching from github
2532
perl -i -pe 's|^src-git mfw .+|src-link mfw /src/code.arista.io/efw/mfw_feeds|' /src/code.arista.io/efw/build/feeds.conf.mfw
33+
2634
# barney sets DESTDIR to /dest, but this really confuses openwrt
2735
unset DESTDIR
36+
2837
# build our package
2938
cd /src/code.arista.io/efw/openwrt
3039
/src/code.arista.io/efw/build/build.sh -f /src -t "package/feeds/packages/python3/host/compile package/feeds/mfw/support-diagnostics/compile"
40+
3141
# copy resulting packages to destination image
3242
mkdir -p /dest/mfw-packages/support-diagnostics
3343
cp bin/packages/x86_64/*/* /dest/mfw-packages/support-diagnostics
3444
cp bin/targets/x86/64/packages/* /dest/mfw-packages/support-diagnostics
3545
3646
test/mfw_pkg/support-diagnostics:
3747
units:
38-
- image: code.arista.io/efw/build%world
39-
- image: .%mfw_pkg/support-diagnostics
40-
finalizers:
41-
- - sh
42-
- -c
43-
- mkdir /var/lock && opkg install --force-downgrade /mfw-packages/*/*
48+
- floor: code.arista.io/efw/build%world
49+
entry:
50+
mutables:
51+
- /etc
52+
- /usr
53+
sources: []
54+
mappings:
55+
/src/support-diagnostics:
56+
snapshot: .%mfw_pkg/support-diagnostics
57+
mutable: false
58+
build: |
59+
mkdir -p /var/lock
60+
opkg install --force-downgrade /src/support-diagnostics/mfw-packages/*/*
61+
62+
ls /usr/bin/support-diagnostics
4463
4564
################
4665
#

0 commit comments

Comments
 (0)