Skip to content

Instantly share code, notes, and snippets.

Avatar

Dirk Thomas dirk-thomas

View GitHub Profile
@dirk-thomas
dirk-thomas / gist:6739057
Created Sep 28, 2013
wipe obsolete stacks from dry release repo
View gist:6739057
#!/usr/bin/env python
from distutils.version import LooseVersion
import os
import subprocess
import yaml
rosdistro_path = '../../release_trunk/distros'
distros = ['cturtle', 'diamondback','electric', 'fuerte', 'groovy', 'hydro']
@dirk-thomas
dirk-thomas / gist:8960189
Created Feb 12, 2014
send Jenkins data points to custom metric at statuspage.io
View gist:8960189
Place the following jar files under /var/lib/jenkins/plugins/groovy/WEB-INF/lib/
* http-builder-0.7.jar
* httpclient-4.3.2.jar (httpcomponents-client-4.3.2)
* httpcore-4.3.1.jar (httpcomponents-client-4.3.2)
* resolver.jar (Xerces.2.11.0)
Groovy script:
import groovyx.net.http.HTTPBuilder
import groovyx.net.http.ContentType
@dirk-thomas
dirk-thomas / gist:e29076b8f1eb2bb84c8c
Last active Aug 29, 2015
Find released packages / repositories with a specific dependency
View gist:e29076b8f1eb2bb84c8c
from catkin_pkg.package import parse_package_string
import rosdistro
result_repos = {}
result_pkgs = {}
i = rosdistro.get_index(rosdistro.get_index_url())
d = rosdistro.get_cached_distribution(i, 'indigo')
f = d._distribution_file
for name in sorted(f.release_packages.keys()):
@dirk-thomas
dirk-thomas / gist:5934af23375cd382ba84
Last active Aug 29, 2015
Verify that all released package.xml files are parsable and valid
View gist:5934af23375cd382ba84
from catkin_pkg.package import parse_package_string
import rosdistro
i = rosdistro.get_index(rosdistro.get_index_url())
for distro in ['groovy', 'hydro', 'indigo']:
print(distro)
d = rosdistro.get_cached_distribution(i, distro)
f = d._distribution_file
for name in sorted(f.release_packages.keys()):
xml = d.get_release_package_xml(name)
@dirk-thomas
dirk-thomas / gist:e9debd17f7fd4c69d85a
Last active Aug 29, 2015
output all released package with maintainers still having willowgarage email addresses
View gist:e9debd17f7fd4c69d85a
from catkin_pkg.package import parse_package_string
import rosdistro
i = rosdistro.get_index(rosdistro.get_index_url())
for distro in ['groovy', 'hydro', 'indigo']:
print(distro)
maintainers = {}
d = rosdistro.get_cached_distribution(i, distro)
f = d._distribution_file
for name in sorted(f.release_packages.keys()):
@dirk-thomas
dirk-thomas / gist:dda7a63e0d6faa58def8
Last active Aug 29, 2015
identify repositories with different release branch and doc/source branch
View gist:dda7a63e0d6faa58def8
import subprocess
import yaml
from catkin_pkg.package import parse_package_string
import rosdistro
i = rosdistro.get_index(rosdistro.get_index_url())
for distro in reversed(sorted(i.distributions.keys())):
print(distro)
d = rosdistro.get_cached_distribution(i, distro)
@dirk-thomas
dirk-thomas / gist:105892899af14ac64697
Last active Dec 1, 2016
visualize package dependencies
View gist:105892899af14ac64697
#!/usr/bin/env python3
import os
import sys
from ament_tools.packages import find_unique_packages
import pygraphviz
View gist:630084eefb44baa79f15
job_prefix = 'jenkins21605_'
println 'Deleting jobs from previous tests...'
for (p in Jenkins.instance.allItems) {
if (!p.name.startsWith(job_prefix)) continue
println '- ' + p.name
p.delete()
}
println ''
@dirk-thomas
dirk-thomas / gist:9bbd47397e48ef3ceef8
Last active Aug 29, 2015
Create "leaf" job with a single upstream dependency "before_leaf" where "before_leaf" has many (in this case 40) upstream dependencies.
View gist:9bbd47397e48ef3ceef8
job_prefix = 'jenkins21605_caseA_'
println 'Deleting jobs from previous tests...'
for (p in Jenkins.instance.allItems) {
if (!p.name.startsWith(job_prefix)) continue
println '- ' + p.name
p.delete()
}
println ''
@dirk-thomas
dirk-thomas / gist:37febb42abeb8631f946
Last active Aug 29, 2015
Create "leaf" job with a single upstream dependency "before_leaf" where "before_leaf" has several (in this case 5: "a15" - "e15") upstream dependencies, each upstream dependency "xN" has "xN-1" as its upstream dependency.
View gist:37febb42abeb8631f946
job_prefix = 'jenkins21605_caseB_'
println 'Deleting jobs from previous tests...'
for (p in Jenkins.instance.allItems) {
if (!p.name.startsWith(job_prefix)) continue
println '- ' + p.name
p.delete()
}
println ''