heikkipora / gitlab-radiator

The missing GitLab build radiator view
MIT License
16 stars 22 forks source link
gitlab-ci radiator

The missing GitLab build radiator view

Introduction

gitlab-radiator is a small Node.js application for serving a Jenkins Radiator View inspired web view of your team's CI pipelines fetched from a GitLab CI installation running locally or remotely.

npm version Run tests

Pre-requisites

Installation

npm install -g gitlab-radiator

Usage

Create a configuration file (see Configuration below) and run:

gitlab-radiator

And if you have an onsite GitLab with HTTPS and self-signed certificates:

NODE_TLS_REJECT_UNAUTHORIZED=0 gitlab-radiator

You might prefer providing the CA file location in configuration instead of totally disabling TLS certificate checking.

Then navigate with a browser to http://localhost:3000 - or whatever port you did configure.

URL parameters

In addition to server-side configuration, gitlab-radiator views can be customized by providing URL parameters. This comes in handy especially when multiple physical screens are pointed to the same server instance.

Multi-screen support

It's possible to split the radiator view to multiple physical screens by specifying the total number of screens and the current screen with the screens URL parameter. The parameter value format is XofY where X is the number of the screen in question (1...total), and Y is the total number of screens (max 9).

Example: http://localhost:3000/?screen=2of3

Overriding number of columns and zoom level

Want to display a radiator view on your own display with different layout from that displayed on multiple displays on the nearest wall? columns and zoom configuration values (see Configuration section below) can be overriden for a single user / browser by providing them as URL parameters.

Example: http://localhost:3000/?columns=2&zoom=0.8

Selecting projects to display based on GitLab Project Tags

Tags can be used, for example, to only include a specific set of projects for a specific display on your wall. Multiple tags can be specified by separating them with a comma.

Example: http://localhost:3000/?tags=old,useful

Specifying an empty tag list http://localhost:3000/?tags= selects all projects which do not have any tags. This can be handily used to select "rest of the projects" that have not been tagged to a specific display, for example.

Configuration

gitlab-radiator looks for its mandatory configuration file at ~/.gitlab-radiator.yml by default. It can be overridden by defining the GITLAB_RADIATOR_CONFIG environment variable.

Mandatory configuration properties:

Example yaml syntax:

gitlabs:
  -
    access-token: 12invalidtoken12
    url: https://gitlab.com

Optional configuration properties:

Example yaml syntax:

gitlabs:
  -
    access-token: 12invalidtoken12
    url: https://gitlab.com
    projects:
      exclude: .*/.*-inactive-project
      excludePipelineStatus: ['canceled', 'pending']
    maxNonFailedJobsVisible: 3
projectsOrder: ['status', 'name']
auth:
  username: 'radiator'
  password: 'p455w0rd'
interval: 30
port: 8000
zoom: 0.85
columns: 4
colors:
  success-background: 'rgb(0,255,0)'

Changelog

See releases.

Contributing

Pull requests are welcome. Kindly check that your code passes ESLint checks by running npm run eslint first. Tests are run automatically for pull requests by Github Actions against a test profile with a few CI pipelines on gitlab.com

Contributors