• Stars
    star
    396
  • Rank 108,082 (Top 3 %)
  • Language
    Go
  • License
    Mozilla Public Li...
  • Created over 7 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Policy enforcement for your pipelines.

Conform

Policy enforcement for your pipelines.

Conventional Commits GoDoc Travis Codecov Go Report Card Release GitHub (pre-)release


Conform is a tool for enforcing policies on your build pipelines.

Some of the policies included are:

  • Commits: Enforce commit policies including:
    • Commit message header length
    • Developer Certificate of Origin
    • GPG signature
    • GPG signature identity check
    • Conventional Commits
    • Imperative mood
    • Spell check
    • Maximum of one commit ahead of master
    • Require a commit body
    • Jira issue check
  • License Headers: Enforce license headers on source code files.

Getting Started

To install conform you can download a release, or build it locally (go must be installed):

go install github.com/siderolabs/conform/cmd/conform@latest

Third option is to run it as a container:

docker run --rm -it -v $PWD:/src -w /src ghcr.io/siderolabs/conform:v0.1.0-alpha.22 enforce

Now, create a file named .conform.yaml with the following contents:

policies:
  - type: commit
    spec:
      header:
        length: 89
        imperative: true
        case: lower
        invalidLastCharacters: .
        jira:
          keys:
          - PROJ
          - JIRA
      body:
        required: true
      dco: true
      gpg:
        required: false
        identity:
          gitHubOrganization: some-organization
      spellcheck:
        locale: US
      maximumOfOneCommit: true
      conventional:
        types:
          - "type"
        scopes:
          - "scope"
        descriptionLength: 72
  - type: license
    spec:
      skipPaths:
        - .git/
        - .build*/
      includeSuffixes:
        - .ext
      excludeSuffixes:
        - .exclude-ext-prefix.ext
      allowPrecedingComments: false
      header: |
        This is the contents of a license header.

In the same directory, run:

$ conform enforce
POLICY         CHECK                        STATUS        MESSAGE
commit         Header Length                PASS          Header is 43 characters
commit         Imperative Mood              PASS          Commit begins with imperative verb
commit         Header Case                  PASS          Header case is valid
commit         Header Last Character        PASS          Header last character is valid
commit         DCO                          PASS          Developer Certificate of Origin was found
commit         GPG                          PASS          GPG signature found
commit         GPG Identity                 PASS          Signed by "Someone <[email protected]>"
commit         Conventional Commit          PASS          Commit message is a valid conventional commit
commit         Spellcheck                   PASS          Commit contains 0 misspellings
commit         Number of Commits            PASS          HEAD is 0 commit(s) ahead of refs/heads/master
commit         Commit Body                  PASS          Commit body is valid
license        File Header                  PASS          All files have a valid license header

To setup a commit-msg hook:

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

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

We also provide a Pre-Commit hook that you can use as follows:

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/siderolabs/conform
    rev: master
    hooks:
      - id: conform
        stages:
          - commit-msg

License

license

More Repositories

1

talos

Talos Linux is a modern Linux distribution built for Kubernetes.
Go
6,288
star
2

sidero

Sidero Metal is a bare metal provisioning system with support for Kubernetes Cluster API.
Go
342
star
3

terraform-provider-talos

Go
117
star
4

cluster-api-bootstrap-provider-talos

A cluster-api bootstrap provider for deploying Talos clusters.
Go
73
star
5

awesome-talos

Collection of awesome talos resource from the community
69
star
6

bldr

Go
58
star
7

extensions

Talos Linux System Extensions
Makefile
56
star
8

talos-backup

An easy, Talos Linux aware etcd snapshotter.
Go
47
star
9

theila

Theila is the UI for all things Sidero Labs.
TypeScript
46
star
10

talos-cloud-controller-manager

Generic cloud controller manager for hybrid deployments using Talos OS
Go
41
star
11

cluster-api-control-plane-provider-talos

A control plane provider for CAPI + Talos
Go
38
star
12

grpc-proxy

gRPC Go Proxy library with support for one-to-many proxying and result aggregation.
Go
38
star
13

discovery-service

Discovery Service provides cluster membership and KubeSpan peer information for Talos Linux clusters.
Go
34
star
14

talos-vmtoolsd

VMware tools implementation for the Talos Kubernetes platform, using govmomi and Talos' apid
Go
27
star
15

kres

Tool to automate build instructions generation
Go
25
star
16

pkgs

Makefile
22
star
17

contrib

talos/sidero setup examples
Makefile
18
star
18

homebrew-talos

A homebrew repo for our talos tap
Ruby
17
star
19

talos-controller-manager

A Kubernetes controller for managing Talos clusters.
Go
14
star
20

image-factory

A service to generate Talos boot assets
Go
12
star
21

tools

Makefile
12
star
22

sbc-raspberrypi

Raspberry Pi Imager Overlay
Makefile
12
star
23

go-loadbalancer

Go load-balancing and upstream checks library
Go
11
star
24

go-blockdevice

Go
11
star
25

go-smbios

Go
10
star
26

cluster-api-templates

A collection of templates for CAPI + Talos
Shell
9
star
27

cluster-api-provider-talos

A cluster-api provider for deploying Talos clusters.
Go
9
star
28

sbc-rockchip

RockChip Overlays
Go
8
star
29

os-engine

Go
6
star
30

go-procfs

Go
5
star
31

crypto

Go library wrapping standard library crypto/x509
Go
5
star
32

toolchain

Makefile
5
star
33

kubelet

This is a repo for our docker image of the kubelet binary.
Makefile
4
star
34

devise

Configuration as Code.
Go
4
star
35

go-retry

Generic Go retry library
Go
4
star
36

ui

Vue
4
star
37

build-container

Shell
4
star
38

kube-service-exposer

Kubernetes controller which exposes Kubernetes Services over specified host addresses and fixed port
Go
4
star
39

omni-client

Omni client is the client and API libraries for Omni SaaS
Go
4
star
40

project-template-kubernetes-controller

Makefile
3
star
41

siderolink

SideroLink is an API between Sidero Metal and Talos Linux
Go
3
star
42

overlays

Talos Linux Overlays
Makefile
3
star
43

day-two

This repo will hold templates and guides for our day 2 stack. We'll see if it's worth keeping in here or if notion is good enough later.
Go
3
star
44

charts

Kubernetes Helm charts.
Smarty
2
star
45

metal-metadata-server

A Cluster API aware metadata server for bare metal.
Go
2
star
46

omni-feedback

Omni feature requests, bug reports
2
star
47

toolchain-musl

Shell
2
star
48

discovery-api

Discovery Service API
Makefile
2
star
49

protoc-gen-proxy

protoc plugin to extend grpc generation with proxy(multiplexing) functionality
Go
2
star
50

metal-controller-manager

A Kubernetes controller for managing bare metal clusters.
Go
2
star
51

rfcs

2
star
52

go-api-signature

Client-side API signature support (siderov1)
Go
2
star
53

cluster-api-provider-metal

A Cluster API for provisioning bare metal nodes
Go
2
star
54

kube-scheduler

Go
2
star
55

go-kubeconfig

A package to handle client Kubernetes config operations.
Go
2
star
56

discovery-client

Discovery Service client code
Go
2
star
57

go-pcidb

Static PCI ID database generated from PCI ID database.
Go
2
star
58

coredns

CoreDNS fork to be used as separate plugins
Go
2
star
59

sbc-template

Template repository to generate SBC overlay
Go
2
star
60

signing-keys

Code and release signing keys
1
star
61

go-cmd

Shared module for executing commands from Go.
Go
1
star
62

go-kmsg

Go library to interact with Linux kernel message buffer
Go
1
star
63

gitmeta

Go
1
star
64

powerflex-argocd-poc

Smarty
1
star
65

importvet

Go
1
star
66

sfyra

Sidero/Arges integration testbed
Go
1
star
67

net

Go package extending standard library package `net`
Go
1
star
68

stig

STIG compliance scripts
Shell
1
star
69

extras

Extra packages for Talos
Makefile
1
star
70

git-verify-chain

Go
1
star
71

capi-utils

CAPI bootstrapping and testing utilities
Go
1
star
72

katacoda-scenarios

A repo for hosting our Katacoda demos/tutorials.
Shell
1
star
73

go-gsuite

Go
1
star
74

go-kubernetes

Go library with helpers to interact with Kubernetes API
Go
1
star
75

go-copy

Go library for copying files and directories.
Makefile
1
star
76

bootkube-plugin

Go
1
star
77

talemu

Talos emulator that can simulate multiple Talos nodes at the same time
Go
1
star
78

gen

Collection of common functions and types for sidero projects.
Go
1
star