Skip to content

Instantly share code, notes, and snippets.

# Directory where plugin .hpi files will be stored
# File: plugins.yaml
# Define plugins with specific versions
# Example YAML file to track plugin versions
---
plugins:
- name: git
version: 5.1.0
@Java4all
Java4all / gist:0c9206c687633c2030650d5f523eb99b
Last active July 12, 2025 00:45
Plugins dependency check
# cli.py
import argparse
import os
from main import analyze_plugin
def main():
parser = argparse.ArgumentParser(
description="\U0001F9E9 Jenkins Plugin Compatibility Analyzer",
formatter_class=argparse.ArgumentDefaultsHelpFormatter
inal Version — jenkins_audit.py
python
#!/usr/bin/env python3
import argparse
import os
import requests
from packaging.version import Version, InvalidVersion
from tabulate import tabulate
# Instance ID
INSTANCE_ID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
# Region
REGION=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document \
| jq -r '.region')
# Fetch the "Name" tag
NAME=$(aws ec2 describe-tags \
--region $REGION \
jenkins_create_token() {
local user=$1 pass=$2 name=$3 jurl=$4
# Get CSRF crumb
local crumb
crumb=$(curl -s -u "$user:$pass" \
"$jurl/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\":\",//crumb)")
# Create token
curl -s -u "$user:$pass" \