Build Utilities

Utility functions for esgf_build.py

build_utilities.get_md5sum(file_name)[source]

#Utility function, wraps md5sum so it may be used on either mac or #linux machines

build_utilities.mkdir_p(path, mode=511)[source]

Makes directory, passes if directory already exists

build_utilities.replace_string_in_file(file_name, original_string, new_string)[source]

Goes into a file and replaces string

build_utilities.stream_subprocess_output(command_string, file_handle)[source]

Print out the stdout of the subprocess in real time

ESGF Build

Modules needed mostly to access terminal commands

esgf_build.build_all(build_list, starting_directory)[source]

Takes a list of repositories to build, and uses ant to build them

esgf_build.copy_artifacts_to_local_mirror(esgf_artifact_directory)[source]

The web artifacts (jars and wars) get placed at ~/.ivy2/local/esgf-artifacts/ after running the ant builds. This function copies them to the local mirror

esgf_build.create_build_list(build_list, select_repo, all_repos_opt)[source]

Creates a list of repos to build depending on a menu that the user picks from

esgf_build.create_local_mirror_directory(active_branch, starting_directory, build_list)[source]

Creates a directory for ESGF binaries that will get RSynced and uploaded to the remote distribution mirrors

esgf_build.create_taglist_file(taglist_file, repo_name, latest_tag)[source]

Creates a file containing the latest tag for each repo

esgf_build.esgf_upload()[source]

Uses rsync to upload to coffee server

esgf_build.find_path_to_repos(starting_directory)[source]

Checks the path provided to the repos to see if it exists

esgf_build.get_latest_tag(repo)[source]

accepts a GitPython Repo object and returns the latest annotated tag

esgf_build.get_most_recent_commit(repo_handle)[source]

Gets the most recent commit w/ log and list comprehension

esgf_build.main()[source]

User prompted for build specifications and functions for build are called

esgf_build.set_script_settings(default_script_q, script_settings_local)[source]

Sets the script settings depending on input or default

esgf_build.update_all(active_branch, repo_directory)[source]

Checks each repo in the REPO_LIST for the most updated branch, and uses taglist to track versions

esgf_build.update_esg_node(active_branch, starting_directory, script_settings_local)[source]

Updates information in esg-node file

esgf_build.update_repo(repo_name, repo_object, active_branch)[source]

accepts a GitPython Repo object and updates the specified branch

Purge and Clone

Utility module for purging local ESGF repos and cloning fresh copies from Github

class purge_and_clone_fresh_repos.MyProgressPrinter[source]

Helper class for printing streaming output when cloning from Github

purge_and_clone_fresh_repos.clone_repos(repo_directory)[source]

Clone fresh ESGF repos that are listed in the repo_info file to the repo_directory

purge_and_clone_fresh_repos.purge_repos(repo_directory)[source]

Delete all local ESGF repos from the repo_directory that are listed in the repo_info file