• Home
  • Raw
  • Download

Lines Matching full:prod

34 PROD_BRANCH = 'prod'
38 # CIPD packages whose prod refs should be updated.
57 description=('Command to update prod branch for autotest, chromite '
60 help='Skip updating autotest prod branch. Default is False.')
62 help='Skip updating chromite prod branch. Default is False.')
65 'chromite prod branch'))
67 help='Update autotest prod branch to the given hash. If it is not'
68 ' specified, autotest prod branch will be rebased to '
69 'prod-next branch, which is the latest commit that has '
89 """Method to clone the prod branch for a given repo under /tmp/ dir.
98 print 'Cloning %s prod branch under %s' % (repo, repo_dir)
103 print 'Successfully cloned %s prod branch' % repo
108 """Method to update the prod branch of the given repo to the given hash.
112 @param hash_to_rebase: Hash to rebase the prod branch to. If it is None,
113 prod branch will rebase to prod-next branch.
116 prod branch is already up-to-date, return None.
120 print 'Updating %s prod branch.' % repo
121 rebase_to = hash_to_rebase if hash_to_rebase else 'origin/prod-next'
122 # Check whether prod branch is already up-to-date, which means there is
125 diff = infra.local_runner('git log prod..%s --oneline' % rebase_to,
128 print 'Find new changes, will update prod branch...'
129 infra.local_runner('git rebase %s prod' % rebase_to,
131 result = infra.local_runner('git push origin prod',
133 print 'Successfully pushed %s prod branch!\n' % repo
155 @return: the commits that are pushed to prod branch. The format likes this:
208 print 'Moving CIPD prod refs to prod-next'
210 subprocess.check_call(['cipd', 'set-ref', pkg, '-version', 'prod-next',
211 '-ref', 'prod'])
223 print 'Fail to clone prod branch. Error:\n%s\n' % e