def main():
    if len(sys.argv) < 7:
        print "Usage: %s ubuntu_distro arch job_name email {continuous/nightly/daily/weekly/monthly} script [script_args]"%(sys.argv[0])
        sys.exit(0)
    
    # create hudson instance 
    with open(os.path.join(environment.get_ros_home(), 'catkin-debs', 'server.yaml')) as f:
        info = yaml.load(f)
    jenkins_instance = jenkins.Jenkins(SERVER, info['username'], info['password'])

    ubuntu_distro = sys.argv[1]
    arch = sys.argv[2]
    name = sys.argv[3]
    email = sys.argv[4]
    period = sys.argv[5]
    script = sys.argv[6]
    script_args = sys.argv[7:]

    # create jenkins instance 
    with open(os.path.join(environment.get_ros_home(), 'catkin-debs', 'server.yaml')) as f:
        info = yaml.load(f)
    jenkins_instance = jenkins.Jenkins('http://jenkins.willowgarage.com:8080/', info['username'], info['password'])
    print "Created Jenkins instance"

    # run job
    job_name = run_jenkins_periodic(jenkins_instance, ubuntu_distro, arch, name, email, 
                                    period, script, script_args, info['username'])
Example #2
0
def main():
    if len(sys.argv) < 8:
        print "Usage: %s ubuntu_distro arch job_name email {svn/git/hg} uri branch script [script_args]"%(sys.argv[0])
        sys.exit(0)

    ubuntu_distro = sys.argv[1]
    arch = sys.argv[2]
    name = sys.argv[3]
    email = sys.argv[4]
    vcs = sys.argv[5]
    uri = sys.argv[6]
    branch = sys.argv[7]
    script = sys.argv[8]
    script_args = sys.argv[9:]

    # create jenkins instance 
    with open(os.path.join(environment.get_ros_home(), 'catkin-debs', 'server.yaml')) as f:
        info = yaml.load(f)
    jenkins_instance = jenkins.Jenkins('http://jenkins.willowgarage.com:8080/', info['username'], info['password'])
    print "Created Jenkins instance"

    # run job
    job_name = run_jenkins_vcs(jenkins_instance, 
                               ubuntu_distro, arch, name, email, vcs, uri, branch,
                               script, script_args, info['username'])
Example #3
0
    def __init__(self, name, cache_location):
        # url's
        self.file_name = '%s-dependencies.yaml'%name
        if cache_location:
            self.local_url = os.path.join(cache_location, self.file_name)
        else:
            self.local_url = os.path.join(environment.get_ros_home(), self.file_name)
        self.server_url = 'http://www.ros.org/rosdistro/%s-dependencies.tar.gz'%name
        self.dependencies = {}

        # initialize with the local or server cache
        deps = self._read_local_cache()
        if deps == {}:
            deps = self._read_server_cache()            
        for key, value in deps.iteritems():
            self.dependencies[key] = value
        if self.cache == 'server':
            self._write_local_cache()
def main():
    if len(sys.argv) < 2:
        print "Usage: %s cache_dir"%(sys.argv[0])
        sys.exit(0)

    cache_dir_orig = sys.argv[1]
    cache_dir = os.path.expanduser(cache_dir_orig)

    # create jenkins instance
    with open(os.path.join(environment.get_ros_home(), 'catkin-debs', 'server.yaml')) as f:
        info = yaml.load(f)

    #jenkins_url = 'http://jenkins.willowgarage.com:8080/'
    jenkins_url = 'http://50.28.61.61:8080/'
    jenkins_instance = jenkins.Jenkins(jenkins_url, info['username'], info['password'])
    print "Created Jenkins instance"

    # run job
    init_jenkins_cache(jenkins_instance, cache_dir)
Example #5
0
    def __init__(self, name, cache_location, master_file=None):
        # url's
        if master_file is None:
            mf = MasterFile()
        else:
            mf = master_file
        self.file_name = '%s-dependencies.yaml'%name
        if cache_location:
            self.local_url = os.path.join(cache_location, self.file_name)
        else:
            self.local_url = os.path.join(environment.get_ros_home(), self.file_name)
        self.server_url = mf.get_deps_server_cache_url(name)
        self.dependencies = {}

        # initialize with the local or server cache
        deps = self._read_local_cache()
        if deps == {}:
            deps = self._read_server_cache()
        for key, value in deps.iteritems():
            self.dependencies[key] = value
        if self.cache == 'server':
            self._write_local_cache()
def main():
    if len(sys.argv) < 2:
        print "Usage: %s cache_dir job1 job2 job3 ..."%(sys.argv[0])
        sys.exit(0)

    cache_dir_orig = sys.argv[1]
    cache_dir = os.path.expanduser(cache_dir_orig)

    job_list = sys.argv[2:]

    # create jenkins instance
    with open(os.path.join(environment.get_ros_home(), 'catkin-debs', 'server.yaml')) as f:
        info = yaml.load(f)

    #jenkins_url = 'http://jenkins.willowgarage.com:8080/'
    jenkins_url = 'http://50.28.61.61:8080/'
    cache = jenkins_cache.JenkinsCache(jenkins_url, cache_dir, info['username'], info['password'])
    print "Created Jenkins cache instance"

    num_deps, deps = count_deps.count_deps(cache, job_list)

    depth_counts = {}

    for depth in deps.values():
        depth_counts[depth] = depth_counts.get(depth, 0) + 1

    max_depth = max(depth_counts.keys())

    for depth in range(max_depth):
        depth_counts[depth] = depth_counts.get(depth, 0)

    print "Calculated deps for:"
    print "".join([ "%s\n" % x for x in job_list ])
    print "Found %i total deps" % num_deps

    print "Depth Counts:"
    for depth, count in depth_counts.items():
        print "%i) %i" % (depth, count)