| name | create-image |
| description | Build a host OS image using the Image Composer Tool (ICT) from a source template with customizable user credentials. |
Trigger Phrases
- create image
- build host image
- generate ubuntu image
- build PTL image
- run ict image build
Required Inputs
- enib_home: absolute path to this repository root (default: current workspace root)
All derived paths use defaults — never prompt for them unless the user explicitly overrides:
target_template: infrastructure/host-os/ict/generic-handheld-os-template.yml
work_template: <target_template> basename prefixed with work-
os_image_composer_repo: <enib_home>/tools/image-composer-tool
Preconditions
Run all checks silently. On any failure, stop and print only the error with the fix command — no prompts, no questions:
Steps
Run silently (no prompts):
- Clone
image-composer-tool if missing, or reuse existing checkout:
git clone --branch 2026.1-Release https://github.com/open-edge-platform/image-composer-tool.git <os_image_composer_repo>
- If already cloned:
cd <os_image_composer_repo> && git fetch --tags && git checkout 2026.1-Release
- Build the tool binary:
cd <os_image_composer_repo>
go build -buildmode=pie -ldflags "-s -w" ./cmd/image-composer-tool
- Prepare template copy:
cp <enib_home>/<target_template> <os_image_composer_repo>/<work_template>
- Validate template:
cd <os_image_composer_repo>
./image-composer-tool validate <work_template>
Prompt only once before destructive action:
5. Ask for confirmation before the privileged build (overwrites workspace output directory).
6. Build the image:
sudo -E ./image-composer-tool build <work_template>
- Collect generated artifacts from:
<os_image_composer_repo>/workspace/ubuntu-ubuntu24-x86_64/imagebuild/<config-name>/
Validation
- Template validation exits with code 0.
- Build command exits with code 0 and reports successful image creation.
- At least one
.raw.gz artifact is present under workspace output path.
- Software Bill of Materials (SBOM) and/or manifests are present when generated by the build profile.
Rollback
- Remove temporary working template:
rm -f <os_image_composer_repo>/<work_template>
- Remove failed partial output directory if user approves:
rm -rf <os_image_composer_repo>/workspace/ubuntu-ubuntu24-x86_64/imagebuild/<config-name>
Safety Rules
- Ask only before the privileged build step. Never prompt for paths, defaults, or non-destructive commands.
- Never infer credentials, keys, or secrets.
- Never print full private key contents.
- Stop on precondition or validation failure and provide next-action guidance.
Expected Result Summary
Return:
- whether preconditions passed
- validation status
- build status
- artifact file names and absolute paths
- troubleshooting hints when build fails (for example, certificate or no_proxy issues)