|
a/pyforge/push_re.py |
|
b/pyforge/push_re.py |
|
... |
|
... |
11 |
|
11 |
|
12 |
def main():
|
12 |
def main():
|
13 |
CP.read(os.path.join(os.environ['HOME'], '.forgepushrc'))
|
13 |
CP.read(os.path.join(os.environ['HOME'], '.forgepushrc'))
|
14 |
engineer = option('re', 'engineer', 'Name of engineer pushing: ')
|
14 |
engineer = option('re', 'engineer', 'Name of engineer pushing: ')
|
15 |
text, tag = make_ticket_text(engineer)
|
15 |
text, tag = make_ticket_text(engineer)
|
16 |
print '*** Create a ticket on NewForge with the following contents:'
|
16 |
print '*** Create a ticket on SourceForge (https://sourceforge.net/p/allura/tickets/new/) with the following contents:'
|
17 |
print '*** Summary: Production Push (R:%s, D:%s)' % (
|
17 |
print '*** Summary: Production Push (R:%s, D:%s)' % (
|
18 |
tag, date.today().strftime('%Y%m%d'))
|
18 |
tag, date.today().strftime('%Y%m%d'))
|
19 |
print '---BEGIN---'
|
19 |
print '---BEGIN---'
|
20 |
print text
|
20 |
print text
|
21 |
print '---END---'
|
21 |
print '---END---'
|
22 |
raw_input("Verify that there are no new dependencies, or RPM's are build for all deps...")
|
22 |
raw_input("Verify that there are no new dependencies, or RPM's are build for all deps...")
|
23 |
raw_input("Verify that a new sandbox builds starts without engr help...")
|
23 |
raw_input("Verify that a new sandbox builds starts without engr help...")
|
24 |
raw_input('When this is done, create a JIRA ticket with the same contents...')
|
24 |
raw_input('When this is done, create a JIRA ticket (https://engr.geek.net/jira/secure/CreateIssue!default.jspa) with the same contents...')
|
25 |
raw_input('Now link the two tickets...')
|
25 |
raw_input('Now link the two tickets...')
|
26 |
newforge_num = raw_input('What is the newforge ticket number? ')
|
26 |
newforge_num = raw_input('What is the newforge ticket number? ')
|
27 |
command('git', 'tag', '-a', '-m', '[#%s] - Push to RE' % newforge_num, tag, 'master')
|
27 |
command('git', 'tag', '-a', '-m', '[#%s] - Push to RE' % newforge_num, tag, 'master')
|
28 |
command('git', 'push', 'origin', 'master')
|
28 |
command('git', 'push', 'origin', 'master')
|
29 |
command('git', 'push', 'live', 'master')
|
29 |
command('git', 'push', 'live', 'master')
|
|
... |
|
... |
53 |
postlaunch = []
|
53 |
postlaunch = []
|
54 |
needs_reactor_setup = raw_input('Does this release require a reactor_setup? [n]')
|
54 |
needs_reactor_setup = raw_input('Does this release require a reactor_setup? [n]')
|
55 |
needs_flyway = raw_input('Does this release require a migration? [y]')
|
55 |
needs_flyway = raw_input('Does this release require a migration? [y]')
|
56 |
if needs_reactor_setup[:1].lower() in ('y', '1'):
|
56 |
if needs_reactor_setup[:1].lower() in ('y', '1'):
|
57 |
postlaunch.append('* service reactor stop')
|
57 |
postlaunch.append('* service reactor stop')
|
58 |
postlaunch.append('* paster reactor_setup /var/local/config/production.ini')
|
58 |
postlaunch.append('* allurapaste reactor_setup /var/local/config/production.ini')
|
59 |
postlaunch.append('* service reactor start')
|
59 |
postlaunch.append('* service reactor start')
|
60 |
if needs_flyway[:1].lower() in ('', 'y', '1'):
|
60 |
if needs_flyway[:1].lower() in ('', 'y', '1'):
|
61 |
prelaunch.append('* dump the database in case we need to roll back')
|
61 |
prelaunch.append('* dump the database in case we need to roll back')
|
62 |
postlaunch.append('* paster flyway --url mongo://sfn-mongo-1:27017/')
|
62 |
postlaunch.append('* allurapaste flyway --url mongo://sfn-mongo-1:27017/')
|
63 |
if postlaunch:
|
63 |
if postlaunch:
|
64 |
postlaunch = [ 'From sfu-scmprocess-1 do the following:\n' ] + postlaunch
|
64 |
postlaunch = [ 'From sfu-scmprocess-1 do the following:\n' ] + postlaunch
|
65 |
postlaunch = '\n'.join(postlaunch)
|
65 |
postlaunch = '\n'.join(postlaunch)
|
66 |
else:
|
66 |
else:
|
67 |
postlaunch = '-none-'
|
67 |
postlaunch = '-none-'
|