This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" \ |
OlderNewer