Table: jenkins_plugin - Query Jenkins Plugins using SQL
Jenkins Plugins are integral parts of Jenkins that add additional feature sets to the Jenkins core functionality. They provide a wide range of capabilities, from building and testing code to managing deployments and automating tasks. Plugins can be installed, updated, and managed via the Jenkins administrative console.
Table Usage Guide
The jenkins_plugin
table provides insights into the plugins within Jenkins. As a Jenkins administrator or DevOps engineer, explore plugin-specific details through this table, including its name, version, enabled status, and more. Utilize it to manage and monitor the plugins, ensuring the optimal operation of your Jenkins environment.
Examples
Plugins with updates available
Discover the segments that have available updates for Jenkins plugins. This is useful for maintaining system efficiency and ensuring the use of the latest plugin features.
select short_name, version, long_name, urlfrom jenkins_pluginwhere has_updateorder by short_name;
select short_name, version, long_name, urlfrom jenkins_pluginwhere has_update = 1order by short_name;
Inactive plugins
Determine the areas in which plugins are inactive in your Jenkins environment. This can help in identifying unused resources and optimizing system performance.
select short_name, long_name, urlfrom jenkins_pluginwhere not activeorder by short_name;
select short_name, long_name, urlfrom jenkins_pluginwhere active = 0order by short_name;
Plugins without a backup version
Identify Jenkins plugins that do not have a backup version. This is useful in understanding which plugins need attention for backup management, thereby reducing the risk of data loss.
select short_name, long_name, urlfrom jenkins_pluginwhere backup_version is nullorder by short_name;
select short_name, long_name, urlfrom jenkins_pluginwhere backup_version is nullorder by short_name;
Number of dependencies of each plugin
Explore the complexity of each plugin by determining the number of dependencies it has, which can help in understanding the intricacies and interconnectivity within your Jenkins environment.
select short_name, long_name, jsonb_array_length(dependencies) number_of_dependenciesfrom jenkins_pluginorder by short_name;
select short_name, long_name, json_array_length(dependencies) as number_of_dependenciesfrom jenkins_pluginorder by short_name;
Plugins with no dependencies
This query is useful to identify plugins in your Jenkins environment that are not dependent on any others. This can help streamline your system by making it easier to manage or remove standalone plugins.
select short_name, long_namefrom jenkins_pluginwhere dependencies = '[]' :: jsonborder by short_name;
select short_name, long_namefrom jenkins_pluginwhere dependencies = '[]'order by short_name;
Schema for jenkins_plugin
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
active | boolean | Boolean to indicate whether the plugin is active. | |
backup_version | text | The backup version of the plugin available for downgrade. | |
bundled | boolean | Boolean to indicate whether the plugin is bundled with Jenkins in the WAR file. | |
deleted | boolean | Boolean to indicate whether the plugin has been deleted. | |
dependencies | jsonb | A list of other plugins this depends on. | |
downgradable | boolean | Boolean to indicate whether a downgrade can be performed on the plugin. | |
enabled | boolean | Boolean to indicate whether the plugin is enable. | |
has_update | boolean | Boolean to indicate when an update is available. | |
long_name | text | A human-readable full name of the plugin. | |
pinned | boolean | Boolean to indicate whether the plugin is pinned on UI. | |
short_name | text | Unique key for the plugin. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
supports_dynamic_load | text | Boolean to indicate whether the plugin can be dynamically loaded. | |
title | text | The title of the resource. | |
url | text | Full URL to the installed plugin. | |
version | text | Current installed version. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- jenkins
You can pass the configuration to the command with the --config
argument:
steampipe_export_jenkins --config '<your_config>' jenkins_plugin