Giter Club home page Giter Club logo

gitactionboard's Introduction

Gitaction Board

All Contributors Docker Pulls Version Docker Image Size Release Date

Gitaction Board - Ultimate Dashboard for GithubActions.

Table of contents

Changelog

Changelog can be found here.

Contributing

To contribute to GitactionBoard, have a look at our contributing guidelines.

Features

  • Monitor workflow run status across multiple public and private repositories
  • Monitor secret scan alerts across multiple repositories
  • Monitor code scan alerts across multiple repositories
  • Show/hide specific workflow job status from UI
  • Send alerts to MS Teams in case of failures
  • Get workflow run details across multiple repositories in CCTray XML and JSON format
  • Get secret scan alerts across multiple repositories in JSON format
  • Get code scanning alerts across multiple repositories in JSON format
  • Hide all healthy builds from build monitor
  • In-built basic auth and GitHub OAuth2 login mechanism
  • Cache GitHub API response for configured time to avoid rate limit issue

Usage

Pull docker image

docker pull ottoopensource/gitactionboard:<docker tag>

Run docker image

docker run \
  -p <host machine port>:8080 \
  -e REPO_OWNER_NAME=<organization/username> \
  -e REPO_NAMES=<repo names as comma separated value> \
  -it ottoopensource/gitactionboard:<docker tag>

# example:
#docker run \
#--env REPO_OWNER_NAME=webpack \
#--env REPO_NAMES=webpack-cli,webpack-dev-server \
#-p 8080:8080 \
#-it ottoopensource/gitactionboard:latest

Configurations

Environment variable name Descriptions Required Default value Example value
REPO_OWNER_NAME Repository owner name. Generally, its either organization name or username yes webpack
REPO_NAMES List of name of repositories you want to monitor yes webpack-dev-server, webpack-cli
GITHUB_ACCESS_TOKEN Access token to fetch data from github. This is required to fetch data from a private repository when github oauth2 is disabled no
DOMAIN_NAME Hostname of github no https://api.github.com
CACHE_EXPIRES_AFTER Duration (in seconds) to cache the fetched data no 60
GITHUB_OAUTH2_CLIENT_ID GitHub oauth2 client ID no
GITHUB_OAUTH2_CLIENT_SECRET Gihub oauth2 client secret no
BASIC_AUTH_USER_DETAILS_FILE_PATH File location for basic auth user details no /src/.htpasswd
MS_TEAMS_NOTIFICATIONS_WEB_HOOK_URL Web hook url to send build failure notifications on Microsoft Teams (available from v2.1.0) no
ENABLE_GITHUB_SECRETS_SCAN_ALERTS_MONITORING Display GitHub secret scan alerts on dashboard (available from v3.0.0) no false true
ENABLE_GITHUB_CODE_SCAN_ALERTS_MONITORING Display code stanard violations on dashboard (available from v3.0.0) no false true
Notes
  • To create a personal access token follow the instructions present here and choose repo as a scope fot this token.
  • To create incoming webhook connection for MS Teams channel follow the instructions present here.
Authentication

From v2.0.0, gitactionboard has out of the box solution for authentication. Currently, there are following authentication mechanism available

Basic Authentication

Basic authentication is the simplest form of authentication. In this mechanism we make use of username and password to login.

In gitactionboard, Basic Authentication can be easily setup using BASIC_AUTH_USER_DETAILS_FILE_PATH environment variable. This file contains username and password in <username>:<encrypted password using bcrypt> format. We can make use of Apache htpasswd to easily create this file. You can run the following command to create the file using CLI,

htpasswd -bnBC 10 <username> <password> >> <file location>
GitHub OAuth2

In gitactionboard, GitHub OAuth2 login can be easily setup using GITHUB_OAUTH2_CLIENT_ID and GITHUB_OAUTH2_CLIENT_SECRET environment variable. To be able to have a valid client id and client secret from GitHub, we need to create a GitHub OAuth app first. To create a GitHub oauth app, please follow this link.

Note you need to add Authorization callback URL as <homepage url>/login/oauth2/code/github.

⚠️ In-case the gitactionboard server is running behind a proxy, you need to set the above Authorization callback URL to SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_GITHUB_REDIRECT-URI environment variable.

⚠️ In-case of GitHub OAuth2 is disabled, gitactionboard will make use of GITHUB_ACCESS_TOKEN to fetch data from GitHub for private repositories.

UI Dashboard

Gitaction Board has in-built UI dashboard to visualize the build status. You can access the following endpoint for the same

  • http://localhost:<host machine port>

UI dashboard sample 1 UI dashboard sample 2 UI dashboard sample 3 UI login_sample preference sample

UI Dashboard Configurations

From v2.0.0 onwards, preference page can be used to manage UI dashboard configuration.

Prior to v2.0.0, query params can be used to configure UI dashboard. Please find possible query params below,

Query param name Descriptions Required Default value Example value
hide-healthy Hide all the healthy builds from the dashboard no false true
max-idle-time Configure the max idle time (in minutes), after the given time background polling for dashboard will stop no 5 2
disable-max-idle-time Disable background polling optimisation configured using max-idle-time no false true

API

Once server is up, you can access the following endpoints

Workflows Data in CCtray XML format

Access http://localhost:<host machine port>/v1/cctray.xml to get data in XML format

Sample response
<Projects>
    <Project name="hello-world :: hello-world-build-and-deployment :: talisman-checks" activity="Sleeping" lastBuildStatus="Success" lastBuildLabel="206" lastBuildTime="2020-09-18T06:11:41Z" webUrl="https://github.com/johndoe/hello-world/runs/1132386046"/>
    <Project name="hello-world :: hello-world-build-and-deployment :: dependency-checks" activity="Sleeping" lastBuildStatus="Success" lastBuildLabel="206" lastBuildTime="2020-09-18T06:14:54Z" webUrl="https://github.com/johndoe/hello-world/runs/1132386127"/>
    <Project name="hello-world :: hello-world-checks :: format" activity="Sleeping" lastBuildStatus="Success" lastBuildLabel="206" lastBuildTime="2020-09-18T06:11:41Z" webUrl="https://github.com/johndoe/hello-world/runs/1132386046"/>
    <Project name="hello-world :: hello-world-checks :: test" activity="Sleeping" lastBuildStatus="Success" lastBuildLabel="206" lastBuildTime="2020-09-18T06:14:54Z" webUrl="https://github.com/johndoe/hello-world/runs/1132386127"/>
</Projects>
Workflows Data in CCtray JSON format

Access http://localhost:<host machine port>/v1/cctray to get data in JSON format

Sample response
[
  {
    "name": "hello-world :: hello-world-build-and-deployment :: talisman-checks",
    "activity": "Sleeping",
    "lastBuildStatus": "Success",
    "lastBuildLabel": "206",
    "lastBuildTime": "2020-09-18T06:11:41.000Z",
    "webUrl": "https://github.com/johndoe/hello-world/runs/1132386046"
  },
  {
    "name": "hello-world :: hello-world-build-and-deployment :: dependency-checks",
    "activity": "Sleeping",
    "lastBuildStatus": "Success",
    "lastBuildLabel": "206",
    "lastBuildTime": "2020-09-18T06:14:54.000Z",
    "webUrl": "https://github.com/johndoe/hello-world/runs/1132386127"
  },
  {
    "name": "hello-world :: hello-world-checks :: format",
    "activity": "Sleeping",
    "lastBuildStatus": "Success",
    "lastBuildLabel": "206",
    "lastBuildTime": "2020-09-18T06:11:41.000Z",
    "webUrl": "https://github.com/johndoe/hello-world/runs/1132386046"
  },
  {
    "name": "hello-world :: hello-world-checks :: test",
    "activity": "Sleeping",
    "lastBuildStatus": "Success",
    "lastBuildLabel": "206",
    "lastBuildTime": "2020-09-18T06:14:54.000Z",
    "webUrl": "https://github.com/johndoe/hello-world/runs/1132386127"
  }
]
Secrets Scan Alerts Data in JSON format

Access http://localhost:<host machine port>/v1/alerts/secrets to get security scan alerts data in JSON format

Sample response
[
  {
    "id": "hello-world::Amazon AWS Secret Access Key::3",
    "name": "hello-world :: Amazon AWS Secret Access Key",
    "url": "https://github.com/johndoe/hello-world/security/secret-scanning/3",
    "createdAt": "2022-07-26T11:12:02.000Z"
  },
  {
    "id": "hello-world::Amazon AWS Access Key ID::2",
    "name": "hello-world :: Amazon AWS Access Key ID",
    "url": "https://github.com/johndoe/hello-world/security/secret-scanning/2",
    "createdAt": "2022-07-26T09:39:07.000Z"
  },
  {
    "id": "hello-world::Amazon AWS Secret Access Key::1",
    "name": "hello-world :: Amazon AWS Secret Access Key",
    "url": "https://github.com/johndoe/hello-world/security/secret-scanning/1",
    "createdAt": "2022-07-26T09:39:07.000Z"
  }
]
Code Scan Alerts Data in JSON format

Access http://localhost:<host machine port>/v1/alerts/code-standard-violations to get code standard violation alerts data in JSON format

Sample response
[
  {
    "id": "hello-world::Arbitrary file write during zip extraction::4",
    "name": "hello-world :: api-session-spec.ts:917-917 :: Arbitrary file write during zip extraction",
    "url": "https://github.com/johndoe/hello-world/code-scanning/4",
    "createdAt": "2020-02-13T12:29:18.000Z"
  },
  {
    "id": "hello-world::Redundant else condition::3",
    "name": "hello-world :: api-session-spec.ts:918-918 :: Redundant else condition",
    "url": "https://github.com/johndoe/hello-world/code-scanning/3",
    "createdAt": "2020-02-12T12:29:18.000Z"
  }
]

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Suman Maity
Suman Maity

💻 🚧 🤔 📖 🛡️
umeshnebhani733
umeshnebhani733

💻 🚧 🤔 🛡️
sankita15tw
sankita15tw

💻 🎨
Stefan Greis
Stefan Greis

💻
Shashi
Shashi

🤔
Jonas
Jonas

🤔
BastianSperrhacke-Otto
BastianSperrhacke-Otto

🐛
Simon Weiler
Simon Weiler

💻
dependabot[bot]
dependabot[bot]

💻
baztian
baztian

🐛
Ogbeide Godstime Osemenkhian
Ogbeide Godstime Osemenkhian

🐛
Sven Finke
Sven Finke

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

gitactionboard's People

Contributors

dependabot[bot] avatar sankita15tw avatar stdogr avatar sumanmaity1234 avatar svenfinke avatar sweiler avatar umeshnebhani733 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.