The CIMonitor is a place where all your project statuses come together. Check if all tests have passed, and if deployments are successful. All in one overview.
And if that's not enough for you, why not attach some epic hardware that will represent the status of your projects! Attach a traffic light, run marbles when a deployment is successful. The sky is the limit!
- Push all your test/deployment statuses to a real-time dashboard
- Hook up some epic status modules to have fun with your statuses
- Download CIMonitors source code onto your raspberry pi (or other machine)
- Run
npm install --production - Make sure you have pi-blaster running on your pi
- Copy the config file (
cp app/Config/config.dist.json app/Config/config.json) and make changes accordingly. - To start the server, run
node app/server.js. - The dashboard is now available on the port you provided.
To push GitLab build statuses to the CIMonitor, you need to configure a web-hook in GitLab under the project settings.
Enter a URL to your running CIMonitor instance ending on /gitlab. So for example: https://ci.example.org/gitlab.
Note that there is no support yet for a token, so uncheck that option.
With build statuses checked, the CIMonitor should fill up with all your builds!
- Configure your test and deployment environments to push status
updates to your running machine, by posting to
/status:
{
"project": "CIMonitor",
"branch": "master",
"type": "deploy OR test",
"status": "started OR failure OR success",
"note": "This field is optional"
}- Now for every build, the dashboard should display the status!
To add a status module to your application, you need to provide the
configuration for that module in the global config file
(app/Config/config.json) in the statusModules object:
{
"_comment": "global config...",
"statusModules": {
"_comment": "place your module configs in here"
}
}In case you want to have a second raspberry pi running, but listen to the same statuses, you can provide a web hook URL to the other running CIMonitor. That way all the statuses that are pushed to the dashboard, are pushed to the second CIMonitor instance as well. To make this work, add a listen URL in your config:
{
"listenUrl": "http://ci.example.org"
}The same URL should be used as the status dashboard.
Currently modules are pre-installed in the repository, later this will be npm modules so can be added with ease.
Run a (or multiple) marble(s) for every event you configured. Requires one GPIO port which is connected to a relay. The relay will turn on for a limited time, releasing a marble into the track.
"MarbleRun": {
"globalConfig": {
"oneMarbleFireTime": 390,
"runDuration": 13000,
"maxMarbles": 10,
"gpioPin": 7
},
"events": [
{
"on": {
"status": "success",
"type": "deploy"
},
"do": {
"fireAmount": 3
}
},
"_comment": "You can add as may events as you want"
]
}Display the status of your board with a led-strip. Red for a failure, orange for an active process, and green for success!
To have an awesome led-strip added to your CIMonitor, you need to do some hardware hacking first. There is a step by step tutorial here. When you've done that, all you need to do is configure the correct gpio pins used. NOTE: we use pi-blaster, the gpio numbers might be different, so we recommend that you test the gpio pins first.
Note that the started and failure statuses will be blinking.
When the led strip is on the success status for 5 minutes, it will go to the "neutral". This so it the light doesn't have to be super bright when not used for a while.
"LedStrip": {
"globalConfig": {
"gpioPinRed": 23,
"gpioPinGreen": 24,
"gpioPinBlue": 18,
"_comment": "everything below is optional",
"colors": {
"failure": {
"r": 255,
"g": 0,
"b": 0,
"intensity": 100
},
"success": {
"r": 0,
"g": 255,
"b": 0,
"intensity": 100
},
"started": {
"r": 255,
"g": 50,
"b": 0 ,
"intensity": 100
},
"_comment": "The neutral color is shown after 5 minutes of success",
"neutral": {
"r": 0,
"g": 255,
"b": 0,
"intensity": 30
}
}
},
}Display the status of your board with a traffic light. Requires a green, orange and red light bulb. Requires 3 GPIO pins connected to a on/off relay.
"TrafficLight": {
"globalConfig": {
"gpioPinRedLight": 11,
"gpioPinOrangeLight": 12,
"gpioPinGreenLight": 13
}
}Power a module for a couple of seconds for the events you configured. Maybe flash a beacon light for every status change? Requires a gpio pin connected to a relay.
"PowerUp": {
"events": [
{
"on": {
"status": "started"
},
"do": {
"powerForMiliSeconds": 5000,
"gpioPin": 14
}
},
{
"on": {
"status": "failure"
},
"do": {
"powerForMiliSeconds": 5000,
"gpioPin": 15
}
}
]
}Note: You can choose what gpio pin to switch on for a configured duration per matched event. This way you are not limited in the amount of relay switches you want to power on.
If you want to run this project in development mode, all you need to do
is run npm install && npm install -g gulp once, and then gulp to
start the project and run file watchers.
To emulate statuses sent to the dashboard, there is a postman collection available here.

