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
Jenkins.instance.pluginManager.plugins.sort{ it -> | |
println "$it.shortName:latest" | |
} |
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 18 columns, instead of 15 in line 7.
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
policyID,statecode,county,eq_site_limit,hu_site_limit,fl_site_limit,fr_site_limit,tiv_2011,tiv_2012,eq_site_deductible,hu_site_deductible,fl_site_deductible,fr_site_deductible,point_latitude,point_longitude,line,construction,point_granularity | |
119736,FL,CLAY COUNTY,498960,498960,498960,498960,498960,792148.9,0,9979.2,0,0,30.102261,-81.711777,Residential,Masonry,1 | |
448094,FL,CLAY COUNTY,1322376.3,1322376.3,1322376.3,1322376.3,1322376.3,1438163.57,0,0,0,0,30.063936,-81.707664,Residential,Masonry,3 | |
206893,FL,CLAY COUNTY,190724.4,190724.4,190724.4,190724.4,190724.4,192476.78,0,0,0,0,30.089579,-81.700455,Residential,Wood,1 | |
333743,FL,CLAY COUNTY,0,79520.76,0,0,79520.76,86854.48,0,0,0,0,30.063236,-81.707703,Residential,Wood,3 | |
172534,FL,CLAY COUNTY,0,254281.5,0,254281.5,254281.5,246144.49,0,0,0,0,30.060614,-81.702675,Residential,Wood,1 | |
785275,FL,CLAY COUNTY,0,515035.62,0,0,515035.62,884419.17,0,0,0,0,30.063236,-81.707703,Residential,Masonry,3 | |
995932,FL,CLAY COUNTY,0,19260000,0,0,19260000,20610000,0,0,0,0,30.102226,-81. |
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
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: False | |
tasks: | |
- set_fact: | |
ip: "192.172.32.30" | |
- set_fact: | |
x: "{{ip| regex_replace('^(\\d{1,3}\\.\\d{1,3}).*', '\\1') }}" | |
- debug: var=x |
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 groovy | |
import groovy.xml.*; | |
if (args.size() != 3 && args.size() != 4) { | |
println "usage: updateVersion <groupId> <artifactId> <version> [<newVersion>]" | |
println "newVersion - is optional if not given will only print current versions" | |
System.exit(1); | |
} |
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
ansible web -i hosts -m lineinfile -a 'dest='~/.bashrc' regexp='^' line="alias l=\"ls -l\"" state=present' | |
ansible web -i hosts -m shell -a 'ps auwx|egrep tomcat|egrep -v egrep'|egrep FAIL || echo '[PASS]' | |
version=10233 | |
ansible webapps -i hosts -m shell -a "curl localhost:8080/who.jsp|egrep $version"|egrep FAIL || echo '[PASS]' |
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
import hudson.FilePath | |
import jenkins.model.Jenkins | |
import hudson.model.Job | |
// | |
// cleans up workspace folders on slaves - removes deleted projects | |
// | |
def deleteUnusedWorkspace(FilePath root, String path) { | |
if(!root.list())return; | |
root.list().sort{child->child.name}.each { child -> |
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
def v = 30007..30017 | |
v.each { version -> | |
def xml = "http://<ip>:<port>/nexus-2.1.2/service/local/data_index?v=${version}"; | |
def baseUrl = "http://<ip>:<port>/nexus-2.1.2/content/repositories/libs-releases-local"; | |
def parser = new XmlSlurper(); | |
parser.setFeature('http://apache.org/xml/features/disallow-doctype-decl', true); | |
def root = parser.parse(xml); | |
root.data.artifact.each{ |
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
python -m SimpleHTTPServer 8099 |
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
import jenkins.* | |
import jenkins.model.* | |
import hudson.* | |
import hudson.model.* | |
def jobNameStartsWith = 'EPC-1426' | |
def textToMatch = "Flakes" | |
Jenkins.instance.items.findAll { it.displayName.startsWith(jobNameStartsWith) } | |
.each { job -> |
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
def jobNameStartsWith = 'EPC-1426-single-version' | |
def textToMatch = "Total time" | |
Jenkins.instance.items.findAll { it.displayName.startsWith(jobNameStartsWith) } | |
.each { job -> | |
if(job.builds) { | |
def build = job.isBuilding() ? job.builds[1] : job.builds[0] | |
def log = build.logFile.text | |
def regexPattern = "(?i).*${textToMatch}.*" | |
def summary = log =~ /${regexPattern}/ |