Commit d30a53c8 by Feanil Patel

Use the build number instead of the time for the cache key.

parent 3ba3a80b
...@@ -7,20 +7,6 @@ ...@@ -7,20 +7,6 @@
owner={{ edxapp_user }} group={{ common_web_user }} owner={{ edxapp_user }} group={{ common_web_user }}
mode=0644 mode=0644
- name: Get current time
shell: 'date +%s'
register: time_in_seconds
when: EDXAPP_UPDATE_STATIC_FILES_KEY
- name: Update the static_files_key_prefix
set_fact:
edxapp_dynamic_cache_key: '{{time_in_seconds.stdout}}'
when: EDXAPP_UPDATE_STATIC_FILES_KEY
- name: Print out the staticfiles prefix
debug: msg="Setting static_files_cache_prefix to {{time_in_seconds.stdout}}"
when: EDXAPP_UPDATE_STATIC_FILES_KEY
# Optional auth for git # Optional auth for git
- name: create ssh script for git (not authenticated) - name: create ssh script for git (not authenticated)
template: > template: >
......
...@@ -337,6 +337,10 @@ EDXAPP_LOCAL_GIT_IDENTITY: $secure_identity ...@@ -337,6 +337,10 @@ EDXAPP_LOCAL_GIT_IDENTITY: $secure_identity
# this is so that the application can come # this is so that the application can come
# up healthy # up healthy
fake_migrations: true fake_migrations: true
# Use the build number an the dynamic cache key.
EDXOAPP_UPDATE_STATIC_FILES_KEY: true
edxapp_dynamic_cache_key: {build_id}
EOF EOF
chmod 400 $secure_identity chmod 400 $secure_identity
...@@ -377,7 +381,8 @@ rm -rf $base_dir ...@@ -377,7 +381,8 @@ rm -rf $base_dir
queue_name=run_id, queue_name=run_id,
extra_vars_yml=extra_vars_yml, extra_vars_yml=extra_vars_yml,
git_refs_yml=git_refs_yml, git_refs_yml=git_refs_yml,
secure_vars=secure_vars) secure_vars=secure_vars,
build_id=args.jenkin_build)
ec2_args = { ec2_args = {
'security_group_ids': [security_group_id], 'security_group_ids': [security_group_id],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment