website icon indicating copy to clipboard operation
website copied to clipboard

During the build proccess run Flux to generate the snippets in our guides

Open alisondy opened this issue 4 years ago • 4 comments

generate output of flux commands on the fly rather than manually check in output of snippets

  • Folder in snippets that is all flux commands that export throughout the guide
  • step in gen-content that
    • gets a container of the latest flux image
    • runs said command
    • spits the output out into another folder in snippets

involves

  • modifying the make gen-content stage

priority long term, nice to have, QOL

alisondy avatar Sep 15 '21 18:09 alisondy

POC of this on https://github.com/alisondy/website/tree/snippet-gen

Depends on

  • yq
  • curl or wget

What it does

  • adapted from the install.sh script
  • does all the steps except for install the binary
    • check os,arch,dl,checksum,unzip
  • generates snippets from configuration in gen-cli.yaml

Currently have got it working with multi line commands Need to add more logic to handle single line commands aswell

Shelving for now but if someone wants to take this on and make it more robust, feel free to.

alisondy avatar Sep 16 '21 02:09 alisondy

I'm not sure I understand the impact or advantage of this. Can you elaborate a little?

dholbach avatar Sep 21 '21 09:09 dholbach

the benefit of this is that you wouldn't have to manually go and update the snippets when flux upgrades

and that you can be certain the snippets are up to date

alisondy avatar Sep 22 '21 18:09 alisondy

Scott said he could take a look at integrating the relevant parts from #530.

dholbach avatar Nov 24 '21 10:11 dholbach