This file contains hidden or 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/env ruby | |
require 'json' | |
def dig(hash, keys) | |
keys.reduce(hash) {|h, k| i = h[k]; i ? i : break } | |
end | |
def to_csv(json, fields) | |
fields.map{|f| json[f] }.join(',') |
This file contains hidden or 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
sellout:puppet justin$ git diff spec/ | |
diff --git a/spec/unit/transaction_spec.rb b/spec/unit/transaction_spec.rb | |
index 0316c8b..4a20a2b 100644 | |
--- a/spec/unit/transaction_spec.rb | |
+++ b/spec/unit/transaction_spec.rb | |
@@ -2,6 +2,7 @@ | |
require 'spec_helper' | |
require 'matchers/include_in_order' | |
require 'puppet_spec/compiler' | |
+require 'pry' |
This file contains hidden or 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/env ruby | |
require 'csv' | |
inputfile = ARGV[0] | |
intermediate = { | |
'node' => {'KOs' => 0, 'values' => [], 'ok' => 0}, | |
'filemeta plugins' => {'KOs' => 0, 'values' => [], 'ok' => 0}, | |
'filemeta pluginfacts' => {'KOs' => 0, 'values' => [], 'ok' => 0}, | |
'catalog' => {'KOs' => 0, 'values' => [], 'ok' => 0}, |
This file contains hidden or 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/env ruby | |
def clean_profile_line(line) | |
if line =~ /.*\[(\d+)\] (\d(\.\d\d?)*) (.*): took (\d*\.?\d*) seconds/ | |
request_id = $1 | |
step_and_maybe_substeps = $2 | |
# unused artifact of the regex, named here for documentation purposes | |
maybe_substeps = $3 | |
step_name = $4 |
This file contains hidden or 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
sellout:puppetserverspike justin$ lein with-profile +yk9k irb | |
Using 1G min heap since not set via PUPPETSERVER_HEAP_SIZE environment variable or user.puppetserver-heap-size in ~/.lein/profiles.clj file. Set to at least 5G for best performance during test runs. | |
Using 2G max heap since not set via PUPPETSERVER_HEAP_SIZE environment variable or user.puppetserver-heap-size in ~/.lein/profiles.clj file. Set to at least 5G for best performance during test runs. | |
[YourKit Java Profiler 2017.02-b66] Log file: /Users/justin/.yjp/log/main-78581.log | |
irb(main):001:0> load './puppet_server_helper.rb' | |
WARN: Unresolved specs during Gem::Specification.reset: | |
gettext (>= 3.0.2) | |
WARN: Clearing out unresolved specs. | |
Please report a bug if this causes problems. |
This file contains hidden or 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
Seeing this failure when tring to install PDB via the module on Debian 9: | |
cy21od14dqt4842.delivery.puppetlabs.net (debian9-64-1) executed in 4.38 seconds | |
RuntimeError: PuppetAcceptance::DSL::Helpers.with_puppet_running_on failed (check backtrace for location) because: Host 'cy21od14dqt4842.delivery.puppetlabs.net' exited with 1 running: | |
puppet agent --test --server cy21od14dqt4842.delivery.puppetlabs.net | |
Last 10 lines of output were: | |
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet_x]/ensure: created | |
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet_x/apt_key]/ensure: created | |
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet_x/apt_key/patch_openuri.rb]/ensure: defined content as '{md5}951bad007a3b5db035be069c1d1c9c09' |
This file contains hidden or 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
legacy_opts = { | |
:default_action => 'gem_install', | |
:version => (ENV['PUPPET_VERSION'] || '3.8.1'), | |
} | |
aio_opts = { | |
:default_action => 'gem_install', | |
:version => (ENV['PUPPET_AGENT_VERSION'] || '1.1.0'), | |
} |
This file contains hidden or 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
require 'spec_helper_acceptance' | |
describe 'a basic test' do | |
it 'does very little' do | |
puppet_run = apply_manifest("notify {'Hello Bar': }", :catch_failures => true) | |
expect(puppet_run.stdout).to include('Hello Bar') | |
end | |
end |
This file contains hidden or 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
require 'spec_helper_acceptance' | |
describe 'just to make the setup code run' do | |
it { true } | |
end |
This file contains hidden or 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/sh | |
# | |
# /etc/init.d/jenkins-slave | |
# init script for Jenkins Slave Swarm Client. | |
# | |
# chkconfig: 2345 90 60 | |
# description: Jenkins Slave Swarm Client | |
# | |
RETVAL=0 |