-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: add 'dev tofu-create' command to build bundles from a uds-bundle.tf config #1060
base: uds-tofu
Are you sure you want to change the base?
Conversation
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.
Overall looks solid, great job 👍
return err | ||
} | ||
|
||
// Fake metadata for now |
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.
still fake?
Description: *tfConfig.Metadata.Description, | ||
} | ||
|
||
// Parse each Package resoruce and convert it types.Package type |
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.
// Parse each Package resoruce and convert it types.Package type | |
// Parse each Package resoruce and convert it to types.Package type |
@@ -88,6 +120,7 @@ func (b *Bundle) Create() error { | |||
} | |||
} | |||
|
|||
// TODO: @JPERRY this dev eploy block has not been validated to work with tofu based bundles yet |
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.
// TODO: @JPERRY this dev eploy block has not been validated to work with tofu based bundles yet | |
// TODO: @JPERRY this dev deploy block has not been validated to work with tofu based bundles yet |
var bundleManifestDesc ocispec.Descriptor | ||
if lo.isTofu { | ||
bundleManifestDesc, err = pushBundleTFToStore(store, filepath.Join(lo.sourceDir, config.BundleTF)) | ||
if err != nil { | ||
return err | ||
} | ||
} else { | ||
// push uds-bundle.yaml to OCI store | ||
bundleManifestDesc, err = pushBundleYAMLToStore(store, bundle) | ||
if err != nil { | ||
return err | ||
} | ||
} |
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.
nit: style suggestion
var bundleManifestDesc ocispec.Descriptor | |
if lo.isTofu { | |
bundleManifestDesc, err = pushBundleTFToStore(store, filepath.Join(lo.sourceDir, config.BundleTF)) | |
if err != nil { | |
return err | |
} | |
} else { | |
// push uds-bundle.yaml to OCI store | |
bundleManifestDesc, err = pushBundleYAMLToStore(store, bundle) | |
if err != nil { | |
return err | |
} | |
} | |
var bundleManifestDesc ocispec.Descriptor | |
if lo.isTofu { | |
// push uds-bundle.tf to OCI store | |
bundleManifestDesc, err = pushBundleTFToStore(store, filepath.Join(lo.sourceDir, config.BundleTF)) | |
} else { | |
// push uds-bundle.yaml to OCI store | |
bundleManifestDesc, err = pushBundleYAMLToStore(store, bundle) | |
} | |
if err != nil { | |
return err | |
} |
Description
Parses
uds-bundle.tf
files and generates auds-bundle-fake-metadata-0.0.0.tar.zst
tarball bundle.There is (a lot) more work that will need to be implemented to ensure full feature parity with the standard
uds create
from auds-bundle.yaml
file, but I believe this PR offers a good starting point.The changes in this PR add additional config booleans to check against so we do not change the behavior of a standard
uds create
command.Type of change
Checklist before merging
😰😬🙈