|
2 | 2 |
|
3 | 3 | ## Overview |
4 | 4 |
|
5 | | -This project automates the building of custom Firecracker. It supports building specific firecracker versions and uploading the resulting binaries to a Google Cloud Storage (GCS) bucket. |
| 5 | +This project automates the building of custom Firecracker versions. It supports building specific firecracker versions and uploading the resulting binaries to a Google Cloud Storage (GCS) bucket. |
6 | 6 |
|
7 | 7 | ## Prerequisites |
8 | 8 |
|
9 | 9 | - Linux environment (for building firecracker) |
| 10 | +- Git repository with tags |
10 | 11 |
|
11 | 12 | ## Building Firecrackers |
12 | 13 |
|
13 | | -1. **Configure firecracker versions:** |
14 | | - - Edit `firecracker_versions.txt` to specify which firecracker versions to build (one per line, e.g., `<last_tag-prelease>-<first-8-letters-of-the-specific-commit>`). |
| 14 | +### Local Build |
15 | 15 |
|
16 | | -2. **Build:** |
| 16 | +Build the current git version (latest tag + commit hash): |
17 | 17 |
|
18 | | - ```sh |
19 | | - make build |
20 | | - ``` |
| 18 | +```sh |
| 19 | +make build |
| 20 | +``` |
21 | 21 |
|
22 | | - The built firecrackers will be placed in `builds/<version_name>/firecracker`. |
| 22 | +**Requirements:** |
| 23 | +- The repository must be in a clean state (no uncommitted changes) |
| 24 | +- The current commit must have an associated tag |
| 25 | +- The built firecracker will be placed in `builds/<tag>_<shorthash>/firecracker` |
23 | 26 |
|
24 | | -## Development Workflow |
| 27 | +### CI/CD Build |
25 | 28 |
|
26 | | -- On every push, GitHub Actions will automatically build the firecrackers and save it as an artifact. |
| 29 | +The `firecracker_versions.txt` file specifies which versions to build in CI/CD: |
| 30 | + |
| 31 | +- Edit `firecracker_versions.txt` to specify firecracker versions (one per line) |
| 32 | +- Versions can be tags (e.g., `v1.10.1`) or tag with shorthash (e.g., `v1.12.1_abcdef12`) |
| 33 | +- On every push, GitHub Actions will automatically: |
| 34 | + 1. Parse versions from `firecracker_versions.txt` and resolve commit hashes |
| 35 | + 2. Build each version in parallel |
| 36 | + 3. Check CI status for each version |
| 37 | + 4. Upload successful builds to GCS and create GitHub releases (on main branch) |
| 38 | + |
| 39 | +## Scripts |
| 40 | + |
| 41 | +- `build.sh <version> <hash> <version_name>` - Builds a single Firecracker version |
| 42 | +- `scripts/parse-versions-with-hash.sh` - Parses versions and resolves commit hashes |
| 43 | +- `scripts/check-fc-ci.sh <versions_json>` - Checks CI status for parsed versions |
27 | 44 |
|
28 | 45 | ## License |
29 | 46 |
|
|
0 commit comments