insight-plugin

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

insight-plugin

Build Status codecov Go Report Card License Tag

Introduction

insight-plugin is the insight plugin of devops-pipeflow written in Go.

Prerequisites

  • Go >= 1.18.0

Run

version=latest make build
./bin/insight --config-file="$PWD"/config/config.yml

Usage

usage: insight --config-file=CONFIG-FILE [<flags>]

insight plugin


Flags:
  --[no-]help                Show context-sensitive help (also try --help-long
                             and --help-man).
  --[no-]version             Show application version.
  --config-file=CONFIG-FILE  Config file (.yml)
  --log-level="INFO"         Log level (DEBUG|INFO|WARN|ERROR)

Settings

insight-plugin parameters can be set in the directory config.

An example of configuration in config.yml:

apiVersion: v1
kind: insight
metadata:
  name: insight
spec:
  sights:
    - name: buildSight
      enable: true
    - name: codeSight
      enable: false
    - name: gptSight
      enable: false
  repo:
    url: 127.0.0.1:8080
    user: user
    pass: pass
  review:
    url: 127.0.0.1:8081
    user: user
    pass: pass
  gpt:
    url: 127.0.0.1:8082
    user: user
    pass: pass

Output

{
  "sights": [
    {
      "name": "buildSight",
      "sight": {
        "file": "name",
        "line": 1,
        "type": "error",
        "details": "text"
      },
      "repo": {
        "project": "name",
        "branch": "name",
        "commit": "hash",
        "committer": "name <name@example.com>",
        "author": "name <name@example.com>",
        "message": "base64",
        "date": "2023-01-01T12:34:56+0800"
      },
      "review": {
        "project": "name",
        "branch": "name",
        "change": 1,
        "owner": "name <name@example.com>",
        "author": "name <name@example.com>",
        "message": "base64",
        "date": "2023-01-01T12:34:56+0800"
      }
    }
  ]
}

sights.sight.type: sight type

The sight type in sights.sight.type should be one of below:

error

warn

info

License

Project License can be found here.

Reference

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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