cli icon indicating copy to clipboard operation
cli copied to clipboard

feat: finish `init` command

Open gerblesh opened this issue 2 years ago • 2 comments

the init command would allow users to easily create images with the CLI. Running bb init <image name> would create a new image by cloning down https://github.com/blue-build/template into the specified directory and setting things up such as cosign key pairs, GH secrets (if the user authorizes it), possibly an image base, and whatever else that might be needed

gerblesh avatar Jan 29 '24 22:01 gerblesh

I've updated https://github.com/xynydev/create-ublue-image to serve this purpose, but that tool will ultimately be replaced by bluebuild init, and as such I'm not going to document the existence of the older tool on the new website. This feature shouldn't be hard to implement and having it done soon would be great!

xynydev avatar Feb 10 '24 08:02 xynydev

Ok, I tried to do some local development on this, but unfortunately got frustrated.

I've got some ideas for how this could work, though:

  1. Ask some questions to get started
    • Maybe a "yes, I want to do initial image customization now" and "no, I want to go with the defaults for now"
    • After that, same stuff as the website: image name, description, maybe base image too
  2. Create the repo
    • Either by generating it using GitHub API like the website does or git cloning it and changing the remotes like create-ublue-image. I would prefer the GitHub API way, but maybe that should be made optional incase someone wants local only.
  3. Set up signing
    • Might not be required with OIDC
  4. Apply initial customization
    • Based on questions asked
    • Committed to the git repo with chore(automatic):
  5. Supply actionable next steps
    • Local building (link to guide on website), enabling builds on GitHub, rebasing, etc.

xynydev avatar Feb 18 '24 10:02 xynydev