You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2020/01/14 22:16:14 UTC

[airavata] branch AIRAVATA-3284--Ansible--clean-up-past-built-CSS/JS-files created (now e9e25f4)

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch AIRAVATA-3284--Ansible--clean-up-past-built-CSS/JS-files
in repository https://gitbox.apache.org/repos/asf/airavata.git.


      at e9e25f4  AIRAVATA-3284 using regex to target just built js/css files

This branch includes the following new commits:

     new bb63bef  AIRAVATA-3284 Remove older built JS/CSS files
     new fcf2b3c  AIRAVATA-3284 Fixing typo
     new e9e25f4  AIRAVATA-3284 using regex to target just built js/css files

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[airavata] 03/03: AIRAVATA-3284 using regex to target just built js/css files

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch AIRAVATA-3284--Ansible--clean-up-past-built-CSS/JS-files
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit e9e25f4eff83b1e2978aa76ff57384f27316d9cd
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jan 14 17:15:33 2020 -0500

    AIRAVATA-3284 using regex to target just built js/css files
---
 dev-tools/ansible/roles/django/tasks/main.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dev-tools/ansible/roles/django/tasks/main.yml b/dev-tools/ansible/roles/django/tasks/main.yml
index 5f5ba49..2c22bc3 100644
--- a/dev-tools/ansible/roles/django/tasks/main.yml
+++ b/dev-tools/ansible/roles/django/tasks/main.yml
@@ -52,7 +52,7 @@
     mode: o+rx
   run_once: true
 
-- name: git clone django repo
+- name: git clone {{ airavata_django_git_branch }} branch of {{ airavata_django_repo }}
   local_action:
     module: git
     repo: "{{ airavata_django_repo }}"
@@ -179,11 +179,13 @@
   become: yes
   become_user: "{{user}}"
 
-- name: Find built JS/CSS files in /static directory accessed more than 30d ago
+- name: Find built JS/CSS files in /static directory last accessed more than 30d ago
   find:
     paths: "{{ doc_root_dir }}/static"
     age: 30d
     age_stamp: atime
+    patterns: ".*\\.[0-9a-f]{8}\\.js(\\.map)?,.*\\.[0-9a-f]{8}\\.css"
+    use_regex: yes
     recurse: yes
   register: static_files_to_delete
   become: yes


[airavata] 01/03: AIRAVATA-3284 Remove older built JS/CSS files

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch AIRAVATA-3284--Ansible--clean-up-past-built-CSS/JS-files
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit bb63befd93a169a8b2c994dec4955000267a61f6
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jan 14 15:04:53 2020 -0500

    AIRAVATA-3284 Remove older built JS/CSS files
---
 dev-tools/ansible/roles/django/tasks/main.yml | 39 +++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/dev-tools/ansible/roles/django/tasks/main.yml b/dev-tools/ansible/roles/django/tasks/main.yml
index 37ded3e..9f44324 100644
--- a/dev-tools/ansible/roles/django/tasks/main.yml
+++ b/dev-tools/ansible/roles/django/tasks/main.yml
@@ -124,6 +124,27 @@
   notify:
     - restart uwsgi
 
+- name: rsync build Django code to {{ airavata_django_checkout }}, deleting older built files
+  synchronize:
+    src: "{{ airavata_django_portal_tempdir.path }}/{{ item }}/"
+    dest: "{{ airavata_django_checkout }}/{{ item }}"
+    delete: yes
+    rsync_opts:
+      - "--exclude=node_modules"
+    # Bug: become_user doesn't work with synchronize: https://github.com/ansible/ansible/issues/29698
+    rsync_path: "sudo -u {{ user }} rsync"
+  # become: yes
+  # become_user: "{{user}}"
+  notify:
+    - restart uwsgi
+  with_items:
+    - "django_airavata/apps/api/static/django_airavata_api"
+    - "django_airavata/static/common"
+    - "django_airavata/apps/admin/static/django_airavata_admin"
+    - "django_airavata/apps/groups/static/django_airavata_groups"
+    - "django_airavata/apps/workspace/static/django_airavata_workspace"
+    - "django_airavata/apps/dataparsers/static/django_airavata_dataparsers"
+
 - name: Create virtual environment for Django portal and install dependencies
   pip:
     requirements: "{{ item }}"
@@ -158,6 +179,24 @@
   become: yes
   become_user: "{{user}}"
 
+- name: Find built JS/CSS files in /static directory accessed more than 30d ago
+  find:
+    paths: "{{ doc_root_dir }}/static"
+    age: 30d
+    age_stamp: atime
+    recurse: yes
+  register: static_files_to_delete
+  become: yes
+  become_user: "{{user}}"
+
+- name: Remove older built files from /static directory
+  file:
+    path: "{{ item.path }}"
+    state: absent
+  with_items: "{{ static_files_to_delete.files }}"
+  become: yes
+  become_user: "{{user}}"
+
 - name: Run Django's manage.py collectstatic
   django_manage:
     command: "collectstatic -i node_modules --noinput"


[airavata] 02/03: AIRAVATA-3284 Fixing typo

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch AIRAVATA-3284--Ansible--clean-up-past-built-CSS/JS-files
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit fcf2b3c9b47e698a6737d27c51db88de76169e6c
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Jan 14 15:39:44 2020 -0500

    AIRAVATA-3284 Fixing typo
---
 dev-tools/ansible/roles/django/tasks/main.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dev-tools/ansible/roles/django/tasks/main.yml b/dev-tools/ansible/roles/django/tasks/main.yml
index 9f44324..5f5ba49 100644
--- a/dev-tools/ansible/roles/django/tasks/main.yml
+++ b/dev-tools/ansible/roles/django/tasks/main.yml
@@ -108,7 +108,7 @@
     name: ansible-airavata-django-portal
   run_once: true
 
-- name: rsync build Django code to {{ airavata_django_checkout }}
+- name: rsync built Django code to {{ airavata_django_checkout }}
   synchronize:
     src: "{{ airavata_django_portal_tempdir.path }}/"
     dest: "{{ airavata_django_checkout }}"
@@ -124,7 +124,7 @@
   notify:
     - restart uwsgi
 
-- name: rsync build Django code to {{ airavata_django_checkout }}, deleting older built files
+- name: rsync built Django code to {{ airavata_django_checkout }}, deleting older built files
   synchronize:
     src: "{{ airavata_django_portal_tempdir.path }}/{{ item }}/"
     dest: "{{ airavata_django_checkout }}/{{ item }}"