siderolabs / conform

Policy enforcement for your pipelines.
Mozilla Public License 2.0
432 stars 45 forks source link

docs: how to use conform #146

Closed lhohan-cb closed 4 years ago

lhohan-cb commented 5 years ago

How do I install this tool please?

Found this issue but was closed.

Would be good to add installation instruction to the README.

andrewrynhard commented 5 years ago

Hi @lhohan-cb. Thanks for the suggestion. I will add directions to the README. To install simply download the binary from a release https://github.com/talos-systems/conform/releases and place it in your PATH. You can use the config in the example as a starting point. Place it in the top level of the git repo you would like conform. Let me know if you have any troubles. Thanks!

Herve-M commented 4 years ago

I join the point of the how to use it. After playing with it, it seems that it can't be used locally (to enforce) with git hooks like commit-msg and it only work on the last commit.

What was/are the usage scenarios?

andrewrynhard commented 4 years ago

@Herve-M

to install:

go get github.com/talos-systems/conform

to setup the git hook:

cat <<EOF | tee .git/hooks/commit-msg
#!/bin/sh

conform enforce --commit-msg-file \$1
EOF
chmod +x .git/hooks/commit-msg

I'll update the README now

andrewrynhard commented 4 years ago

https://github.com/talos-systems/conform/pull/154

Herve-M commented 4 years ago

@andrewrynhard Perfect! I didn't check all the options in the help, my bad & shame!

andrewrynhard commented 4 years ago

The README should have enough to get started.