diff options
| author | Luke Hoersten <[email protected]> | 2026-07-26 16:46:21 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-07-26 16:46:21 -0500 |
| commit | 0dfd81ca1696053b366a39cab02e54205a09fb20 (patch) | |
| tree | cd04171767d232f4a1840ee7abac2b8ded3fde91 /pleroma/build/tasks | |
| parent | 28c1fc8ea39f0fdb244f08f386ed81a2c68c0f5c (diff) | |
Each build role now creates build_work_dir itself and sets its own toolchain's
cache env (GOPATH/GOCACHE/GOMODCACHE, CARGO_HOME, npm cache, MIX/HEX) on its
build tasks, so the roles are self-contained instead of relying on a play-level
environment and pre_task.
Diffstat (limited to 'pleroma/build/tasks')
| -rw-r--r-- | pleroma/build/tasks/main.yaml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pleroma/build/tasks/main.yaml b/pleroma/build/tasks/main.yaml index 704c0a4..200b215 100644 --- a/pleroma/build/tasks/main.yaml +++ b/pleroma/build/tasks/main.yaml @@ -1,5 +1,14 @@ --- +- name: ensure build work dir exists + become: yes + file: + path: "{{build_work_dir}}" + state: "directory" + owner: "{{ansible_user}}" + group: "{{ansible_user}}" + mode: "0755" + - name: install elixir build dependencies become: yes apt: @@ -31,10 +40,17 @@ - name: install hex package manager command: mix local.hex --force + # Keep the mix/hex caches on build_work_dir (the SSD) instead of the SD card. + environment: + MIX_HOME: "{{build_work_dir}}/.mix" + HEX_HOME: "{{build_work_dir}}/.hex" changed_when: false - name: install rebar command: mix local.rebar --force + environment: + MIX_HOME: "{{build_work_dir}}/.mix" + HEX_HOME: "{{build_work_dir}}/.hex" changed_when: false - name: unarchive pleroma source @@ -55,6 +71,8 @@ chdir: "{{pleroma_build_dir}}" environment: MIX_ENV: prod + MIX_HOME: "{{build_work_dir}}/.mix" + HEX_HOME: "{{build_work_dir}}/.hex" when: not build_file.stat.exists - name: build pleroma release @@ -63,6 +81,8 @@ chdir: "{{pleroma_build_dir}}" environment: MIX_ENV: prod + MIX_HOME: "{{build_work_dir}}/.mix" + HEX_HOME: "{{build_work_dir}}/.hex" when: not build_file.stat.exists - name: create build server dir |
