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
builder@concourse32:/tmp$ wget https://storage.googleapis.com/golang/go1.9.linux-386.tar.gz | |
builder@concourse32:/tmp$ tar -xf go1.9.linux-386.tar.gz | |
builder@concourse32:/tmp$ export GOROOT=$PWD/go | |
builder@concourse32:/tmp$ git clone --recursive https://github.com/vito/houdini | |
builder@concourse32:/tmp$ cd houdini | |
builder@concourse32:/tmp/houdini$ export GOPATH=$PWD/deps | |
builder@concourse32:/tmp/houdini$ mkdir deps/src/github.com/vito/ | |
builder@concourse32:/tmp/houdini$ ln -s $PWD deps/src/github.com/vito/houdini | |
builder@concourse32:/tmp/houdini$ $GOROOT/bin/go build -o dist/houdini ./cmd/houdini | |
builder@concourse32:/tmp/houdini$ cd dist/ |
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 hudson.model.* | |
def q = Jenkins.instance.queue | |
q.items.findAll { it.task.name.endsWith('-poc') }.each { q.cancel(it.task) } |
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 | |
# start openconnect tunnel and shell inside Linux network namespace | |
# | |
# this is a fork of schnouki's script, see original blog post | |
# https://schnouki.net/posts/2014/12/12/openvpn-for-a-single-application-on-linux/ | |
# | |
# original script can be found here | |
# https://gist.github.com/Schnouki/fd171bcb2d8c556e8fdf | |
# ------------ adjust values below ------------ |
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 hudson.model.* | |
count = 0 | |
Hudson.instance.items.each { | |
if(it.buildable && it.name.endsWith("-gerrit")) { | |
count++ | |
} | |
} | |
println count |
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 hudson.util.RemotingDiagnostics; | |
print_ip = 'println InetAddress.localHost.hostAddress'; | |
print_hostname = 'println InetAddress.localHost.canonicalHostName'; | |
// here it is - the shell command, uname as example | |
uname = 'def proc = "uname -a".execute(); proc.waitFor(); println proc.in.text'; | |
for (slave in hudson.model.Hudson.instance.slaves) { | |
if (slave.name == 'kube2-el6-196755b25b94e') { |
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
<VirtualHost *:46342 *:46343> | |
ServerName conda.mycompany.com | |
ServerAlias conda | |
AddIcon /icons/tar.gif .tar.bz2 | |
AddIcon /icons/compressed.gif .bz2 | |
AddIcon /icons/index.gif .json | |
DocumentRoot /path/to/conda-channels |
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
def matchedJobs = Jenkins.instance.items.findAll { job -> | |
job.name =~ /myjob.*/ | |
} | |
matchedJobs.each { | |
for (publisher in it.publishersList) { | |
if (publisher instanceof org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder) { | |
println publisher.script.script | |
} | |
} |
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
def matchedJobs = Jenkins.instance.items.findAll { job -> | |
job.name =~ /.*/ | |
} | |
matchedJobs.each { | |
allBuilds = it.getBuilds() | |
jobName = it.fullName | |
allBuilds.each { | |
println jobName + ' ' + it.buildVariableResolver.resolve("GERRIT_REFSPEC") | |
} |
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
<?php | |
header("Transfer-encoding: chunked"); | |
function dump_chunk($chunk) { | |
printf("%x\r\n%s\r\n", strlen($chunk), $chunk); | |
flush(); | |
} | |
ob_implicit_flush(true); | |
ob_end_flush(); |