From e06026b97c0e8d2099a14a8d37f72c966dae8fad Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Thu, 23 Nov 2023 18:12:37 +0800 Subject: [PATCH] FIX: Install plugin gems in `discourse/discourse_test` image (#758) Why this change? In https://github.com/discourse/discourse/commit/dec68d780c58ef0954865b786d04b653c20e26fa, the `plugin:install_all_gems` Rake task was made a noop because the Rake task itself was flawed and running a Rake task will actually activate all plugins which installs the required gems in the process. However, plugins are not automatically activated in the test environment which this image operates in. As such, we need to set `LOAD_PLUGINS=1` to when running the `plugin:install_all_gems` Rake task. --- image/discourse_test/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image/discourse_test/Dockerfile b/image/discourse_test/Dockerfile index c4f06fc..391b293 100644 --- a/image/discourse_test/Dockerfile +++ b/image/discourse_test/Dockerfile @@ -33,7 +33,7 @@ RUN cd /var/www/discourse &&\ sudo -u discourse yarn cache clean RUN cd /var/www/discourse && sudo -E -u discourse -H bundle exec rake plugin:install_all_official &&\ - sudo -E -u discourse -H bundle exec rake plugin:install_all_gems &&\ + LOAD_PLUGINS=1 sudo -E -u discourse -H bundle exec rake plugin:install_all_gems &&\ sudo -E -u discourse -H bundle exec ruby script/install_minio_binaries.rb ENTRYPOINT ["sudo", "-E", "-u", "discourse", "-H", "ruby", "script/docker_test.rb"] -- 2.25.1