зеркало из https://github.com/mozilla/FlightDeck.git
Merge remote branch 'ryan/bug-663085-notify_if_xpi_download_never_occurs'
This commit is contained in:
Коммит
2092ab7678
|
@ -290,6 +290,11 @@ var FlightDeck = new Class({
|
|||
'Wrong response from Add-on Builder Helper. Please <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=573778">let us know</a>'
|
||||
);
|
||||
}
|
||||
} else if (test_request.request_number > 50) {
|
||||
this.warning.alert(
|
||||
'Add-on Builder',
|
||||
'The add-on was not successfully built (attempts timed out). Please try again.'
|
||||
);
|
||||
}
|
||||
}.bind(this)
|
||||
}).send(this);
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
import os
|
||||
|
||||
from commander.deploy import hostgroups, task
|
||||
|
||||
|
||||
AMO_PYTHON_ROOT = '/data/amo_python'
|
||||
FLIGHTDECK_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||
|
||||
|
||||
@task
|
||||
def deploy_code(ctx):
|
||||
with ctx.lcd(AMO_PYTHON_ROOT):
|
||||
ctx.local("/usr/bin/rsync -aq --exclude '.git*' --delete src/builder/ www/builder/")
|
||||
with ctx.lcd("www"):
|
||||
ctx.local("git add .")
|
||||
ctx.local("git commit -a -m 'flightdeck push'")
|
||||
|
||||
pull_code()
|
||||
|
||||
|
||||
@hostgroups(["amo", "amo_gearman"])
|
||||
def pull_code(ctx):
|
||||
ctx.remote("/data/bin/libget/get-php5-www-git.sh")
|
||||
ctx.remote("touch /data/amo_python/www/builder/flightdeck/wsgi/flightdeck.wsgi")
|
||||
|
||||
|
||||
@hostgroups(["amo_gearman"])
|
||||
def restart_celery(ctx):
|
||||
ctx.remote("service celeryd-builder_prod restart")
|
||||
ctx.remote("service celeryd-builder_prod_bulk restart")
|
||||
|
||||
|
||||
@task
|
||||
def schematic(ctx):
|
||||
with ctx.lcd(FLIGHTDECK_DIR):
|
||||
ctx.local("python2.6 ./vendor/src/schematic/schematic migrations")
|
||||
|
||||
|
||||
def _git_checkout_tag(ctx, tag):
|
||||
ctx.local("git fetch -t origin")
|
||||
ctx.local("git checkout %s" % tag)
|
||||
ctx.local("git submodule sync")
|
||||
ctx.local("git submodule update --init --recursive")
|
||||
|
||||
|
||||
@task
|
||||
def start_update(ctx, tag):
|
||||
"""Updates code to `tag`"""
|
||||
with ctx.lcd(FLIGHTDECK_DIR):
|
||||
_git_checkout_tag(ctx, tag)
|
||||
|
||||
|
||||
@task
|
||||
def update_flightdeck(ctx):
|
||||
"""Deploys code to the webservers and restarts celery"""
|
||||
schematic()
|
||||
deploy_code()
|
||||
restart_celery()
|
Загрузка…
Ссылка в новой задаче