Beginner

Using Jenkins dashboards with Screenly

Tutorial

Using Jenkins dashboards with Screenly
Jenkins standard view without Dashboard View plugin.

Jenkins is one of the most popular CI/CD tools around. Many organizations use Jenkins on dedicated wall-mounted screens. Screenly takes the pain out of managing these screens.

Creating your dashboards

The first thing you need to do in order to use Jenkins with Screenly is to decide what to view. Some users are happy with only displaying the front page, while others prefer to go a bit further and build custom dashboards using the Dashboard View plugin.

When building out your dashboards, you should keep the target resolution in mind. Most TVs are running 1920x1080px, so this is probably the resolution for which you want to optimize. Also, since you can cycle through multiple dashboards with Screenly, it may be better to break up your builds into multiple dashboards rather than trying to squeeze everything into a single dashboard.

Setting up authentication

After preparing your dashboards, copy the URL for the Jenkins dashboard you would like to display from your browser’s address bar.

Once you have your dashboards and the dashboard URLs ready, we can tackle the next piece: authentication. Authentication is a bit trickier since Jenkins supports a large number of authentication mechanisms but Screenly has made it easy by creating a ready-to-use Javascript snippet on the Screenly playground. Modifying this script with your Jenkins username and password allows you to log in to your Jenkins instance in Screenly.

To improve security, we recommend that you create a dedicated, locked-down (ideally, read-only) user account for the sole purpose of displaying your dashboards.

Adding your dashboards to Screenly

To display your Jenkins dashboard on your Screenly digital sign, make sure the Screenly player is connected to the same network as the computer running Jenkins. Armed with your dedicated user account and the URLs to your dashboards, we can now add your dashboards to Screenly. The recommended way to work with our JavaScript Injector is to use Screenly’s Command Line Interface, so visit our CLI repository for more information on how to work with the CLI.

To add your Jenkins dashboard to Screenly, simply add your dashboards as a new URL by running the following command on our CLI:

$ screenly asset add http://path-to-jenkins-dashboard Jenkins
+----------------------------+-------------+------+--------+
| Id                         | Title       | Type | Status |
+----------------------------+-------------+------+--------+
| XXXXXXXXXXXXXXXXXXXXXXXXXX | Jenkins     | N/A  | none   |
+----------------------------+-------------+------+--------+

After adding the asset to your Screenly account, it is important to store the Asset ID, as it will be referenced later. You can store the Asset ID for later by running the following command.

$ export ASSET_ID=XXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXX

With our asset created, we can now apply the JavaScript Injection for Jenkins authentication. Proceed to download jenkins-sign-in-via-credentials.js from Screenly’s playground and modify it with your credentials. Run the following command to add the JavaScript to the Jenkins dashboard.

$ screenly asset inject-js "$ASSET_ID" /path/to/script.js
20XX-XX-XXTXX:XX:XX.XXXZ INFO  [screenly] Asset updated successfully.

After running the above command, your Jenkins dashboard should display correctly on your screen instead of the Jenkins login page.

We are here to help

For more information on how to make use of our CLI, visit the repository for our CLI on github. To learn more about our javascript injector feature, you can also visit Screenly’s playground on github. If you have any trouble integrating Jenkins with Screenly, let us know at Screenly Support. We are here to help!

Recent Tutorials

Display your best content with Screenly digital signs.

Screenly is loaded with features to make digital signage management easy.

footer screen image
manage cookies