Skip to content

Instantly share code, notes, and snippets.

View kohsuke's full-sized avatar
🏠
WFH

Kohsuke Kawaguchi kohsuke

🏠
WFH
View GitHub Profile
@kohsuke
kohsuke / gist:9941699
Created April 2, 2014 19:45
Unique version numbers
0.0.1
0.0.10
0.0.11
0.0.12
0.0.13
0.0.14
0.0.15
0.0.2
0.0.20
0.0.21

Adding Custom Metric subtype

To implement a new metric subtype, implement ExtensionMetric marker interface and put @MetricExtension on it

@NamedMetric("dac.mansion.foo.bar") @Singleton
public class MyGauge extends Gauge<Integer> implements ExtensionMetric {
     @Override
     public Integer getValue() {
         return queue.size();

}

Subversion 1.8 failures
SubversionSCMTest>HudsonTestCase.runBare:286->HudsonTestCase.runTest:401->testMultipleRepositoriesSvn17:605->testMultipleRepositories:599->HudsonTestCase.assertLogContains:983 Console output of test0 #2 didn't contain Updating file:///files/kohsuke/ws/jenkins/subversion-plugin/target/hudson9173603239567459537test/trunk:
SubversionSCMTest>HudsonTestCase.runBare:286->HudsonTestCase.runTest:401->testPollingExternalsForFileSvn17:1717->invokeTestPollingExternalsForFile:1734->createWorkingCopy:992->HudsonTestCase.assertBuildStatusSuccess:952->HudsonTestCase.assertBuildStatus:927 unexpected build status; build log was:
-
java.lang.UnsatisfiedLinkError: /usr/lib/libc.so: invalid file format
at jnr.ffi.provider.jffi.NativeLibrary.loadNativeLibraries(NativeLibrary.java:87)
at jnr.ffi.provider.jffi.NativeLibrary.getNativeLibraries(NativeLibrary.java:70)
at jnr.ffi.provider.jffi.NativeLibrary.getSymbolAddress(NativeLibrary.java:49)
at jnr.ffi.provider.jffi.NativeLibrary.findSymbolAddress(NativeLibrary.java:59)
at jnr.ffi.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:117)
at jnr.ffi.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:59)
at jnr.ffi.provider.jffi.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:43)
at jnr.ffi.LibraryLoader.load(LibraryLoader.java:228)
at jnr.ffi.Library.loadLibrary(Library.java:123)
<distributionManagement>
<repository>
<id>maven.jenkins-ci.org</id>
<url>http://maven.jenkins-ci.org:8081/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>maven.jenkins-ci.org</id>
<url>http://maven.jenkins-ci.org:8081/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
% cat =mvndd
#!/bin/sh
export MAVEN_OPTS="$MAVEN_OPTS $JAVA_DEBUG_OPTS,suspend=n"
exec mvn "$@"
module Foo
module Bar
class Zot
def hello
puts "Hello from Zot"
end
end
end
end
@kohsuke
kohsuke / git-children-of
Created November 21, 2013 21:44
Given a commit, find immediate children of that commit.
#!/bin/bash -e
# given a commit, find immediate children of that commit.
for arg in "$@"; do
for commit in $(git rev-parse $arg^0); do
for child in $(git log --format='%H %P' --all | grep -F " $commit" | cut -f1 -d' '); do
git describe $child
done
done
done
@kohsuke
kohsuke / gist:7442162
Created November 13, 2013 01:45
recovery to master push
+ for f in '*'
+ echo accurev-plugin.git
accurev-plugin.git
+ pushd accurev-plugin.git
~/ws/jenkins/20131111-recovery/repos/accurev-plugin.git ~/ws/jenkins/20131111-recovery/repos
+ git push git@github.com:jenkinsci/accurev-plugin.git recovery:master
Everything up-to-date
+ popd
~/ws/jenkins/20131111-recovery/repos
+ for f in '*'
@kohsuke
kohsuke / gist:7441446
Created November 13, 2013 00:32
Branch edits
Kohsuke:aeacaf8->61dcb7f git-plugin branch:refs/heads/refactoring
Kohsuke:1ac9a85->bd241e6 json-lib branch:refs/heads/rebase-2.4
Kohsuke:67323c6->fc3c580 perforce-plugin branch:refs/heads/multiple-scm-instatination-fix
Kohsuke:70e0ba9->5a253ab pitmutation-plugin branch:refs/heads/generic-metrics
Kohsuke:fe15a76->2f5e05e prqa-plugin branch:refs/heads/1.2.1
Kohsuke:7e81d63->4dad46b skype-im-plugin branch:refs/heads/v2dev
Kohsuke:b65b0d9->28fc04f stashnotifier-plugin branch:refs/heads/develop
Kohsuke:aae02ab->0512752 subversion-plugin branch:refs/heads/refactoring
Kohsuke:327c4e4->6463c81 transifex-plugin branch:refs/heads/gh-pages