def rqm(options): """ Submit the branch to release manager. """ result = pave.git.status() if result: print 'Please commit all files before requesting the release.' print 'RQM cancelled.' sys.exit(1) target = pave.getOption(options, 'rqm', 'target', default_value=None) if target == 'production': target = 'gk-release' else: target = 'gk-release-staging' test_arguments = 'latest=%s' % pave.getOption( options, 'rqm', 'latest', default_value='yes') pull_id_property = '--properties=github_pull_id=%s' % pave.getOption( options, 'rqm', 'pull_id', default_value='not-defined') arguments = [target, pull_id_property, test_arguments] environment.args = arguments from brink.pavement_commons import test_remote test_remote(arguments)
def pqm(): """ Submit the branch to PQM. Arguments AFTER all options: PULL_ID [--force-clean] """ args = sys.argv[2:] if len(args) < 1: print 'Please specify the pull request id for this branch.' sys.exit(1) result = pave.git.status() if result: print 'Please commit all files and get review approval.' print 'PQM canceled.' sys.exit(1) try: pull_id = int(args[0]) except: print "Pull id in bad format. It must be an integer." sys.exit(1) pull_id_property = '--properties=github_pull_id=%s' % (pull_id) arguments = ['gk-merge', pull_id_property] if '--force-purge' in args: arguments.append('--properties=force_purge=yes') environment.args = arguments from brink.pavement_commons import test_remote test_remote(arguments)
def test_review(args): """ Run test suite for review process. """ result = pave.git.status() if result: print 'Please commit all files before requesting the release.' print 'Aborted.' sys.exit(1) arguments = ['gk-review'] if args: pull_id = args[0] arguments.append('--properties=github_pull_id=%s' % (pull_id,)) environment.args = arguments from brink.pavement_commons import test_remote test_remote(arguments)