keptn-send-event
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

keptn-send-event

Standard - JavaScript Style Guide

NPM

Send event to Keptn in Kubernetes cluster.

Example

import { send } from "keptn-send-event";

// If you select this section will use port-forwarding and Keptn API token will get from K8s secrets
const kubeSettings = `{
  "enabled": true,
  "namespace": "keptn",
  "secret": "keptn-api-token",
  "service": "api-gateway-nginx"
}`;

// If you have public Keptn URL and `enabled = false` please fill these settings
const keptnAuth = `{
  "keptnURL": "",
  "token": ""
}`;

const event = `{
  "data": {
    "project": "test",
    "stage": "develop",
    "service": "k6",
    "message": "",
    "status": "",
    "result": ""
  },
  "source": "gh",
  "specversion": "1.0",
  "type": "sh.keptn.event.develop.performance.triggered",
  "shkeptnspecversion": "0.2.3"
}`;

const keptnContext = send(event, keptnAuth, kubeSettings);

Readme

Keywords

Package Sidebar

Install

npm i keptn-send-event

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

12.9 kB

Total Files

20

Last publish

Collaborators

  • moon1706