GithubHelp home page GithubHelp logo

senstar-oss / elastic-logs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from masci/elastic-logs

0.0 0.0 0.0 1.73 MB

Fetch logs from GitHub workflows and ingest them to Elasticsearch

License: MIT License

JavaScript 1.40% TypeScript 98.60%

elastic-logs's Introduction

Elastic Logs Action

build-test

This action collect logs from a workflow run and send them to Elasticsearch

Kibana

Usage

some-job:
  runs-on: ubuntu-latest
  steps:
    - name: checkout
      uses: actions/checkout@v2
    - name: build
      run: this-will-fail
    - name: elastic-logs
      if: failure()
      uses: masci/elastic-logs@v1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        cloud-id: ${{ secrets.CLOUD_ID }}
        username: ${{ secrets.ES_USER }}
        password: ${{ secrets.ES_PASS }}
        job-names: build

Development

Install the dependencies

$ npm install

Lint, test and build the typescript and package it for distribution

$ npm run all

Run the tests ✔️

$ npm test

> [email protected] test
> jest

 PASS  __tests__/github.test.ts
  Test jobs list retrieval
    ✓ Retrieve the list of jobs (4 ms)
    ✓ Cannot retrieve the list of jobs (1 ms)
    ✓ Filter jobs by name
  Test logs retrieval
    ✓ Retrieve the logs (6 ms)
    ✓ Cannot retrieve the logs (1 ms)

 PASS  __tests__/logs.test.ts
  Test logs module
    ✓ conversion (8 ms)

 PASS  __tests__/run.test.ts
  Test config params
    ✓ Process job-names param (5 ms)
    ✓ Missing Elastic config params

Test Suites: 3 passed, 3 total
Tests:       8 passed, 8 total
Snapshots:   0 total
Time:        3.309 s, estimated 4 s
Ran all test suites.

elastic-logs's People

Contributors

masci avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.