summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge O. Castro <jorge.castro@gmail.com>2025-03-25 17:27:52 -0400
committerGitHub <noreply@github.com>2025-03-25 14:27:52 -0700
commiteac380c0712f35a3b3237b16aad0caa3304af354 (patch)
treecc589ff5d723e51b74705efce13eb9c6ca5c1031
parent949ae66d2a55e708cc72f1b02efb36f243f0dc7e (diff)
downloadAeroCore-OS-eac380c0712f35a3b3237b16aad0caa3304af354.tar.gz
AeroCore-OS-eac380c0712f35a3b3237b16aad0caa3304af354.zip
docs: document the justfile (#91)
* docs: document the justfile Bless you copilot. 🗡️ * Update README.md Co-authored-by: Tulip Blossom <tulilirockz@proton.me> --------- Co-authored-by: Tulip Blossom <tulilirockz@proton.me>
-rw-r--r--README.md145
1 files changed, 145 insertions, 0 deletions
diff --git a/README.md b/README.md
index e79c500..0f50ffa 100644
--- a/README.md
+++ b/README.md
@@ -51,6 +51,151 @@ This template provides an out of the box workflow for getting an ISO image for y
This template provides a way to upload the ISO that is generated from the workflow to a S3 bucket or it will be available as an artifact from the job. To upload to S3 we use a tool called [rclone](https://rclone.org/) which is able to use [many S3 providers](https://rclone.org/s3/). For more details on how to configure this see the details [below](#build-isoyml).
+### Justfile Documentation
+
+This `Justfile` contains various commands and configurations for building and managing container images and virtual machine images using Podman and other utilities.
+
+#### Environment Variables
+
+- `repo_organization`: The GitHub repository owner (default: "yourname").
+- `image_name`: The name of the image (default: "yourimage").
+- `centos_version`: The CentOS version (default: "stream10").
+- `fedora_version`: The Fedora version (default: "41").
+- `default_tag`: The default tag for the image (default: "latest").
+- `bib_image`: The Bootc Image Builder (BIB) image (default: "quay.io/centos-bootc/bootc-image-builder:latest").
+
+#### Aliases
+
+- `build-vm`: Alias for `build-qcow2`.
+- `rebuild-vm`: Alias for `rebuild-qcow2`.
+- `run-vm`: Alias for `run-vm-qcow2`.
+
+
+#### Commands
+
+###### `check`
+
+Checks the syntax of all `.just` files and the `Justfile`.
+
+###### `fix`
+
+Fixes the syntax of all `.just` files and the `Justfile`.
+
+###### `clean`
+
+Cleans the repository by removing build artifacts.
+
+##### Build Commands
+
+###### `build`
+
+Builds a container image using Podman.
+
+```bash
+just build $target_image $tag $dx $hwe $gdx
+```
+
+Arguments:
+- `$target_image`: The tag you want to apply to the image (default: aurora).
+- `$tag`: The tag for the image (default: lts).
+- `$dx`: Enable DX (default: "0").
+- `$hwe`: Enable HWE (default: "0").
+- `$gdx`: Enable GDX (default: "0").
+
+##### Building Virtual Machines and ISOs
+
+###### `build-qcow2`
+
+Builds a QCOW2 virtual machine image.
+
+```bash
+just build-qcow2 $target_image $tag
+```
+
+###### `build-raw`
+
+Builds a RAW virtual machine image.
+
+```bash
+just build-raw $target_image $tag
+```
+
+###### `build-iso`
+
+Builds an ISO virtual machine image.
+
+```bash
+just build-iso $target_image $tag
+```
+
+###### `rebuild-qcow2`
+
+Rebuilds a QCOW2 virtual machine image.
+
+```bash
+just rebuild-qcow2 $target_image $tag
+```
+
+###### `rebuild-raw`
+
+Rebuilds a RAW virtual machine image.
+
+```bash
+just rebuild-raw $target_image $tag
+```
+
+###### `rebuild-iso`
+
+Rebuilds an ISO virtual machine image.
+
+```bash
+just rebuild-iso $target_image $tag
+```
+
+##### Run Virtual Machines
+
+###### `run-vm-qcow2`
+
+Runs a virtual machine from a QCOW2 image.
+
+```bash
+just run-vm-qcow2 $target_image $tag
+```
+
+###### `run-vm-raw`
+
+Runs a virtual machine from a RAW image.
+
+```bash
+just run-vm-raw $target_image $tag
+```
+
+###### `run-vm-iso`
+
+Runs a virtual machine from an ISO.
+
+```bash
+just run-vm-iso $target_image $tag
+```
+
+###### `spawn-vm`
+
+Runs a virtual machine using systemd-vmspawn.
+
+```bash
+just spawn-vm rebuild="0" type="qcow2" ram="6G"
+```
+
+##### Lint and Format
+
+###### `lint`
+
+Runs shell check on all Bash scripts.
+
+###### `format`
+
+Runs shfmt on all Bash scripts.
+
## Workflows
### build.yml