Skip to content

Commit

Permalink
feat: add juniper build for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Feb 6, 2022
1 parent 19e27b9 commit ba0e595
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
19 changes: 15 additions & 4 deletions vendorbuild/juniper/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,34 @@ if [ ! -e /usr/bin/mkisofs ]; then
fi

# Copy binary
cp pathvector_freebsd_amd64/pathvector ../vendorbuild/juniper/src
cp pathvector_freebsd_amd64/pathvector ../vendorbuild/juniper/src-amd64/
cp pathvector_freebsd_arm64/pathvector ../vendorbuild/juniper/src-arm64/

# Get version
version=$(git describe --tags "$(git rev-list --tags --max-count=1)" | cut -c2-)

# Build package
python3 ../vendorbuild/juniper/jetez/jet/main.py \
--source ../vendorbuild/juniper/src/ \
--source ../vendorbuild/juniper/src-amd64/ \
--cert ../vendorbuild/juniper/cert.pem \
--key ../vendorbuild/juniper/key.pem \
--version "$version"
python3 ../vendorbuild/juniper/jetez/jet/main.py \
--source ../vendorbuild/juniper/src-arm64/ \
--cert ../vendorbuild/juniper/cert.pem \
--key ../vendorbuild/juniper/key.pem \
--version "$version"

# Cleanup
sudo rm -rf /usr/bin/mkisofs
rm -rf ../vendorbuild/juniper/src/pathvector
rm -rf ../vendorbuild/juniper/src-amd64/pathvector
rm -rf ../vendorbuild/juniper/src-arm64/pathvector

# Rename file
if [ ! -e pathvector-"$version"-juniper-amd64.tgz ]; then
mv pathvector*tgz pathvector-"$version"-juniper-amd64.tgz
mv pathvector-x86*tgz pathvector-"$version"-juniper-amd64.tgz
fi

if [ ! -e pathvector-"$version"-juniper-arm64.tgz ]; then
mv pathvector-arm*tgz pathvector-"$version"-juniper-arm64.tgz
fi
File renamed without changes.
8 changes: 8 additions & 0 deletions vendorbuild/juniper/src-arm64/jet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
basename: "pathvector"
comment: Pathvector is a declarative edge routing platform that automates route optimization and control plane configuration with secure and repeatable routing policy.
arch: "arm"
abi: "64"
files:
- source: pathvector
destination: /var/db/scripts/jet/pathvector

0 comments on commit ba0e595

Please sign in to comment.