Skip to content

Commit

Permalink
Self-contained: nbcparser add arm64 support (#4435)
Browse files Browse the repository at this point in the history
Co-authored-by: Lily Pan <lilypan@microsoft.com>
  • Loading branch information
lilypan26 and Lily Pan committed May 24, 2024
1 parent 1e24319 commit 8b38584
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions packer.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SHELL=/bin/bash -o pipefail

build-packer: build-nbcparser-binary
build-packer: build-nbcparser-all
ifeq (${MODE},linuxVhdMode)
@echo "${MODE}: Generating prefetch scripts"
@bash -c "pushd vhdbuilder/prefetch; go run main.go --components=../packer/components.json --container-image-prefetch-script=../packer/prefetch.sh; popd"
Expand Down Expand Up @@ -98,6 +98,10 @@ convert-sig-to-classic-storage-account-blob: az-login
test-building-vhd: az-login
@./vhdbuilder/packer/test/run-test.sh

build-nbcparser-all:
@$(MAKE) -f packer.mk build-nbcparser-binary ARCH=amd64
@$(MAKE) -f packer.mk build-nbcparser-binary ARCH=arm64

build-nbcparser-binary:
@echo "Building nbcparser binary"
@bash -c "pushd nbcparser; go build -o bin/nbcparser main.go"
@bash -c "pushd nbcparser && CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -o bin/nbcparser-$(ARCH) main.go && popd"
2 changes: 1 addition & 1 deletion vhdbuilder/packer/vhd-image-builder-arm64-gen2.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
},
{
"type": "file",
"source": "nbcparser/bin/nbcparser",
"source": "nbcparser/bin/nbcparser-arm64",
"destination": "/home/packer/nbcparser"
},
{
Expand Down
2 changes: 1 addition & 1 deletion vhdbuilder/packer/vhd-image-builder-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
},
{
"type": "file",
"source": "nbcparser/bin/nbcparser",
"source": "nbcparser/bin/nbcparser-amd64",
"destination": "/home/packer/nbcparser"
},
{
Expand Down
2 changes: 1 addition & 1 deletion vhdbuilder/packer/vhd-image-builder-mariner-arm64.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
},
{
"type": "file",
"source": "nbcparser/bin/nbcparser",
"source": "nbcparser/bin/nbcparser-arm64",
"destination": "/home/packer/nbcparser"
},
{
Expand Down
2 changes: 1 addition & 1 deletion vhdbuilder/packer/vhd-image-builder-mariner.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
},
{
"type": "file",
"source": "nbcparser/bin/nbcparser",
"source": "nbcparser/bin/nbcparser-amd64",
"destination": "/home/packer/nbcparser"
},
{
Expand Down

0 comments on commit 8b38584

Please sign in to comment.