This file contains 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
// ==UserScript== | |
// @name Hide successful pipeline steps | |
// @version 2 | |
// @grant none | |
// @match https://jenkins-itest.spirenteng.com/jenkins*/job/*/flowGraphTable/ | |
// ==/UserScript== | |
//icon-blue |
This file contains 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
// ==UserScript== | |
// @name Jenkins RCPTT useful shortcuts | |
// @version 4 | |
// @match https://ci.eclipse.org/* | |
// @match https://ci.eclipse.org/rcptt/view/active/job/master/1723/ | |
// @grant none | |
// ==/UserScript== | |
function log() { |
This file contains 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
// Check if a slave has < 50 GB of free space, wipe out workspaces if it does | |
import hudson.model.*; | |
import hudson.util.*; | |
import jenkins.model.*; | |
import hudson.FilePath.FileCallable; | |
import hudson.slaves.OfflineCause; | |
import hudson.node_monitors.*; | |
This file contains 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
// Check if a slave has < 10 GB of free space, wipe out workspaces if it does | |
import hudson.model.*; | |
import hudson.util.*; | |
import jenkins.model.*; | |
import hudson.FilePath.FileCallable; | |
import hudson.slaves.OfflineCause; | |
import hudson.node_monitors.*; | |
import org.jenkinsci.plugins.workflow.job.WorkflowRun | |
import org.jenkinsci.plugins.workflow.flow.FlowExecution; |
This file contains 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
import java.util.Objects; | |
/** Executes a runnable as a critical section but without any blocking. | |
* Number of executions is not guaranteed to match a number of invocations. | |
* Last invocation happens-before last execution. | |
* | |
* **/ | |
public final class ExclusiveRunner implements Runnable { | |
private final Runnable delegate; | |
private final Object lock = new Object(); |
This file contains 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
import java.util.Objects; | |
import java.util.concurrent.Semaphore; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
/** Executes a runnable as a critical section but without any blocking. | |
* Number of executions is not guaranteed to match a number of invocations. | |
* Last invocation happens-before last execution. | |
* | |
* **/ | |
public final class ExclusiveRunner implements Runnable { |
This file contains 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
#!/usr/bin/python3 | |
#from jenkins import Jenkins | |
#from os import environ | |
from tempfile import TemporaryFile, gettempdir | |
from os.path import join, exists | |
from zipfile import ZipFile | |
from requests import get | |
from pprint import pprint |
This file contains 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
[Unit] | |
Description=Reset touchpad after suspend | |
After=suspend.target | |
[Service] | |
User=root | |
Type=oneshot | |
ExecStart=modprobe -r psmouse ; modprobe psmouse | |
TimeoutSec=0 | |
StandardOutput=syslog |
This file contains 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
public static void importProjectFromBundleResource(IWorkspace workspace, Bundle bundle, IPath projectPathInBundle) { | |
try { | |
URL descriptionUrl = bundle.getEntry(projectPathInBundle.append(".project").toPortableString()); | |
IProjectDescription description; | |
try(InputStream descriptorStream = descriptionUrl.openStream()) { | |
description = workspace.loadProjectDescription(descriptorStream); | |
} | |
description.setLocationURI(null); | |
IProject project = workspace.getRoot().getProject(description.getName()); | |
workspace.run(monitor -> { |
This file contains 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
#!/bin/bash | |
# updateGerritChange.sh | |
# | |
# Updates an existing Gerrit change for master branch with a state of current Git branch based on that change | |
# | |
# Allows to keep a history of changes for a Gerrit change in a local Git branch. | |
# | |
# Usage: | |
# git checkout master |
NewerOlder