From b2415fa49ce760c4272ee0792ff2de47ab579292 Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Tue, 19 Jun 2018 12:54:51 -0400 Subject: [PATCH] Revert "build-before: Checkout project source code to local temporary directory" --- CHANGELOG.md | 1 - deploy-hooks/build-before.yml | 15 +++------------ roles/deploy/defaults/main.yml | 3 ++- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e860a1f87..9b85267035 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,4 @@ ### HEAD -* build-before: Checkout project source code to local temporary directory ([#997](https://github.com/roots/trellis/pull/997)) * Verify `wp-cli.phar` checksum ([#996](https://github.com/roots/trellis/pull/996)) * Enable `fastcgi_cache_background_update` by default ([#962](https://github.com/roots/trellis/pull/962)) * Bump Ansible `version_tested_max` to 2.5.3 ([#981](https://github.com/roots/trellis/pull/981)) diff --git a/deploy-hooks/build-before.yml b/deploy-hooks/build-before.yml index 1e3405458c..bfad9d6847 100644 --- a/deploy-hooks/build-before.yml +++ b/deploy-hooks/build-before.yml @@ -7,20 +7,11 @@ # Uncomment the lines below and replace `sage` with your theme folder # # --- -# - name: Clone project files -# git: -# repo: "{{ project_git_repo }}" -# version: "{{ project_version }}" -# dest: "{{ project_build_path }}" -# force: yes -# no_log: true -# connection: local -# # - name: Install npm dependencies # command: yarn # connection: local # args: -# chdir: "{{ project_build_path }}/web/app/themes/sage" +# chdir: "{{ project_local_path }}/web/app/themes/sage" # # - name: Install Composer dependencies # command: composer install --no-ansi --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts @@ -31,11 +22,11 @@ # command: yarn build:production # connection: local # args: -# chdir: "{{ project_build_path }}/web/app/themes/sage" +# chdir: "{{ project_local_path }}/web/app/themes/sage" # # - name: Copy production assets # synchronize: -# src: "{{ project_build_path }}/web/app/themes/sage/dist" +# src: "{{ project_local_path }}/web/app/themes/sage/dist" # dest: "{{ deploy_helper.new_release_path }}/web/app/themes/sage" # group: no # owner: no diff --git a/roles/deploy/defaults/main.yml b/roles/deploy/defaults/main.yml index 58d9222bb7..8e04496fff 100644 --- a/roles/deploy/defaults/main.yml +++ b/roles/deploy/defaults/main.yml @@ -51,7 +51,8 @@ update_db_on_deploy: true # Helpers project: "{{ wordpress_sites[site] }}" project_root: "{{ www_root }}/{{ site }}" -project_build_path: "{{ lookup('env', 'TMPDIR') | default('/tmp/', true) }}trellis/{{ site }}/{{ env }}" +project_local_path: "{{ (lookup('env', 'USER') == 'vagrant') | ternary(project_root + '/' + project_current_path, project.local_path) }}" + # Deploy hooks # For list of hooks and explanation, see https://roots.io/trellis/docs/deploys/#hooks