syntasso / kratix-cli

CLI-based tool to build Promises
Apache License 2.0
2 stars 1 forks source link

feat: the cli can get and decompress works and workplacements #59

Open SaphMB opened 3 days ago

SaphMB commented 3 days ago

Context

Kratix has been updated to no longer display the raw content of documents in the workflow.content of works and workplacements. This means that users now need to decode and decompress the content to view it (detailed in troubleshooting docs)

// Get the filepath of the first scheduled document
kubectl get work <work-name> -o=jsonpath='{.spec.workloadGroups[0].workloads[0].filepath}'

// Get, decode and decompress the content of the first scheduled document
kubectl get work <work-name> -o=jsonpath='{.spec.workloadGroups[0].workloads[0].content}' | base64 -d | gzip -d

For ease, this functionality can sit within the cli, getting and decoding the content for the user.

Considerations