Skip to content

Commit

Permalink
Move FASTBuild trimming task to ableton.fastbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
nre-ableton authored and ablbot committed Mar 5, 2021
1 parent 1a12479 commit e5fe43f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ fastbuild_cache_dir: C:\fbuild
# User who will own the FASTBuild configuration directory.
fastbuild_cache_owner: "jenkins"

# If true, then add a scheduled task to regularly trim the cache.
fastbuild_cache_schedule_trim: true

# How large the FASTBuild cache should be trimmed to (requires
# fastbuild_cache_schedule_trim to be true).
fastbuild_cache_trim_size_mb: 1024

# Version of FASTBuild to install.
fastbuild_version: "1.00"

Expand Down
14 changes: 14 additions & 0 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,17 @@
name: "FASTBUILD_CACHE_PATH"
value: "{{ fastbuild_cache_dir }}"
level: machine

- name: Add scheduled task to trim FASTBuild cache
win_scheduled_task:
name: "Trim FASTBuild cache"
username: "{{ fastbuild_cache_owner }}"
actions:
- path: "{{ fastbuild_path_win }}\\FBuild.exe"
arguments: "-cachetrim {{ fastbuild_cache_trim_size_mb }}"
triggers:
- type: daily
# This attribute is required by Ansible, but not really necessary for daily tasks.
# Hence, we choose a date far in the past.
start_boundary: "2000-01-01T00:00:00"
when: fastbuild_cache_schedule_trim

0 comments on commit e5fe43f

Please sign in to comment.