Home | History | Annotate | Download | only in site_utils

Lines Matching full:prod

34 PROD_BRANCH = 'prod'
38 # CIPD packages whose prod refs should be updated.
56 description=('Command to update prod branch for autotest, chromite '
59 help='Skip updating autotest prod branch. Default is False.')
61 help='Skip updating chromite prod branch. Default is False.')
64 'chromite prod branch'))
66 help='Update autotest prod branch to the given hash. If it is not'
67 ' specified, autotest prod branch will be rebased to '
68 'prod-next branch, which is the latest commit that has '
88 """Method to clone the prod branch for a given repo under /tmp/ dir.
97 print 'Cloning %s prod branch under %s' % (repo, repo_dir)
102 print 'Successfully cloned %s prod branch' % repo
107 """Method to update the prod branch of the given repo to the given hash.
111 @param hash_to_rebase: Hash to rebase the prod branch to. If it is None,
112 prod branch will rebase to prod-next branch.
115 prod branch is already up-to-date, return None.
119 print 'Updating %s prod branch.' % repo
120 rebase_to = hash_to_rebase if hash_to_rebase else 'origin/prod-next'
121 # Check whether prod branch is already up-to-date, which means there is
124 diff = infra.local_runner('git log prod..%s --oneline' % rebase_to,
127 print 'Find new changes, will update prod branch...'
128 infra.local_runner('git rebase %s prod' % rebase_to,
130 result = infra.local_runner('git push origin prod',
132 print 'Successfully pushed %s prod branch!\n' % repo
154 @return: the commits that are pushed to prod branch. The format likes this:
207 print 'Moving CIPD prod refs to prod-next'
209 subprocess.check_call(['cipd', 'set-ref', pkg, '-version', 'prod-next',
210 '-ref', 'prod'])
222 print 'Fail to clone prod branch. Error:\n%s\n' % e