Featured Community Plugin - Jenkins CI/CD

Featured Community Plugin - Jenkins CI/CD

This post is part of a series, featuring the incredible work of plugin authors who grow the TRMNL plugin ecosystem with every contribution. The TRMNL team has individually selected these plugins and authors to be featured.

Jenkins CI/CD

Community member Stephen Yeargin (Discord: stephenyeargin) created the Jenkins CI/CD plugin; here are their words on how it was created.

Why did you want this plugin to exist?

I've used Jenkins at various jobs for a rather long time, and decided a few years ago to start using it to orchestrate personal projects. I had a scheduled build fail and didn't get the notification, so I thought it would be nice to keep up with it on the TRMNL near my desk.

Were you inspired by any other recipes or plugin creators?

There are a handful of great plugins that monitor GitHub Actions workflows. I looked through those to understand the different ways to present the data.

How did you balance look vs functionality?

I lean into the Framework components to make most of the harder UI decisions for me so that I can focus more on making sure the data is timely and accurate. I tend to lean into function first, and improve the design through iteration.

What was your process for creating the plugin?

I have a GitHub repository template that I used as the base of it. From there, I read through the REST documentation for Jenkins and tested a few of the calls with Postman. I stuck to the general Job list in Jenkins to decide what was important. The TRMNLP application is indispensable for developing plugins.

What, if any, challenges did you face while creating it?

Jenkins uses weather icons to quickly identify the health of your builds. I needed to find SVG icons for each, and to make sure the logic picked the right one. From there, the next challenge was getting the JSON payload under the limit with the sandbox runtime. I also knew I wanted to let the user see either all jobs, or builds from a specific job, so I needed to work out the logic for that.

Did you learn anything that you want to apply to future or past recipes?

Using conditionals and assignments in the polling_url setting. It makes managing the data flow a bit easier and prevents unnecessary requests.

polling_url: |
{%- if my_setting_value -%}
https://example.org/api/endpoint_1?q={ my_setting_value }
{%- else %}
https://example.org/api/endpoint_2
{%- endif %}

Is there a tip you would give to a new plugin developer?

Follow the blog for new features and join the Discord server. Also, shared.liquid is your friend for not repeating a ton of markup for all four views.

What part of the TRMNL Framework, Liquid filters, or other documentation was most helpful?

Table Overflow is really useful to ensure the data fills the screen, but doesn't break the layout.

What is your favorite plugin that someone else created and why?

Paperboy is solid. It immediately reminded me of Freedom Forum's "Today's Front Pages" site, which I had bookmarked from when I worked for a newspaper.

What might you improve about the plugin in the future?

Not everyone has a dozen Jenkins Jobs, so I probably would come up with another view that showed them as cards in a grid.

Mario Lurig

Developer Relations Manager