Loading deploy.py +6 −7 Original line number Diff line number Diff line Loading @@ -175,27 +175,26 @@ def deploy(environment): @task def provision(environment, role='local'): def provision(environment): """ Provision a Jenkins deployment. This task loads the target environment and extract the archive to deploy. :param environment The environment to deploy the site DEV, STAGE, PROD :param role Tha fabric role to run the task. """ _set_hosts(environment) artefact = _get_archive_from_dir(env.builddir) with h.fab_cd(role, '{}/src'.format(env.workspace)): with lcd('{}/src'.format(env.workspace)): # Clear the currently installed platform if h.fab_exists(role, env.site_root): h.fab_run(role, 'rm -rf {}'.format(env.site_root)) if os.path.exists(env.site_root): local('rm -rf {}'.format(env.site_root)) # Extract the platform to deploy h.fab_run(role, 'tar -xzf {}/{}'.format(env.builddir, artefact)) local('tar -xzf {}/{}'.format(env.builddir, artefact)) # Fast-check if the archive looks like a Drupal installation if not h.fab_exists(role, '{}/src/drupal'.format(env.workspace)): if not os.path.exists('{}/src/drupal'.format(env.workspace)): abort('The archive to deploy does not contain a drupal directory.') if not os.path.isfile('{}/src/drupal/cron.php'.format(env.workspace)): Loading Loading
deploy.py +6 −7 Original line number Diff line number Diff line Loading @@ -175,27 +175,26 @@ def deploy(environment): @task def provision(environment, role='local'): def provision(environment): """ Provision a Jenkins deployment. This task loads the target environment and extract the archive to deploy. :param environment The environment to deploy the site DEV, STAGE, PROD :param role Tha fabric role to run the task. """ _set_hosts(environment) artefact = _get_archive_from_dir(env.builddir) with h.fab_cd(role, '{}/src'.format(env.workspace)): with lcd('{}/src'.format(env.workspace)): # Clear the currently installed platform if h.fab_exists(role, env.site_root): h.fab_run(role, 'rm -rf {}'.format(env.site_root)) if os.path.exists(env.site_root): local('rm -rf {}'.format(env.site_root)) # Extract the platform to deploy h.fab_run(role, 'tar -xzf {}/{}'.format(env.builddir, artefact)) local('tar -xzf {}/{}'.format(env.builddir, artefact)) # Fast-check if the archive looks like a Drupal installation if not h.fab_exists(role, '{}/src/drupal'.format(env.workspace)): if not os.path.exists('{}/src/drupal'.format(env.workspace)): abort('The archive to deploy does not contain a drupal directory.') if not os.path.isfile('{}/src/drupal/cron.php'.format(env.workspace)): Loading