From 8f4d11b317a15922b92bdc9ffa0b5ed4107a76e3 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 11 Apr 2022 12:31:00 +0200 Subject: [PATCH 1/2] Add cron job for deleting repo archives --- site-cookbooks/kosmos_gitea/recipes/default.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/site-cookbooks/kosmos_gitea/recipes/default.rb b/site-cookbooks/kosmos_gitea/recipes/default.rb index 9d334ef..f7f3a62 100644 --- a/site-cookbooks/kosmos_gitea/recipes/default.rb +++ b/site-cookbooks/kosmos_gitea/recipes/default.rb @@ -124,3 +124,10 @@ firewall_rule 'gitea' do protocol :tcp command :allow end + +# Hack-fix until we can disable auto-generation of archives +# TODO https://gitea.kosmos.org/kosmos/chef/issues/395 +cron 'delete auto-generated repo file archives' do + minute '*/15' + command 'rm -rf /var/lib/gitea/data/repo-archive/* >/dev/null 2>&1' +end From 994e5873d6bd32db985cb384fe824351749c4aeb Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Mon, 11 Apr 2022 12:50:44 +0200 Subject: [PATCH 2/2] Upgrade Gitea to 1.16.5 Also add our hack-fix cron job to the recipe, so it doesn't get lost when creating new VMs or otherwise. --- site-cookbooks/kosmos_gitea/attributes/default.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site-cookbooks/kosmos_gitea/attributes/default.rb b/site-cookbooks/kosmos_gitea/attributes/default.rb index 0495d7e..4ee223d 100644 --- a/site-cookbooks/kosmos_gitea/attributes/default.rb +++ b/site-cookbooks/kosmos_gitea/attributes/default.rb @@ -1,7 +1,7 @@ -gitea_version = "1.16.3" +gitea_version = "1.16.5" node.default["kosmos_gitea"]["version"] = gitea_version node.default["kosmos_gitea"]["binary_url"] = "https://dl.gitea.io/gitea/#{gitea_version}/gitea-#{gitea_version}-linux-amd64" -node.default["kosmos_gitea"]["binary_checksum"] = "626c7da554efcfd3abd88b0355e3adf55d7f0941a01e058b2d4f5923d0d5b7c3" +node.default["kosmos_gitea"]["binary_checksum"] = "c0fb4107dc4debf08e6e27fd3383e06dc232ccb410123179c7ae8d7cec60765f" node.default["kosmos_gitea"]["nginx"]["domain"] = "gitea.kosmos.org" node.default["kosmos_gitea"]["working_directory"] = "/var/lib/gitea" node.default["kosmos_gitea"]["port"] = 3000