File tree Expand file tree Collapse file tree 5 files changed +44
-0
lines changed
Expand file tree Collapse file tree 5 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ test_results/*
1515/resources /linux
1616/resources /x86_64
1717/resources /aarch64
18+ .env
Original file line number Diff line number Diff line change 1+ gcloud 534.0.0
12rust 1.85.0
Original file line number Diff line number Diff line change 1+ -include .env
2+
3+ .PHONY : build
4+ build :
5+ ./scripts/build.sh
6+
7+ .PHONY : upload
8+ upload :
9+ ./scripts/upload.sh $(GCP_PROJECT_ID )
10+
11+ .PHONY : build-and-upload
12+ make build-and-upload : build upload
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ # The format will be: v<major>.<minor>.<patch>_g<commit_hash> — e.g. v1.7.2_g8bb88311
6+ # Extract full version from src/firecracker/swagger/firecracker.yaml
7+ FC_VERSION=$( python3 -c " import yaml; print(yaml.safe_load(open('src/firecracker/swagger/firecracker.yaml'))['info']['version'])" )
8+ commit_hash=$( git rev-parse --short HEAD)
9+ version_name=" v${FC_VERSION} _g${commit_hash} "
10+ echo " Version name: $version_name "
11+
12+ echo " Starting to build Firecracker version: $version_name "
13+ tools/devtool -y build --release
14+
15+ mkdir -p " ./build/fc/${version_name} "
16+ cp ./build/cargo_target/x86_64-unknown-linux-musl/release/firecracker " ./build/fc/${version_name} /firecracker"
17+ echo " Finished building Firecracker version: $version_name and copied to ./build/fc/${version_name} /firecracker"
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ GCP_PROJECT_ID=$1
6+
7+ gsutil -h " Cache-Control:no-cache, max-age=0" cp -r " build/fc/*" " gs://${GCP_PROJECT_ID} -fc-versions"
8+ if [ " $GCP_PROJECT_ID " == " e2b-prod" ]; then
9+ # Upload kernel to GCP public builds bucket
10+ gsutil -h " Cache-Control:no-cache, max-age=0" cp -r " build/fc/*" " gs://${GCP_PROJECT_ID} -public-builds/firecrackers/"
11+ fi
12+
13+ rm -rf build/fc/*
You can’t perform that action at this time.
0 commit comments