dev

command
v0.0.51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

README

mindev

mindev is a command line utility to help you develop rules and profiles for Minder.

Building

From the minder root directory, run:

make build

Usage

mindev [command]
Testing a rule type
mindev ruletype test -e /path/to/entity -p /path/to/profile -r /path/to/rule

The entity is the path to the entity file, in case you're testing a rule type that's targetted towards a repository, the YAML must match the repository schema.

e.g.

name: my-repo
owner: my-org
repo_id: 123456789
clone_url: https://github.com/my-org/my-repo.git

The profile is the path to the profile file. This is needed to test the rule since rules often take definitions and parameters from the profile. Note that the profile must instantiate the rule type you're testing.

Finally, the rule type is the path to the rule type file.

Linting a rule type
mindev ruletype lint -r /path/to/rule

This will give you basic validations on the rule type file.

Documentation

Overview

Package main provides the entrypoint for the rule development cli

Directories

Path Synopsis
app
Package app provides the root command for the mindev CLI
Package app provides the root command for the mindev CLI
bundles
Package bundles contains logic relating to mindpak bundles
Package bundles contains logic relating to mindpak bundles
image
Package image provides the root command for the image subcommands
Package image provides the root command for the image subcommands
rule_type
Package rule_type provides the root command for the ruletype subcommands
Package rule_type provides the root command for the ruletype subcommands
testserver
Package testserver spawns a test server useful for integration testing.
Package testserver spawns a test server useful for integration testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL