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 normalize_xml(folder) | |
xml_files = [] | |
Dir.entries(folder).each do |element| | |
xml_files << "#{folder}/#{element}" if element.end_with?(".xml") | |
end | |
merged_files = {} | |
xml_files.each do |xml_file| |
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
EMAIL_SUBJECT=3 | |
ERRORS=test_flag [qa] => expired on 2011-01-01<br>test_flag [stage] => expired on 2011-01-01<br>test_flag [prod] => expired on 2011-01-01 |
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
Subject: | |
${ENV, var="JOB_NAME"} - Build # ${ENV, var="BUILD_NUMBER"} - ${ENV, var="EMAIL_SUBJECT"} Errors Found! | |
Content: | |
----------<br><br> | |
ERRORS<br><br> | |
${ENV, var="ERRORS"} | |
<br><br> | |
----------<br><br> | |
${JELLY_SCRIPT, template="html-with-health-and-console"} |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'typhoeus' | |
require 'json' | |
jenkins = 'buildmaster.jenkins.com' | |
user = "jenkins" | |
process = "ruby" | |
logfile = "/tmp/zombie_killer.log" |
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
channel = manager.build.workspace.channel; | |
workspace = manager.build.workspace.toString(); | |
def readFromFile( file ) { | |
return new hudson.FilePath( channel, workspace + "/" + file ).readToString() | |
} | |
failedTests = manager.build.testResultAction.getFailedTests() | |
for ( int i = 0; i < failedTests.size() ; i++ ) { |
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 service = "your-service" | |
def proc = "yum --showduplicates list $service".execute() | |
def results = proc.in.text | |
stringList = results.split() | |
list = [] |
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
require 'typhoeus' | |
require 'json' | |
require 'awesome_print' | |
def display_server_status(response) | |
t = {} | |
t["disabled"] = response["properties"]["basic"]["disabled"] | |
t["draining"] = response["properties"]["basic"]["draining"] | |
t["active"] = response["properties"]["basic"]["nodes"] | |
ap t |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
HOSTS = [ | |
["puppet-master", 100], |
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
node 'puppet-agent.example.com' { | |
file { 'hello_world': | |
path => '/tmp/hello_world.log', | |
ensure => present, | |
content => "Hello World", | |
} | |
} |
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
--- | |
:backends: | |
- eyaml | |
- yaml | |
:hierarchy: | |
- %{environment} | |
- common | |
:yaml: |
OlderNewer