Module Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Expr Str If CompareEq NameLoad Str body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str orelse Return NameLoad decorator_list ClassDef bases Call AttributeLoad NameLoad attr Str ListLoad Str Str body Expr Str Pass decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad Call NameLoad Str Str Assign NameStore ListLoad Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str Call NameLoad Str Str FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad AttributeLoad NameLoad attr attr body If BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr Str body Raise Call NameLoad Call AttributeLoad Str attr keyword AttributeLoad AttributeLoad NameLoad attr attr Return Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad AttributeLoad NameLoad attr attr body If BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr Str body Raise Call NameLoad Call AttributeLoad Str attr keyword AttributeLoad AttributeLoad NameLoad attr attr Return Str Return AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str body Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad Call AttributeLoad Str attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad If AttributeLoad NameLoad attr body Return NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Call AttributeLoad Str attr keyword Call NameLoad NameLoad keyword NameLoad If AttributeLoad NameLoad attr body Assign NameStore BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr Raise Call NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot NameLoad body Raise Call NameLoad Str If BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str body Assign NameStore AttributeLoad NameLoad attr Assign NameStore IfExp AttributeLoad AttributeLoad NameLoad attr attr Str Str Return Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore BoolOpOr AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad Str attr keyword NameLoad keyword NameLoad Print Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad If UnaryOpNot AttributeLoad NameLoad attr body If AttributeLoad NameLoad attr body Print AttributeLoad NameLoad attr orelse If CompareIn NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword NameLoad keyword NameLoad Raise Call NameLoad Call AttributeLoad Str attr keyword NameLoad If BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr CompareNotEq NameLoad NameLoad body Print Call AttributeLoad Str attr keyword NameLoad Expr Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore IfExp CompareNotEq NameLoad NameLoad Str Str Print Call AttributeLoad Str attr keyword NameLoad keyword NameLoad Expr Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return Print Call AttributeLoad Str attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr TryExcept body Expr Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword NameLoad If CompareGtE Call AttributeLoad AttributeLoad NameLoad attr attr Str Num body Raise Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword NameLoad keyword NameLoad Return Print Call AttributeLoad Str attr keyword NameLoad Expr Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword NameLoad Return Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Return Print Call AttributeLoad Str attr keyword NameLoad Expr Call NameLoad Call AttributeLoad Str attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If BoolOpAnd CompareIn NameLoad AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr orelse Raise decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Str attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index Str Str Return Call AttributeLoad Str attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr keyword NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword NameLoad keyword Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr keyword NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Continue If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword NameLoad Return Num TryExcept body If BoolOpAnd CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Return Num Assign NameStore NameLoad If AttributeLoad NameLoad attr body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str orelse Print Str Return Num decorator_list NameLoad decorator_list If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr
N/A N/A argparse N/A collections N/A os N/A sys spinnaker.run check_run_and_monitor spinnaker.run check_run_quick spinnaker.run run_and_monitor spinnaker.run run_quick get_repository_dir N/A N/A name N/A N/A N/A Determine the local directory that a given repository is in.

  We assume that refresh_source is being run in the build directory
  that contains all the repositories. Except spinnaker/ itself is not
  in the build directory so special case it.

  Args:
    name [string]: The repository name.
   N/A N/A name spinnaker N/A N/A N/A N/A N/A os path abspath N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ .. N/A N/A name N/A SourceRepository N/A N/A N/A collections namedtuple SourceRepository N/A name owner N/A N/A Denotes a github repository.

  Attributes:
    name:  The [short] name of the repository.
    owner: The github user name owning the repository
   N/A N/A Refresher N/A object N/A N/A Provides branch management capabilities across Spinnaker repositories.

  The Spinnaker repositories are federated across several independent
  repositories. This class provides convenient support to update local
  repositories from remote and vice-versa.

  The origin repository is specified using --github_user option. This specifies
  the github repository owner for the origin repositories. It is only relevant
  when a repository needs to be cloned to establish a local repository. The
  value 'upstream' can be used to indicate that the repository should be cloned
  from its authoritative source as opposed to another user's fork.

  When the refresher clones new repositories, it establishes an "upstream"
  remote to the authoritative repository (based on hard-coded mappings)
  unless the origin is the upstream. Upstream pulls are disabled (including
  when the origin is the upstream) and only the master branch can be pulled
  from upstream.

  If --pull_branch is used then the local repositories will pull their current
  branch from the origin repository. If a local repository does not yet exist,
  then it will be cloned from the --github_user using the branch specified
  by --pull_branch. The --pull_origin option is similar but implies that the
  branch is 'master'. This is intended to perform complete updates of the
  local repositories.

  --push_branch (or --push_master, implying 'master' branch) will push the
  local repository branch back to the origin, but only if the local repository
  is in the specified branch. This is for safety to prevent accidental pushes.
  It is assumed that multi-repository changes will have a common feature-branch
  name, and not all repositories will be affected.

  Of course, individual repositories can still be managed using explicit git
  commands. This class is intended for cross-cutting management.
   N/A __OPTIONAL_REPOSITORIES N/A N/A SourceRepository citest google N/A __REQUIRED_REPOSITORIES N/A N/A SourceRepository spinnaker spinnaker N/A SourceRepository clouddriver spinnaker N/A SourceRepository orca spinnaker N/A SourceRepository front50 spinnaker N/A SourceRepository rush spinnaker N/A SourceRepository echo spinnaker N/A SourceRepository rosco spinnaker N/A SourceRepository gate spinnaker N/A SourceRepository igor spinnaker N/A SourceRepository deck spinnaker pull_branch N/A N/A self N/A N/A N/A Gets the branch that we want to pull.

      This may raise a ValueError if the specification is inconsistent.
      This is determined lazily rather than at construction to be consistent
      with the push_branch property.
       N/A N/A N/A self __options pull_origin N/A N/A N/A N/A N/A self __options pull_branch N/A N/A N/A self __options pull_branch master N/A N/A N/A ValueError N/A N/A --pull_origin is incompatible with --pull_branch={branch} format branch N/A N/A self __options pull_branch N/A master N/A N/A N/A self __options pull_branch N/A property push_branch N/A N/A self N/A N/A N/A Gets the branch that we want to push.

      This may raise a ValueError if the specification is inconsistent.
      This is determined lazily rather than at construction because the
      option to push is not necessarily present depending on the use case.
       N/A N/A N/A self __options push_master N/A N/A N/A N/A N/A self __options push_branch N/A N/A N/A self __options push_branch master N/A N/A N/A ValueError N/A N/A --push_origin is incompatible with --push_branch={branch} format branch N/A N/A self __options push_branch N/A master N/A N/A N/A self __options push_branch N/A property __init__ N/A N/A self options N/A N/A N/A N/A self __options options N/A N/A self __extra_repositories N/A self __OPTIONAL_REPOSITORIES N/A N/A options extra_repos N/A N/A extra N/A N/A N/A options extra_repos split , N/A N/A pair N/A N/A extra split = N/A N/A N/A len pair 2 N/A N/A N/A ValueError N/A N/A Invalid --extra_repos value "{extra}" format extra extra N/A N/A N/A N/A self __extra_repositories append N/A SourceRepository N/A pair N/A 0 N/A pair N/A 1 N/A get_remote_repository_url N/A N/A self path which N/A origin N/A N/A Determine the repository that a given path is from.

      Args:
        path [string]: The path to the repository
        which [string]: The remote repository name (origin or upstream).

      Returns:
        The origin url for path, or None if not a git repository.
       N/A result N/A run_quick N/A N/A git -C {path} config --get remote.{which}.url format path path which which echo False N/A N/A result returncode N/A N/A None N/A N/A N/A N/A result stdout strip N/A get_local_branch_name N/A N/A self name N/A N/A N/A Determine which git branch a local repository is in.

      Args:
        name [string]: The repository name.

      Returns:
        The name of the branch.
       N/A result N/A run_quick N/A N/A git -C "{dir}" rev-parse --abbrev-ref HEAD format dir N/A get_repository_dir name echo False N/A N/A result returncode N/A N/A error N/A Could not determine branch:  N/A N/A N/A result stdout strip N/A N/A RuntimeError error N/A N/A N/A N/A result stdout strip N/A get_github_repository_url N/A N/A self repository owner N/A None N/A N/A Determine the URL for a given github repository.

      Args:
        repository [string]: The upstream SourceRepository.
        owner [string]: The explicit owner for the repository we want.
               If not provided then use the github_user in the bound options.
       N/A user N/A owner N/A N/A self __options github_user N/A N/A user N/A N/A N/A ValueError No --github_user specified. N/A N/A N/A user default N/A user upstream N/A N/A user N/A repository owner N/A url_pattern N/A N/A N/A self __options use_https https://github.com/{user}/{name}.git git@github.com:{user}/{name}.git N/A N/A N/A url_pattern format user user name N/A repository name N/A git_clone N/A N/A self repository owner N/A None N/A N/A Clone the specified repository

      Args:
        repository [string]: The name of the github repository (without owner).
        owner [string]: An explicit repository owner.
               If not provided use the configured options.
       N/A name N/A repository name N/A repository_dir N/A get_repository_dir name N/A upstream_user N/A repository owner N/A branch N/A N/A self pull_branch master N/A origin_url N/A N/A self get_github_repository_url repository owner owner N/A upstream_url N/A N/A https://github.com/{upstream_user}/{name}.git format upstream_user upstream_user name name N/A N/A N/A Cloning {name} from {origin_url} -b {branch}. format name name origin_url origin_url branch branch N/A shell_result N/A run_and_monitor N/A N/A git clone {url} -b {branch} format url origin_url branch branch echo False N/A N/A N/A shell_result returncode N/A N/A N/A shell_result stdout N/A N/A N/A shell_result stdout N/A N/A N/A repository N/A self __extra_repositories N/A N/A N/A N/A N/A sys stderr write N/A N/A WARNING: Missing optional repository {name}.
 format name name N/A N/A N/A N/A sys stderr write          Continue on without it.
 N/A N/A N/A N/A N/A sys stderr write N/A N/A shell_result stderr N/A shell_result stdout N/A N/A N/A N/A sys stderr write N/A N/A FATAL: Cannot continue without required repository {name}.
       Consider using github to fork one from {upstream}.
 format name name upstream upstream_url N/A N/A SystemExit N/A N/A Repository {url} not found. format url origin_url N/A N/A N/A N/A self __options add_upstream N/A origin_url upstream_url N/A N/A N/A N/A   Adding upstream repository {upstream}. format upstream upstream_url N/A N/A check_run_quick N/A N/A git -C "{dir}" remote add upstream {url} format dir repository_dir url upstream_url echo False N/A N/A N/A self __options disable_upstream_push N/A N/A which N/A N/A origin_url upstream_url upstream origin N/A N/A N/A   Disabling git pushes to {which} {upstream} format which which upstream upstream_url N/A N/A check_run_quick N/A N/A git -C "{dir}" remote set-url --push {which} disabled format dir repository_dir which which echo False N/A pull_from_origin N/A N/A self repository N/A N/A N/A Pulls the current branch from the git origin.

      Args:
        repository [string]: The local repository to update.
       N/A name N/A repository name N/A repository_dir N/A get_repository_dir name N/A N/A N/A N/A N/A os path exists repository_dir N/A N/A N/A N/A self git_clone repository N/A N/A N/A N/A Updating {name} from origin format name name N/A branch N/A N/A self get_local_branch_name name N/A N/A branch N/A self pull_branch N/A N/A N/A N/A N/A sys stderr write N/A N/A WARNING: Updating {name} branch={branch}, *NOT* "{want}"
 format name name branch branch want N/A self pull_branch N/A N/A N/A N/A check_run_and_monitor N/A N/A git -C "{dir}" pull origin {branch} --tags format dir repository_dir branch branch echo True N/A N/A N/A RuntimeError N/A N/A result N/A check_run_and_monitor N/A N/A git -C "{dir}" branch -r format dir repository_dir echo False N/A N/A N/A N/A N/A result stdout find origin/{branch}
 0 N/A N/A N/A N/A N/A N/A sys stderr write N/A N/A WARNING {name} branch={branch} is not known to the origin.
 format name name branch branch N/A pull_from_upstream_if_master N/A N/A self repository N/A N/A N/A Pulls the master branch from the upstream repository.

      This will only have effect if the local repository exists
      and is currently in the master branch.

      Args:
        repository [string]: The name of the local repository to update.
       N/A name N/A repository name N/A repository_dir N/A get_repository_dir name N/A N/A N/A N/A N/A os path exists repository_dir N/A N/A N/A N/A self pull_from_origin repository N/A branch N/A N/A self get_local_branch_name name N/A N/A branch master N/A N/A N/A N/A N/A sys stderr write N/A N/A Skipping {name} because it is in branch={branch}.
 format name name branch branch N/A N/A N/A N/A Pulling master {name} from upstream format name name N/A N/A check_run_and_monitor N/A N/A git -C "{dir}" pull upstream master --tags format dir repository_dir echo True N/A push_to_origin_if_target_branch N/A N/A self repository N/A N/A N/A Pushes the current target branch of the local repository to the origin.

      This will only have effect if the local repository exists
      and is currently in the target branch.

      Args:
        repository [string]: The name of the local repository to push from.
       N/A name N/A repository name N/A repository_dir N/A get_repository_dir name N/A N/A N/A N/A N/A os path exists repository_dir N/A N/A N/A N/A N/A sys stderr write N/A N/A Skipping {name} because it does not yet exist.
 format name name N/A N/A branch N/A N/A self get_local_branch_name name N/A N/A branch N/A self push_branch N/A N/A N/A N/A N/A sys stderr write N/A N/A Skipping {name} because it is in branch={branch}, not {want}.
 format name name branch branch want N/A self push_branch N/A N/A N/A N/A Pushing {name} to origin. format name name N/A N/A check_run_and_monitor N/A N/A git -C "{dir}" push origin {branch} --tags format dir repository_dir branch N/A self push_branch echo True N/A push_all_to_origin_if_target_branch N/A N/A self N/A N/A N/A Push all the local repositories current target branch to origin.

    This will skip any local repositories that are not currently in the
    target branch.
     N/A all_repos N/A N/A self __REQUIRED_REPOSITORIES N/A self __extra_repositories N/A repository all_repos N/A N/A N/A N/A self push_to_origin_if_target_branch repository N/A pull_all_from_upstream_if_master N/A N/A self N/A N/A N/A Pull all the upstream master branches into their local repository.

    This will skip any local repositories that are not currently in the master
    branch.
     N/A all_repos N/A N/A self __REQUIRED_REPOSITORIES N/A self __extra_repositories N/A repository all_repos N/A N/A N/A N/A self pull_from_upstream_if_master repository N/A pull_all_from_origin N/A N/A self N/A N/A N/A Pull all the origin target branches into their local repository.

    This will skip any local repositories that are not currently in the
    target branch.
     N/A all_repos N/A N/A self __REQUIRED_REPOSITORIES N/A self __extra_repositories N/A repository all_repos N/A N/A N/A N/A N/A N/A self pull_from_origin repository N/A N/A N/A RuntimeError N/A ex N/A N/A N/A N/A repository N/A self __extra_repositories N/A N/A N/A N/A os path exists N/A get_repository_dir repository N/A N/A N/A N/A N/A sys stderr write N/A N/A IGNORING error "{msg}" in optional repository {name} because the local repository does not yet exist.
 format msg N/A ex message name N/A repository name N/A N/A N/A __determine_spring_config_location N/A N/A self N/A N/A N/A root N/A N/A {dir}/config format dir N/A N/A N/A os path abspath N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ .. N/A home N/A N/A N/A os path join N/A N/A N/A os environ N/A HOME /.spinnaker N/A N/A N/A {root}/,{home}/ format home home root root N/A write_gradle_run_script N/A N/A self repository N/A N/A N/A Generate a dev_run.sh script for the local repository.

      Args:
         repository [string]: The name of the local repository to generate in.
       N/A name N/A repository name N/A path N/A N/A {name}/start_dev.sh format name name N/A N/A open path w f N/A N/A N/A N/A f write N/A N/A #!/bin/bash
d=$(dirname "$0")
cd "$d"
LOG_DIR=${{LOG_DIR:-../logs}}

DEF_SYS_PROPERTIES="-Dspring.config.location='{spring_location}'"
bash -c "(./gradlew $DEF_SYS_PROPERTIES $@ > '$LOG_DIR/{name}.log') 2>&1 | tee -a '$LOG_DIR/{name}.log' >& '$LOG_DIR/{name}.err' &"
 format name name spring_location N/A N/A self __determine_spring_config_location N/A N/A N/A os chmod path 511 N/A write_deck_run_script N/A N/A self repository N/A N/A N/A Generate a dev_run.sh script for running deck locally.

      Args:
        repository [string]: The name of the local repository to generate in.
       N/A name N/A repository name N/A path N/A N/A {name}/start_dev.sh format name name N/A N/A open path w f N/A N/A N/A N/A f write N/A N/A #!/bin/bash
d=$(dirname "$0")
cd "$d"
LOG_DIR=${{LOG_DIR:-../logs}}

if [[ node_modules -ot .git ]]; then
  # Update npm, otherwise assume nothing changed and we're good.
  npm install >& "$LOG_DIR/deck.log"
else
  echo "deck npm node_modules looks up to date already."
fi

# Append to the log file we just started.
bash -c "(npm start >> '$LOG_DIR/{name}.log') 2>&1 | tee -a '$LOG_DIR/{name}.log' >& '$LOG_DIR/{name}.err' &"
 format name name N/A N/A N/A os chmod path 511 N/A update_spinnaker_run_scripts N/A N/A self N/A N/A N/A Regenerate the local dev_run.sh script for each local repository. N/A repository N/A self __REQUIRED_REPOSITORIES N/A N/A name N/A repository name N/A N/A N/A N/A N/A os path exists name N/A N/A N/A N/A name deck N/A N/A N/A N/A self write_deck_run_script repository N/A N/A N/A N/A self write_gradle_run_script repository N/A init_extra_argument_parser N/A N/A cls parser N/A N/A N/A Initialize additional arguments for managing remote repositories.

      This is to sync the origin and upstream repositories. The intent
      is to ultimately sync the origin from the upstream repository, but
      this might be in two steps so the upstream can be verified [again]
      before pushing the changes to the origin.
       N/A N/A N/A parser add_argument --pull_upstream default False action store_true help If the local branch is master, then refresh it from the upstream repository. Otherwise leave as is. N/A N/A N/A parser add_argument --nopull_upstream dest pull_upstream action store_false N/A N/A N/A parser add_argument --push_master action store_true help Push the current branch to origin if it is master. This is the same as --push_branch=master. N/A N/A N/A parser add_argument --nopush_master dest push_master action store_false N/A N/A N/A parser add_argument --push_branch default help If specified and the local repository is in this branch then push it to the origin repository. Otherwise do not push it. N/A classmethod init_argument_parser N/A N/A cls parser N/A N/A N/A Initialize command-line arguments. N/A N/A N/A parser add_argument --use_https default True action store_true help Use https when cloning github repositories. N/A N/A N/A parser add_argument --use_ssh dest use_https action store_false help Use SSH when cloning github repositories. N/A N/A N/A parser add_argument --add_upstream default True action store_true help Add upstream repository when cloning. N/A N/A N/A parser add_argument --noadd_upstream dest add_upstream action store_false N/A N/A N/A parser add_argument --disable_upstream_push default True action store_true help Disable future pushes to the upstream repository when cloning a repository. N/A N/A N/A parser add_argument --nodisable_upstream_push dest disable_upstream_push action store_false N/A N/A N/A parser add_argument --pull_origin default False action store_true help Refresh the local branch from the origin. If cloning, then clone the master branch. See --pull_branch for a more general option. N/A N/A N/A parser add_argument --nopull_origin dest pull_origin action store_false N/A N/A N/A parser add_argument --pull_branch default help Refresh the local branch from the origin if it is in the specified branch, otherwise skip it. If cloning, then clone this branch. N/A N/A N/A parser add_argument --extra_repos default None help A comma-delimited list of name=owner optional repositories.name is the repository name, owner is the authoritative github user name owning it. The --github_user will still be used to determine the origin. N/A N/A N/A parser add_argument --github_user default None help Pull from this github user's repositories. If the user is "default" then use the authoritative (upstream) repository. N/A classmethod main N/A N/A cls N/A N/A N/A parser N/A N/A argparse ArgumentParser N/A N/A N/A cls init_argument_parser parser N/A N/A N/A cls init_extra_argument_parser parser N/A options N/A N/A parser parse_args N/A refresher N/A cls options N/A in_repository_url N/A N/A refresher get_remote_repository_url . N/A in_repository_url N/A N/A N/A N/A N/A sys stderr write N/A N/A ERROR: You cannot run this script from within a local repository.
 This directory is from "{url}".
 Did you intend to be in the parent directory?
 format url in_repository_url N/A -1 N/A N/A N/A N/A N/A N/A refresher pull_branch N/A refresher push_branch N/A refresher pull_branch N/A refresher push_branch N/A N/A N/A N/A N/A sys stderr write N/A N/A WARNING: pulling branch {pull} and pushing branch {push} format pull N/A refresher pull_branch push N/A refresher push_branch N/A N/A N/A Exception N/A ex N/A N/A N/A N/A N/A sys stderr write N/A N/A FAILURE: {0}
 format N/A ex message N/A -1 N/A nothing True N/A N/A options pull_upstream N/A N/A nothing False N/A N/A N/A refresher pull_all_from_upstream_if_master N/A N/A refresher push_branch N/A N/A nothing False N/A N/A N/A refresher push_all_to_origin_if_target_branch N/A N/A refresher pull_branch N/A N/A nothing False N/A N/A N/A refresher pull_all_from_origin N/A N/A N/A refresher update_spinnaker_run_scripts N/A nothing N/A N/A N/A N/A N/A sys stderr write No pull/push options were specified.
 N/A N/A DONE N/A 0 N/A classmethod N/A N/A N/A __name__ __main__ N/A N/A N/A N/A sys exit N/A N/A Refresher main