From 78ea9dd4eac19e99239e1dfb03732435ebedc084 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Wed, 27 Aug 2025 09:24:53 +0100 Subject: [PATCH] community: Upgrade discourse to v3.5.0. Workaround mail-receiver tests on arm --- cookbooks/community/recipes/default.rb | 5 ++++- .../templates/default/web_only.yml.erb | 17 ++++++++--------- .../integration/community/inspec/docker_spec.rb | 3 +++ 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/cookbooks/community/recipes/default.rb b/cookbooks/community/recipes/default.rb index b6b9855e1..3b2042161 100644 --- a/cookbooks/community/recipes/default.rb +++ b/cookbooks/community/recipes/default.rb @@ -63,7 +63,7 @@ git "/srv/community.openstreetmap.org/docker" do action :sync repository "https://github.com/discourse/discourse_docker.git" # DANGER launch wrapper automatically updates git repo if rebuild method used: https://github.com/discourse/discourse_docker/blob/107ffb40fe8b1ea40e00814468db974a4f3f8e8f/launcher#L799 - revision "072c5260e72198b54afc33185b4a9d1a25dfe216" + revision "bea85a5690baca2acc8ebb8b2f58bf5a49d2e766" user "root" group "root" notifies :run, "notify_group[discourse_container_new_data]" @@ -204,6 +204,7 @@ execute "discourse_container_mail_receiver_bootstrap" do cwd "/srv/community.openstreetmap.org/docker/" user "root" group "root" + not_if { arm? } # Not yet supported on ARM https://github.com/discourse/mail-receiver/pull/28 end execute "discourse_container_mail_receiver_destroy" do @@ -212,6 +213,7 @@ execute "discourse_container_mail_receiver_destroy" do cwd "/srv/community.openstreetmap.org/docker/" user "root" group "root" + not_if { arm? } # Not yet supported on ARM https://github.com/discourse/mail-receiver/pull/28 end execute "discourse_container_mail_receiver_start" do @@ -220,6 +222,7 @@ execute "discourse_container_mail_receiver_start" do cwd "/srv/community.openstreetmap.org/docker/" user "root" group "root" + not_if { arm? } # Not yet supported on ARM https://github.com/discourse/mail-receiver/pull/28 end template "/etc/cron.daily/community-backup" do diff --git a/cookbooks/community/templates/default/web_only.yml.erb b/cookbooks/community/templates/default/web_only.yml.erb index 685727daf..e586d8df0 100644 --- a/cookbooks/community/templates/default/web_only.yml.erb +++ b/cookbooks/community/templates/default/web_only.yml.erb @@ -20,7 +20,7 @@ links: # any extra arguments for Docker? # docker_args: -# Latest Version v3.4.6 +# Latest Version v3.5.0 # Discourse only support tests-passed and stable branches params: version: stable @@ -104,13 +104,13 @@ hooks: - exec: cd: $home/plugins cmd: - - sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-oauth2-basic.git - - sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-solved.git - - sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-reactions.git - - sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-prometheus.git - - sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-translator.git - - sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-saved-searches.git - - sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-post-voting.git + - if [ ! -d discourse-oauth2-basic ]; then sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-oauth2-basic.git; fi + - if [ ! -d discourse-solved ]; then sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-solved.git; fi + - if [ ! -d discourse-reactions ]; then sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-reactions.git; fi + - if [ ! -d discourse-prometheus ]; then sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-prometheus.git; fi + - if [ ! -d discourse-translator ]; then sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-translator.git; fi + - if [ ! -d discourse-saved-searches ]; then sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-saved-searches.git; fi + - if [ ! -d discourse-post-voting ]; then sudo -H -E -u discourse git clone --depth 1 --branch main https://github.com/discourse/discourse-post-voting.git; fi - exec: # Needs to be copied in else builtin git cleanup fails cd: $home @@ -120,7 +120,6 @@ hooks: - file: path: "/etc/nginx/conf.d/outlets/server/25-https-osm-settings.conf" contents: | - ssl_stapling on; resolver <%= @resolvers.join(" ") %>; resolver_timeout 5s; ssl_dhparam /shared/ssl/dhparam.pem; diff --git a/test/integration/community/inspec/docker_spec.rb b/test/integration/community/inspec/docker_spec.rb index 08853dfb4..d55eacceb 100644 --- a/test/integration/community/inspec/docker_spec.rb +++ b/test/integration/community/inspec/docker_spec.rb @@ -12,6 +12,9 @@ describe docker_image("local_discourse/data:latest") do end describe docker_image("local_discourse/mail-receiver:latest") do + before do + skip if os.arch.include?("aarch64") # mail-receiver is not yet supported on ARM + end it { should exist } end -- 2.39.5