From f484a8617f33351a5bad827e6226f9d1b885a432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Sun, 8 Nov 2020 22:50:32 +0100 Subject: [PATCH] beacon-node-builds: add README, remove unused batches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/roles/beacon-node-builds/README.md | 31 +++++++++++++++++++ .../beacon-node-builds/defaults/main.yml | 3 -- .../roles/beacon-node-builds/tasks/build.yml | 1 - .../beacon-node-builds/templates/build.sh.j2 | 1 - 4 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 ansible/roles/beacon-node-builds/README.md diff --git a/ansible/roles/beacon-node-builds/README.md b/ansible/roles/beacon-node-builds/README.md new file mode 100644 index 0000000..3ade9d1 --- /dev/null +++ b/ansible/roles/beacon-node-builds/README.md @@ -0,0 +1,31 @@ +# Description + +This role configures a set of Systemd timers that build configured branches of [nimbus-eth2]() and push the built docker images. + +# Configuration + +The minimal configuration would look something like: +```yaml +# Branch to build and frequency +beacon_node_builds_branches: + - name: 'xyz' + branch: 'feature/xyz' + frequency: '*-*-* 02:00:00' + +# Required to push Docker images +beacon_node_builds_docker_hub_user: 'docker-hub-user' +beacon_node_builds_docker_hub_token: 'super-secret-password' +``` + +# Management + +You can check the status of the timers using: +``` + > sudo systemctl list-timers 'beacon-node-build-*' +NEXT LEFT LAST PASSED UNIT ACTIVATES +Mon 2020-11-09 02:00:00 UTC 4h 12min left Sun 2020-11-08 02:00:01 UTC 19h ago beacon-node-build-master.timer beacon-node-build-master.service +Mon 2020-11-09 10:00:00 UTC 12h left Sun 2020-11-08 10:00:03 UTC 11h ago beacon-node-build-devel.timer beacon-node-build-devel.service +Mon 2020-11-09 18:00:00 UTC 20h left Sun 2020-11-08 18:00:04 UTC 3h 47min ago beacon-node-build-libp2p.timer beacon-node-build-libp2p.service + +3 timers listed. +``` diff --git a/ansible/roles/beacon-node-builds/defaults/main.yml b/ansible/roles/beacon-node-builds/defaults/main.yml index 0639f3b..44df6c7 100644 --- a/ansible/roles/beacon-node-builds/defaults/main.yml +++ b/ansible/roles/beacon-node-builds/defaults/main.yml @@ -14,12 +14,9 @@ beacon_node_builds_branches: - name: 'master' branch: 'master' frequency: '*-*-* 02:00:00' - batches: [ 'a', 'b' ] - name: 'devel' branch: 'devel' frequency: '*-*-* 10:00:00' - batches: [ 'a', 'b' ] - name: 'libp2p' branch: 'nim-libp2p-auto-bump' frequency: '*-*-* 18:00:00' - batches: [ 'a', 'b' ] diff --git a/ansible/roles/beacon-node-builds/tasks/build.yml b/ansible/roles/beacon-node-builds/tasks/build.yml index 5467026..7a2dc47 100644 --- a/ansible/roles/beacon-node-builds/tasks/build.yml +++ b/ansible/roles/beacon-node-builds/tasks/build.yml @@ -40,7 +40,6 @@ group: 'adm' mode: 0644 - - name: Create timer for rebuilding image include_role: name=systemd-timer vars: diff --git a/ansible/roles/beacon-node-builds/templates/build.sh.j2 b/ansible/roles/beacon-node-builds/templates/build.sh.j2 index f914323..5ea4fcd 100644 --- a/ansible/roles/beacon-node-builds/templates/build.sh.j2 +++ b/ansible/roles/beacon-node-builds/templates/build.sh.j2 @@ -9,7 +9,6 @@ if [[ "${USER}" != "{{ beacon_node_builds_user }}" ]]; then fi IMAGE="{{ beacon_node_builds_image_name }}:{{ item.name }}" -BATCHES=({{ item.batches | join(" ") }}) # Build the Beacon node binaries {