Skip to content

Instantly share code, notes, and snippets.

--- a/src/test/java/plugins/JavadocPluginTest.java
+++ b/src/test/java/plugins/JavadocPluginTest.java
@@ -17,7 +17,7 @@
/**
* Feature: Test Javadoc plugin
*/
-@WithPlugins("javadoc")
+@WithPlugins("[email protected]")
public class JavadocPluginTest extends AbstractJUnitTest {
/**
java.lang.instrument.IllegalClassFormatException: Error while instrumenting class com/steadystate/css/parser/SACParserCSS3TokenManager.
at org.jacoco.agent.rt.internal_e6e56f0.CoverageTransformer.transform(CoverageTransformer.java:89)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
@jglick
jglick / multiwrap-demo.groovy
Last active May 4, 2016 18:07
example for sobersabre on #jenkins
def multiwrap(wrappers, body) {
_multiwrap(wrappers, 0, body)
}
def _multiwrap(wrappers, idx, body) {
if (idx == wrappers.size()) {
body()
} else {
wrap(wrappers.get(idx)) {
_multiwrap(wrappers, idx + 1, body)
}
@jglick
jglick / uc-grep
Last active January 27, 2023 07:06
#!/bin/bash
PLUGIN=$1
VERSION=$2
UC=$3
if [ -z "$PLUGIN" ]
then
echo 'Usage: uc-grep short-name [core-version [https://jenkins-updates.cloudbees.com/update-center/envelope-core-mm/]]'
exit 1
fi
if [ -z "$VERSION" ]
$ curl -IL http://updates.jenkins-ci.org/download/plugins/workflow-aggregator/2.3/workflow-aggregator.hpi
HTTP/1.1 302 Found
Date: Wed, 31 Aug 2016 14:11:52 GMT
Server: Apache/2.4.7 (Ubuntu)
Location: http://mirrors.jenkins-ci.org/plugins/workflow-aggregator/2.3/workflow-aggregator.hpi
Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 302 Found
Date: Wed, 31 Aug 2016 14:11:52 GMT
Server: Apache/2.4.7 (Ubuntu)
… WARNING org.jenkinsci.plugins.workflow.cps.CpsFlowExecution$6 onSuccess
Failed to abort Owner[…/…:… #…]
hudson.remoting.ChannelClosedException: channel is already closed
at hudson.remoting.Channel.send(Channel.java:578)
at hudson.remoting.Request.call(Request.java:130)
at hudson.remoting.Channel.call(Channel.java:780)
at hudson.Launcher$RemoteLauncher.launch(Launcher.java:928)
at hudson.Launcher$ProcStarter.start(Launcher.java:381)
at hudson.Launcher$ProcStarter.join(Launcher.java:388)
at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Decorator$1.kill(WithContainerStep.java:237)
@jglick
jglick / git-grep-dired.el
Last active June 1, 2023 21:21
Emacs command to look for a regexp among versioned files in a Git repo
(defun git-grep-dired (repo wildcards regexp)
"Find Git-controlled files in DIR with a name like WILDCARDS containing a regexp REGEXP and start Dired on output."
(interactive "DGit-grep (directory): \nsGit-grep (filename wildcard(s), e.g. *.xml): \nsGit-grep (grep regexp): ")
(setq repo (file-name-as-directory (expand-file-name repo)))
(switch-to-buffer (concat "*Git Grep " repo "*"))
(fundamental-mode)
(setq buffer-read-only nil)
(erase-buffer)
(setq default-directory repo)
(let ((cmd (format "git --git-dir %s/.git ls-files --recurse-submodules -z%s | xargs -0 grep -lZ -- %s | xargs -0 ls -l"
@jglick
jglick / maven-release.sh
Last active October 23, 2022 13:50
Script to do a Maven release relatively safely
#!/bin/sh
set -e
git branch
git status -s
git pull
git log --patch-with-stat --irreversible-delete --find-renames @{u}..
gitg
gh pr list || :
git tag --sort=version:refname
@jglick
jglick / JENKINS-41745-proposal.md
Last active August 22, 2017 18:22
Proposal for JENKINS-41745: Remoting-free CLI

Summary

JENKINS-41745: Deprecate the Remoting-based protocol for the Jenkins CLI feature. Enhance the client and server to conveniently perform most existing CLI tasks with simpler and safer protocols.

Goals

@jglick
jglick / find-git-unreleased.sh
Last active July 25, 2019 19:20
run with optional args, e.g., {workflow,pipeline}-*-plugin
#!/bin/bash
# http://stackoverflow.com/a/37730085/12916
if [ $# -ge 1 ]
then
files="$@"
else
files=*
fi
for r in $files
do