Skip to main content

Jenkins

Jenkins is a leading open-source automation server and continuous integration/continuous delivery (CI/CD) platform used for automating software development processes including building, testing, and deploying applications. This data integration platform provides comprehensive visibility into Jenkins infrastructure, automation pipelines, build processes, job configurations, and execution history.

CategorySource control & CI/CD
DirectionQuery source
Sign-inUsername and Password/API Token
Query languagesSQLite
Tables8
Query templates39
Websitejenkins.io

Before you start​

Huntbase signs in to Jenkins with Username and Password/API Token. Create the credential in Jenkins first, then keep it to hand for the Connect step.

  1. Sign in to Jenkins as the user Huntbase should connect as.
  2. Click your name in the top-right corner, then click Security. You can also go to <server>/me/security.
  3. Create or copy your API token there.
Watch out for
  • The connection has the same permissions as the Jenkins user it signs in as.

For the vendor's own instructions, see Jenkins API token documentation.

tip

Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.

Connect Jenkins​

  1. Go to Connections and click New connection, or click New connection on the Jenkins product page.
  2. On Product, pick Jenkins and choose the Owner.
  3. On Details, give the connection a Name and, optionally, a Description.
  4. On Connect, fill in the settings and credentials described below.
  5. On Verify, review the summary and click Create & check.

For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.

Settings​

Where your Jenkins lives:

FieldRequiredNotes
Server URLYesThe fully qualified root URL of your Jenkins server, such as https://ci.example.com.
UsernameYes

Credentials​

The only Method is Username and Password/API Token. Enter a Credential label (for example Production), then fill in:

FieldRequiredNotes
Password/API TokenYesUse an API token here rather than the account password. Secret — not shown again after you save it.

Query it​

Once connected, Jenkins can serve these languages in a query tab, and Scout can use it when you ask in Auto:

LanguageUse it for
SQLiteSQL over the 8 tables listed below, alongside every other connected source.

Example: SQLite​

Total number of nodes — Count the total number of nodes in a Jenkins environment to understand the scale of build and test infrastructure.

select
count(1) as number_of_nodes
from
jenkins_node;

Jenkins ships with 39 query templates. Find them in Library › Queries — see Query templates.

Tables​

Jenkins adds 8 tables. Browse their columns from Schema in the query bar's ⋯ menu.

All 8 tables
TableContains
jenkins_buildResult of a single execution of a job
jenkins_folderA container that stores job projects in it. Unlike view, which is just a filter, a folder creates a separate namespace, so you can have multiple things of the same name as long as they are in different folders.
jenkins_freestyle_projectA user-configured description of work which Jenkins should perform, such as building a piece of software, etc.
jenkins_jobA user-configured description of work which Jenkins should perform. This table is a generic representation of a Jenkins Job.
jenkins_nodeA machine which is part of the Jenkins environment and capable of executing Pipelines or jobs.
jenkins_pipelineOrchestrates long-running activities that can span multiple build agents. Suitable for building pipelines (formerly known as workflows) and/or organizing complex activities that do not easily fit in free-style job type.
jenkins_pluginAn extension to Jenkins functionality provided separately from Jenkins Core.
jenkins_userAn extension to Jenkins functionality provided separately from Jenkins Core.

Next steps​