Merge lp://qastaging/~cjohnston/qa-dashboard/auto-update-assets into lp://qastaging/qa-dashboard
Status: | Merged |
---|---|
Approved by: | Joe Talbott |
Approved revision: | 698 |
Merged at revision: | 756 |
Proposed branch: | lp://qastaging/~cjohnston/qa-dashboard/auto-update-assets |
Merge into: | lp://qastaging/qa-dashboard |
Diff against target: |
63 lines (+59/-0) 1 file modified
scripts/update_assets.py (+59/-0) |
To merge this branch: | bzr merge lp://qastaging/~cjohnston/qa-dashboard/auto-update-assets |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andy Doan (community) | Approve | ||
PS Jenkins bot | continuous-integration | Approve | |
Chris Johnston | Needs Resubmitting | ||
Review via email:
|
Commit message
Automagically update lp:qa-dashboard/assets when new/modified assets exist; update assets_revision with the new revision number.
Description of the change
This branch is creating a script which will check staticfiles to see if they have been updated. If there are new/modified files, update_assets.py will create a new directory in lp:qa-dashboard/assets with the revision number of the next lp:qa-dashboard commit, copy the staticfiles and then push them up to LP for inclusion on assets.ubuntu.com
It will also modify the assets_revision.py file to reflect which directory the dashboard should be looking for assets files in assets.ubuntu.com
This script will require that lp:qa-dashboard/assets live at qa-dashboard/assets for tarmac
14 +regex = re.compile(ur'0 static files copied,') output) :
22 + if not regex.search(
should we make this check for >0 amount of files copied? ie - could this code path get hit if an exception were thrown and the program didn't print anything? or maybe search for:
regex = re.compile(ur'\d+ static files copied,') output)
match = regex.search(
if not match:
print("WTF???")
elif output[0] != '0':
print("update")