-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add conditionals #199
Add conditionals #199
Conversation
Which checks against the system name from os-release to be anle to run steps in a given system Also adds a YipConfig.ToString method that turns a yipconfig into a simple yaml string, useful for generating stages via the YipConfig and feeding it to yip via STDIN from code directly Signed-off-by: Itxaka <[email protected]>
Signed-off-by: Itxaka <[email protected]>
Signed-off-by: Itxaka <[email protected]>
Signed-off-by: Itxaka <[email protected]>
Signed-off-by: Itxaka <[email protected]>
Signed-off-by: Itxaka <[email protected]>
This allows to pull an oci image into a given destination Signed-off-by: Itxaka <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really liking it! just needs some docs but looking good!
} | ||
|
||
// ExtractOCIImage will extract a given targetImage into a given targetDestination | ||
func extractOCIImage(img v1.Image, targetDestination string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im a bit worried about bringing more deps due to the UnpackImage stuff.... But I think also that its a great addition to the yip plugins as nowadays it can help prepare an image with some other images, like kubernetes/k3s like getting an offline installer ongoing.... maybe the plugin should offer the possibility of pulling the image into a tar.gz as well as decompressing the image? |
// mkdirAll creates a directory and all necessary parents. | ||
// It uses an vfs.FS as that doesnt have a MkdirAll method | ||
// Same as os.MkdirAll but for vfs.FS | ||
func mkdirAll(fs vfs.FS, path string, perm os.FileMode) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should go somewhere else?
Signed-off-by: Itxaka <[email protected]>
readme updated, added tests, improved the pull to check for proper platform, improved skip messages for conditionals |
this would be a nice addition (pulling and extracting the image from a saved tar) but let's do step by step and take care of it later when it comes up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Adds ifOs and ifOsVersion conditionals to run things on a give OS, OS version or a mix and match of both.
Adds an unpack Image plugin that accepts a list of images, targets and platforms and will pull and extract those images in the given dir.
Adds tests and docs for both.