Skip to content

Instantly share code, notes, and snippets.

View hughsaunders's full-sized avatar

Hugh Saunders hughsaunders

View GitHub Profile
@hughsaunders
hughsaunders / console.log
Created March 15, 2017 08:51
Jenkins nested node, how to find the first workspace
Started by user Hugh Saunders
[Pipeline] node
Running on rpc-jenkins-n02.prod.dfw1.cit.rackspace.net-9082c1d1 in /var/lib/jenkins/workspace/scratchpipeline
[Pipeline] {
[Pipeline] sh
[scratchpipeline] Running shell script
+ date
+ pwd
/var/lib/jenkins/workspace/scratchpipeline
+ ls
@hughsaunders
hughsaunders / output
Last active March 3, 2017 14:37
ansible string bools behave differently when part of an expression
ansible-playbook -i inventory/ test.yml
PLAY [localhost] ***************************************************************
TASK [debug] *******************************************************************
skipping: [localhost]
TASK [debug] *******************************************************************
skipping: [localhost]
SEVERE: Failed Loading plugin Jenkins Self-Organizing Swarm Plug-in Modules v3.3 (swarm)
java.io.IOException: Unable to load hudson.plugins.swarm.PluginImpl from swarm
at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:514)
at hudson.PluginManager$2$1$1.run(PluginManager.java:517)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:1085)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
@hughsaunders
hughsaunders / xunit.py
Created November 8, 2016 14:45
Ansible output callback for generating xunit stream
# This module was found in an ansible-discuss mailing list thread: https://groups.google.com/forum/#!msg/ansible-project/7VhqDDtf6Js/EcQ1MVoJRBIJ
# (C) 2013, Stephan Buys, <stephan.buys@gmail.com>
#
# This file is based on noop.py which is a part of Ansible, and is
# a derivative work as per the GPL. All original conditions apply.
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or

Why does the block get the same argument each time when run via parallel? (why does it print [a] c not [a] a ?) When looping over streams sequentially it can be seen that each block has the correct arg encapsulated. This is shown by a,b,c being printed by the last three echo statements.

# git remote -v
hugh git@github.com:hughsaunders/jenkins-rpc (fetch)
hugh git@github.com:hughsaunders/jenkins-rpc (push)
origin git@github.com:rcbops/jenkins-rpC (fetch)
origin git@github.com:rcbops/jenkins-rpC (push)
# git fetch hugh "+refs/pull/*:refs/remotes/hugh/pr/*"
From github.com:hughsaunders/jenkins-rpc
* [new ref] refs/pull/1/head -> hugh/pr/1/head
* [new ref] refs/pull/1/merge -> hugh/pr/1/merge
<triggerPhrase>.*recheck_all.*|.*recheck_aio.*</triggerPhrase>
$ dropbearkey -t dss -f foo
Will output 1024 bit dss secret key to 'foo'
Generating key, this may take a while...
Public key portion is:
ssh-dss AAAAB3NzaC1kc3MAAACBAIWw+F0z0G1zT3OUiiU5DU0aURgAWwE4QrAqI0W6COhwqk5TARTpbCh5h6nn9YdEaRNitUfuVplfjTaZH3DQaxhblHWtTH3n6GVCvBKqrlqAbOy70LxNkIoxEwucb+frSe1BmaDLfuuPbPptMxPx65kmvdaEiLc4RUqgQKhVrFAlAAAAFQDbatcjBsIA2OtKWdwNddSFnjdjAwAAAIBnlOPBgStGoYhIP7GE/xenB8hMjbdwwutOONS6ThoDn7rYDO9miuiI/GCBoz8DpNYeUmSZ4priMtNMFIWBqYNIEDhRqVY6ScY7c/PyXm2+qAfHYMjfvOcd4BrvLRWpXQtNn4LDdBC4XJBci3HK6owZ0BeLOudEfficbfjzP+agrAAAAIBp4a3H2ZK8Lm5xw4Mn1e7V+dJ4vPN/+x01T2C/RiniD3ngKBx99n0dhJZzlda5377D7gP0U5vMpj2E71pmgDcwoi5yklWMoZF+GS5YZBNmwdL0PM9pzIFYHPBYiJ8xz2meH6ILryycPFee7iwGNUxkaJL6oCcptz3bsQ5THeZEUw== root@cirros64mod
Fingerprint: md5 d6:4d:a9:0a:e1:31:5d:25:7a:b7:0f:39:9e:bc:e6:d2
$ dropbearkey -t dss -f foo
Will output 1024 bit dss secret key to 'foo'
Generating key, this may take a while...
Couldn't create new file foo
=INFO REPORT==== 23-Feb-2016::13:35:09 ===
Starting RabbitMQ 3.5.6 on Erlang R16B03
Copyright (C) 2007-2015 Pivotal Software, Inc.
Licensed under the MPL. See http://www.rabbitmq.com/
=INFO REPORT==== 23-Feb-2016::13:35:09 ===
node : rabbit@jrpcaioiad-199_rabbit_mq_container-ee0f4ca0
home dir : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/rabbitmq.config (not found)
@hughsaunders
hughsaunders / output
Created January 28, 2016 20:28
with_flattened expands strings as variables :(
ansible-playbook -i /tmp/inv test.yml
PLAY [localhost] **************************************************************
TASK: [with_items] ************************************************************
ok: [localhost] => (item=foo) => {
"item": "foo",
"msg": "foo"
}