Kiwi needs generate images by date

9 views
Skip to first unread message

Dmitry Bondar

unread,
Dec 17, 2024, 6:14:41 AM12/17/24
to kiwi
Hello Marcus,

could you please help me.
KIWI (next generation) version 10.0.0

I have few questions:

1st.)
I need to generate images with specific field in name YYYYMMDD.
How can i add this to the appliance.kiwi or i need to change something in code ?\

Expected output
linux-9-v20241130-x86_64.raw

I want to add this to :
<image schemaversion="7.5" name="linux-9-vYYYYMMDD">

2nd.)
after complete building images i need to run external script to pack RAW in xz and tar.gz archives.
On this stage i need to add some special file in archive.
How to make this ? Run script after finished building job (i mean not only archive commands it can be other)

thanks!

Marcus Schäfer

unread,
Dec 17, 2024, 7:14:07 AM12/17/24
to kiwi-...@googlegroups.com
Hi,

> 1st.)
> I need to generate images with specific field in name YYYYMMDD.
> How can i add this to the appliance.kiwi or i need to change something
> in code ?\
> Expected output
> linux-9-v20241130-x86_64.raw

There is an attribute named bundle_format which allows you to
configure an output name of your choice. See the docs from here:

https://osinside.github.io/kiwi/image_types_and_results.html#image-bundle-format

You can use the "%I" tag to become replaced with the --id option at
call time of the bundler.

So I suggest a two step process:

1. You build the image and in the appliance.kiwi you set the
bundle_format="..." of your choice

2. Once the image is build you call the bundler which applies
that setting:

kiwi-ng result bundle --target-dir /path/to/image/build_result \
--bundle-dir=/path/to/image/release_result \
--id=$(date -I)

At call time of the bundler you can bring in the date information
you would like to see.


> after complete building images i need to run external script to pack
> RAW in xz and tar.gz archives.

Maybe the bundled results from the kiwi bundler serves the purpose

> On this stage i need to add some special file in archive.
> How to make this ? Run script after finished building job (i mean not
> only archive commands it can be other)

I believe this requires an extra "tar ... --add-file" call after
kiwi and the bundler has done its job. The kiwi bundler does not
yet support adding arbitrary files to the result archive. We might
consider adding this

Hope this helps

Regards,
Marcus
--
Public Key available via: https://keybase.io/marcus_schaefer/key.asc
keybase search marcus_schaefer
signature.asc
Reply all
Reply to author
Forward
0 new messages