Merge ~barryprice/charm-k8s-discourse/+git/charm-k8s-discourse:loop-precompile into charm-k8s-discourse:master

Proposed by Barry Price
Status: Merged
Approved by: Tom Haddon
Approved revision: 8ae33eaffa343eb42b77dd3395467c9d3b2e7415
Merged at revision: 54f81a9eb88a577581877f9e03b447fbee89e882
Proposed branch: ~barryprice/charm-k8s-discourse/+git/charm-k8s-discourse:loop-precompile
Merge into: charm-k8s-discourse:master
Diff against target: 15 lines (+7/-0)
1 file modified
image/scripts/pod_setup (+7/-0)
Reviewer Review Type Date Requested Status
Tom Haddon (community) Approve
🤖 prod-jenkaas-is (community) continuous-integration Approve
Canonical IS Reviewers Pending
Review via email: mp+412557@code.launchpad.net

Commit message

We can't tell from bundler's return code whether it's successfully completed our assets:precompile or not, let's just take the dumb approach for now and run it three times

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :
review: Approve (continuous-integration)
Revision history for this message
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :

A CI job is currently in progress. A follow up comment will be added when it completes.

Revision history for this message
🤖 prod-jenkaas-is (prod-jenkaas-is) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tom Haddon (mthaddon) wrote :

This looks good to land now. It's obviously fairly fragile and we'll want to figure out a way of checking the output rather than just doing it three times, but this will unblock the security update portion of things and we can circle back on making the change more robust.

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 54f81a9eb88a577581877f9e03b447fbee89e882

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/image/scripts/pod_setup b/image/scripts/pod_setup
index d716174..7cb1cb7 100755
--- a/image/scripts/pod_setup
+++ b/image/scripts/pod_setup
@@ -39,3 +39,10 @@ fi
39# It is safe to build assets in the background to improve startup time.39# It is safe to build assets in the background to improve startup time.
40export SKIP_NODE_UGLIFY="true"40export SKIP_NODE_UGLIFY="true"
41su -s /bin/bash -c "bin/bundle exec rake assets:precompile RAILS_ENV=$RAILS_ENV" ${CONTAINER_APP_USERNAME} 2>&1 |sed 's/^/asset-build: /'41su -s /bin/bash -c "bin/bundle exec rake assets:precompile RAILS_ENV=$RAILS_ENV" ${CONTAINER_APP_USERNAME} 2>&1 |sed 's/^/asset-build: /'
42
43# LP#1952681: First run consistently fails to process discourse/tests/theme_qunit_helper JS
44su -s /bin/bash -c "bin/bundle exec rake assets:precompile RAILS_ENV=$RAILS_ENV" ${CONTAINER_APP_USERNAME} 2>&1 |sed 's/^/asset-build-1: /'
45# LP#1952681: Second run consistently fails to process application JS
46su -s /bin/bash -c "bin/bundle exec rake assets:precompile RAILS_ENV=$RAILS_ENV" ${CONTAINER_APP_USERNAME} 2>&1 |sed 's/^/asset-build-2: /'
47# LP#1952681: Third run consistently succeeds
48su -s /bin/bash -c "bin/bundle exec rake assets:precompile RAILS_ENV=$RAILS_ENV" ${CONTAINER_APP_USERNAME} 2>&1 |sed 's/^/asset-build-3: /'

Subscribers

People subscribed via source and target branches