canonical / charmcraft

Collaborate, build and publish charmed operators for Kubernetes, Linux and Windows.
Apache License 2.0
66 stars 72 forks source link

pack README.md and require README.md in uploaded bundle #275

Closed hmlanigan closed 3 years ago

hmlanigan commented 3 years ago

Juju will deploy a local packed bundle without an README.md file. However it will not deploy a bundle without a README.md file from charm hub.

Please require README.md to upload a bundle.

hmlanigan commented 3 years ago

charmcraft pack does not include a local README.md file when creating a bundle.zip file.

hmlanigan commented 3 years ago

Using the parts tag in charmcraft.yaml to include README.md was unsuccessful.

type: bundle
parts:
    bundle:
        prime: ["bundle.yaml", "README.md"]
facundobatista commented 3 years ago

It should include it with that config.

Can you please run charmcraft with --verbose and provide the resulting log lines? thanks!!

hmlanigan commented 3 years ago

hmmm... this time the README.md got added to the zip file as it was including in the prime list in the charmcraft.yaml. However it is not a packed by default and a requirement for uploaded bundles which it needs be.

facundobatista commented 3 years ago

Perfect, we'll make README.md mandatory, then.

jameinel commented 3 years ago

I just ran into this. I successfully uploaded a bundle to the store, but juju would refuse to deploy it because its validation step checks to ensure there is a README.md. As mentioned prime: can be used to workaround it, but that is just a gotcha waiting to happen for someone.