insight-plugin

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.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/example --config-file="$PWD"/config/config.yml

Usage

devops-pipeflow insight-plugin

Usage:
  insight-plugin [flags]

Flags:
  -c, --config-file string   config file (.yml)
  -h, --help                 help for insight-plugin
  -v, --version              version for insight-plugin

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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