Skip to content

Instantly share code, notes, and snippets.

View gbhat618's full-sized avatar

Guruprasad Bhat gbhat618

View GitHub Profile
@gbhat618
gbhat618 / multiple-job-finish-at-same.time.md
Created September 5, 2025 07:41
jenkins multiple job finish at same time

Notes

create jobs

You may have one or more jobs as,

job-1, job-2 (important is adding the input step)

node ('inbound') {
 echo 'I did lot of work'
@gbhat618
gbhat618 / jenkins_test_failures.py
Created August 12, 2025 14:01
Create and activate virtualenv -- `uv venv .venv && source .venv/bin/activate && uv pip install requests beautifulsoup4`; Example execution `python jenkins_test_failures.py --jobUrl https://ci.jenkins.io/job/Core/job/jenkins/job/PR-10607 --from=1 --to=10`
import argparse
import logging
import sys
from typing import List, Dict
import requests
from bs4 import BeautifulSoup
class JenkinsTestFailureScraper:
def __init__(self, job_url: str, build_from: int, build_to: int):
self.job_url = job_url.rstrip('/')
@gbhat618
gbhat618 / changes-testMatrix120.diff
Created April 9, 2025 06:49
Zip File Git Diffs -- build-failure-analyzer-plugin/pull/209
diff --git a/jobs/mymatrix/builds/2013-01-30_13-13-27/build.xml b/jobs/mymatrix/builds/1/build.xml
similarity index 97%
rename from jobs/mymatrix/builds/2013-01-30_13-13-27/build.xml
rename to jobs/mymatrix/builds/1/build.xml
index 50fd069..b8ab8ec 100644
--- a/jobs/mymatrix/builds/2013-01-30_13-13-27/build.xml
+++ b/jobs/mymatrix/builds/1/build.xml
@@ -25,7 +25,7 @@
</causes>
</hudson.model.CauseAction>
This file has been truncated, but you can view the full file.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.jenkins-ci.main:jenkins-test >------------------
[INFO] Building Tests for Jenkins core 2.504-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- buildnumber:3.2.1:create (default) @ jenkins-test ---
[INFO] Executing: /bin/sh -c cd '/.../jenkins/test' && 'git' 'rev-parse' '--show-prefix'
[INFO] Working directory: /.../jenkins/test
@gbhat618
gbhat618 / example_output.txt
Last active February 28, 2025 02:01
Usage: pr_author_list.sh <owner> <repo> <base_release_tag> <head_release_tag>
→ bash pr_author_list.sh jenkinsci github-plugin v1.41.0 v1.42.0
Fetching contributors between releases: v1.41.0 → v1.42.0
Fetching commits for release diff...
Commit Date Range: 2025-01-23T01:42:39Z → 2025-02-21T20:55:07Z
Processed PR page 1...
No more PRs found in date range.
Unique Contributors and PRs:
* https://github.com/jenkinsci/github-plugin/pull/382 - Author: strangelookingnerd
* https://github.com/jenkinsci/github-plugin/pull/386 - Author: strangelookingnerd
@gbhat618
gbhat618 / pg_cursor_debug.py
Created April 20, 2024 09:52
pg_cursor_debug
import psycopg2
from psycopg2 import pool
import uuid
from config import Configs
class PGReadExample:
def __init__(self):
self.conf = Configs()
@gbhat618
gbhat618 / gist:f4917042f1f73cad2b09a2a32da59633
Created May 3, 2020 13:05
Activate Windows Defender after rKill
Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "0" /f
Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d "0" /f
Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d "0" /f
Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d "0" /f
Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableRealtimeMonitoring" /f
@gbhat618
gbhat618 / gist:7f1ca086d101540e6667153ba8c18467
Created May 3, 2020 09:36
Windows DNS Refresh :: Powershell
netsh winsock reset catalog
netsh int ip reset reset.log
ipconfig /flushdns
ipconfig /registerdns
route /f
@gbhat618
gbhat618 / django_con_details.py
Created August 7, 2019 09:59
Getting the current django database information
from django.db import connection
db_name = connection.settings_dict['NAME']
# Or alternatively
# db_name = connection.get_connection_params()['db']
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the countingValleys function below.
def countingValleys(n, s):