Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Published image name #183

Merged
merged 5 commits into from Oct 14, 2022
Merged

Published image name #183

merged 5 commits into from Oct 14, 2022

Conversation

Szubie
Copy link
Collaborator

@Szubie Szubie commented Oct 14, 2022

Publishing a unit as an image with brave publish now allows for naming the exported images using the new bravetools image field syntax: <image_name>[/version][/arch].

The exported image files now use the same format as bravetools image store for consistency, delimiting with underscore ("_") instead of the old legacy design that used a hypen ("-"). If no image string is provided, the default will be to export the unit as unit_name/$timestamp just like it is currently. This image_name/version will be preserved when the image file is imported with brave import.

Since the brave publish command can export multiple units at once, you can provide multiple image names to apply to the exported images at the CLI. This can be done either by delimiting the image names with commas or by providing the "image_name" flag multiple times.

Example:

#publish units as images
brave publish test test-service test-service2 --image_name imagename/edit,imagename/edit2,imagename/edit3
Publishing unit "test" as image "imagename_edit_amd64.tar.gz"
Exporting archive ...
Cleaning ...
Publishing unit "test-service" as image "imagename_edit2_amd64.tar.gz"
Exporting archive ...
Cleaning ...
Publishing unit "test-service2" as image "imagename_edit3_amd64.tar.gz"
Exporting archive ...
Cleaning ... 

#brave import on a new image file
brave import ./imagename_edit_amd64.tar.gz
8195c85a20f8ab2d1f5084a1b744363a

#check the image was imported correctly
brave images
IMAGE                           VERSION         ARCH    CREATED         SIZE    HASH
imagename                       edit            amd64   just now        28MB    8195c85a20f8ab2d1f5084a1b744363a

Alternative syntax for labelling multiple exported images:

brave publish test test-service test-service2 --image_name imagename/edit --image_name imagename/edit2 --image_name imagename/edit3

@Szubie Szubie changed the title Publish image name Published image name Oct 14, 2022
@idroz idroz merged commit 1e75f8e into bravetools:master Oct 14, 2022
@Szubie Szubie deleted the publish-image-name branch October 14, 2022 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants