Giter VIP home page Giter VIP logo

jenkinslamp's Introduction

JenkinsLamp

A lamp for display the states of the jenkins jobs in the console and also with a real traffic light connected on raspberry pi.

Getting Started

These instructions will get you a copy of the project up and running on your local unix based machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You need node.js in version 8 or higher and a JavaScript package manager like yarn or npm.

node -v

For the real traffic light, you use a raspberry pi with three lamps.

Installing for console only

Checkout this repository and call the package manager for get the needed JavaScript libraries.

yarn install
or
npm install

Installing with real traffic light

You will also prepare the raspberry pi for use the GPIO connectors from node.js. Install the following python packages from rasbian repository:

apt-get python-dev python-rpi.gpio

For manual testing the GPIO connectors from raspberry pi you can use the WiringPi Tool.

Configuration

Rename the config.json.sample file to config.json. Change the host, port, user, password in the first section. If you use the JenkinsLamp on a raspberry pi then change the useLibrary to raspberryPiLamp.js.

"jenkins": {
  "host": "host from jenkins",
  "port": host from jenkins,
  "path": "/api/json?tree=jobs[name,color]",
  "pathNova": "/job/s16-backend-nova/api/json?tree=activeConfigurations[name,color,url]",
  "user": "the user",
  "password": "the password",
  "useLibrary": "pcLamp.js",
  "delay": 60000
}

Any lamp sections are a traffic light in the console.

{
  "id": "dev. job",
  "name": "develop  multibranch job",
  "enabled" : true,
  "job" : {
    "type" : "color",
    "path": "/job/s16/job/s16-multibranch-pipeline/job/develop/api/json?tree=name,color",
    "ignore": [],
    "colorJsonPath": "color"
  }

Running the tests

Currently there are no tests available

Start

Start the JenkinsLamp with:

node jenkinsLamp

Authors

  • Jonas schmid - Initial work - tuxmatta

License

This project is licensed under the MIT License - see the LICENSE.md file for details

jenkinslamp's People

Contributors

tuxmatta avatar

Watchers

James Cloos avatar  avatar  avatar  avatar  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.