示例#1
0
def update_site_core(project='pantheon', keep=None):
    """Update Drupal core (from Drupal or Pressflow, to latest Pressflow).
       keep: Option when merge fails:
             'ours': Keep local changes when there are conflicts.
             'theirs': Keep upstream changes when there are conflicts.
             'force': Leave failed merge in working-tree (manual resolve).
             None: Reset to ORIG_HEAD if merge fails.
    """
    updater = update.Updater(project, 'dev')
    try:
        result = updater.core_update(keep)
        updater.drupal_updatedb()
        updater.permissions_update()
    except:
        jenkinstools.junit_error(traceback.format_exc(), 'UpdateCore')
        raise
    else:
        jenkinstools.junit_pass('Update successful.', 'UpdateCore')

    postback.write_build_data('update_site_core', result)

    if result['merge'] == 'success':
        # Send drupal version information.
        status.drupal_update_status(project)
        status.git_repo_status(project)
示例#2
0
def update_site_core(project='pantheon', keep=None):
    """Update Drupal core (from Drupal or Pressflow, to latest Pressflow).
       keep: Option when merge fails:
             'ours': Keep local changes when there are conflicts.
             'theirs': Keep upstream changes when there are conflicts.
             'force': Leave failed merge in working-tree (manual resolve).
             None: Reset to ORIG_HEAD if merge fails.
    """
    updater = update.Updater(project, 'dev')
    try:
        result = updater.core_update(keep)
        updater.drupal_updatedb()
        updater.permissions_update()
    except:
        jenkinstools.junit_error(traceback.format_exc(), 'UpdateCore')
        raise
    else:
        jenkinstools.junit_pass('Update successful.', 'UpdateCore')

    postback.write_build_data('update_site_core', result)

    if result['merge'] == 'success':
        # Send drupal version information.
        status.drupal_update_status(project)
        status.git_repo_status(project)
示例#3
0
def update_site_core(project="pantheon", keep=None, taskid=None):
    """Update Drupal core (from Drupal or Pressflow, to latest Pressflow).
       keep: Option when merge fails:
             'ours': Keep local changes when there are conflicts.
             'theirs': Keep upstream changes when there are conflicts.
             'force': Leave failed merge in working-tree (manual resolve).
             None: Reset to ORIG_HEAD if merge fails.
    """
    updater = update.Updater("dev")
    result = updater.core_update(keep)
    if result["merge"] == "success":
        # Send drupal version information.
        status.drupal_update_status(project)
        status.git_repo_status(project)
        updater.permissions_update()
        postback.write_build_data("update_site_core", result)

    else:
        log = logger.logging.getLogger("pantheon.update_site_core")
        updater.permissions_update()
        log.error("Upstream merge did not succeed. Review conflicts.")
示例#4
0
def update_site_core(project='pantheon', keep=None, taskid=None):
    """Update Drupal core (from Drupal or Pressflow, to latest Pressflow).
       keep: Option when merge fails:
             'ours': Keep local changes when there are conflicts.
             'theirs': Keep upstream changes when there are conflicts.
             'force': Leave failed merge in working-tree (manual resolve).
             None: Reset to ORIG_HEAD if merge fails.
    """
    updater = update.Updater('dev')
    result = updater.core_update(keep)
    if result['merge'] == 'success':
        # Send drupal version information.
        status.drupal_update_status(project)
        status.git_repo_status(project)
        updater.permissions_update()
        postback.write_build_data('update_site_core', result)

    else:
        log = logger.logging.getLogger('pantheon.update_site_core')
        updater.permissions_update()
        log.error('Upstream merge did not succeed. Review conflicts.')