dev

command
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 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

ruletype test is intended for testing a single rule; the entity definition must match the rule's def.in_entity type. The tested entity is defined as a set of YAML properties in the entity file; for example, if you're testing a rule type that's targetted towards a repository, the YAML must match the repository schema.

e.g.

github/repo_name: my-repo
github/repo_owner: my-org
github/repo_id: 123456789
github/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