Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
Add IMAGE_ID and IMAGE_VERSION to the available variables list
  • Loading branch information
eshcheglov authored and DaanDeMeyer committed Jul 26, 2024
1 parent 811be45 commit 0b4be06
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mkosi/resources/mkosi.md
Original file line number Diff line number Diff line change
Expand Up @@ -2166,6 +2166,10 @@ Scripts executed by mkosi receive the following environment variables:
current image. This file can be parsed inside scripts to gain access to all
settings for the current image.

* `$IMAGE_ID` contains the identifier from the `ImageId=` or `--image-id=` setting.

* `$IMAGE_VERSION` contains the version from the `ImageVersion=` or `--image-version=` setting

Consult this table for which script receives which environment variables:

| Variable | `configure` | `sync` | `prepare` | `build` | `postinst` | `finalize` | `postoutput` | `clean` |
Expand Down Expand Up @@ -2196,6 +2200,8 @@ Consult this table for which script receives which environment variables:
| `MKOSI_UID` | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |
| `MKOSI_GID` | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |
| `MKOSI_CONFIG` | | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |
| `IMAGE_ID` | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |
| `IMAGE_VERSION` | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ | βœ“ |

Additionally, when a script is executed, a few scripts are made
available via `$PATH` to simplify common usecases.
Expand Down

0 comments on commit 0b4be06

Please sign in to comment.