diff --git a/ansible/roles/beacon-node-builds/defaults/main.yml b/ansible/roles/beacon-node-builds/defaults/main.yml index 189f65b..25496da 100644 --- a/ansible/roles/beacon-node-builds/defaults/main.yml +++ b/ansible/roles/beacon-node-builds/defaults/main.yml @@ -3,13 +3,14 @@ beacon_node_builds_user: 'nimbus' beacon_node_builds_group: 'staff' beacon_node_builds_path: '/data/beacon-node-builds' beacon_node_builds_image_name: 'statusteam/nimbus_beacon_node' +beacon_node_builds_days_kept: 3 # Required for pushing the images beacon_node_builds_docker_hub_user: ~ beacon_node_builds_docker_hub_token: ~ # Timers -beacon_node_build_timer_timeout: 3600 +beacon_node_builds_timer_timeout: 3600 beacon_node_builds_branches: [] # - name: 'unstable' diff --git a/ansible/roles/beacon-node-builds/tasks/build.yml b/ansible/roles/beacon-node-builds/tasks/build.yml index 5a24f18..9babe66 100644 --- a/ansible/roles/beacon-node-builds/tasks/build.yml +++ b/ansible/roles/beacon-node-builds/tasks/build.yml @@ -55,6 +55,6 @@ systemd_timer_consul_warning: true systemd_timer_enabled: '{{ item.enabled | default(true) }}' systemd_timer_frequency: '{{ item.frequency | default("daily") }}' - systemd_timer_timeout_sec: '{{ beacon_node_build_timer_timeout }}' + systemd_timer_timeout_sec: '{{ beacon_node_builds_timer_timeout }}' systemd_timer_work_dir: '{{ beacon_node_builds_path }}/{{ item.name }}' systemd_timer_script_path: '{{ beacon_node_builds_path }}/{{ item.name }}/build.sh' diff --git a/ansible/roles/beacon-node-builds/templates/build.sh.j2 b/ansible/roles/beacon-node-builds/templates/build.sh.j2 index 288fccb..ae7551b 100644 --- a/ansible/roles/beacon-node-builds/templates/build.sh.j2 +++ b/ansible/roles/beacon-node-builds/templates/build.sh.j2 @@ -33,7 +33,7 @@ function buildBinaries() { mv "build/nimbus_signing_process" "build/nimbus_signing_process_${COMMIT}" # Delete copies that are older than 7 days - find build -mtime +7 -exec rm '{}' \+ + find build -mtime +{{ beacon_node_builds_days_kept }} -exec rm '{}' \+ } # Adds binary into a simple Alpine image