Browse Source

Merge branch 'wip-forum' into 'master'

forum: simplify getting the tagged release

See merge request main/infrastructure!411
keep-around/8bb541165e87a151040abbc38438af9e2e86c5db
Loïc Dachary 6 months ago
parent
commit
8bb541165e
  1. 6
      playbooks/forum/roles/discourse/tasks/main.yml
  2. 7
      playbooks/forum/roles/discourse/templates/app.yml.j2
  3. 9
      playbooks/forum/roles/discourse/templates/version.template.yml.j2

6
playbooks/forum/roles/discourse/tasks/main.yml

@ -20,12 +20,6 @@
dest: "/srv/forum/{{ forum_name }}"
become: false
- name: workaround https://meta.discourse.org/t/shallow-git-fetch-regression-in-discourse-docker/172324/16
template:
src: "templates/version.template.yml.j2"
dest: "/srv/forum/{{ forum_name }}/templates/version.template.yml"
become: false
- name: deploy configuration
template:
src: "templates/app.yml.j2"

7
playbooks/forum/roles/discourse/templates/app.yml.j2

@ -1,7 +1,6 @@
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/version.template.yml"
- "templates/web.template.yml"
- "templates/web.ratelimited.template.yml"
# - "templates/web.ssl.template.yml"
@ -13,7 +12,6 @@ expose:
params:
db_default_text_search_config: "pg_catalog.english"
version: {{ forum_discourse_version }}
env:
LANG: en_US.UTF-8
@ -65,6 +63,11 @@ hooks:
{% for plugin in forum_plugins %}
- git clone {{ plugin.url }} {{ plugin.name }} ; cd {{ plugin.name }} ; git checkout {{ plugin.hash }}
{% endfor %}
- exec:
cd: $home
cmd:
- git fetch --depth=1 origin tag {{ forum_discourse_version }} --no-tags
- git checkout {{ forum_discourse_version }}
## Any custom commands to run after building
run:

9
playbooks/forum/roles/discourse/templates/version.template.yml.j2

@ -1,9 +0,0 @@
params:
home: /var/www/discourse
run:
- exec:
cd: $home
hook: code
cmd:
- git fetch --tags
Loading…
Cancel
Save