From 9b88c8b29b145f854367bd7ff370baa4c7147dbd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 2 Dec 2021 09:36:01 +0000 Subject: [PATCH] release(prod): Update miner to latest GA 2021.11.30.1 (#286) * fix: revert privileged containers and add rockpi builds - revert privileged containers based on discussion in #253 - add rockpi builds to testnet and production actions using build matrix - with rockpi versions, change the i2c bus to i2c-7 in docker-compose - remove hard coded balena cli version and change to env variable * feat: bump hm-diag for RockPi support bump hm-diag to pull in https://github.com/NebraLtd/hm-diag/pull/238 * fix: bump pktfwd and correct if statements - bump pktfwd to bring in sx1302 fixes - correct if statements in previous commits * add space * fix(diagnostics): expose serial-number By adding /proc to container for /proc/device-tree/serial-number * Added env var DIAGNOSTICS_VERSION to hold hm-diag git hash and updated hm-diag git hash to point to a commit that contains operational /version endpoint * Bumped FIRMWARE_VERSION to 2021.11.26.1 * feat: better detect BT devices and LTE devices * feat: bump gateway-config version * fix: match DIAGNOSTICS_VERSION with latest version * fix: update FIRMWARE_VERSION * feat: remove session bus in diagnostics * Update push-to-prod.yml * Update push-to-testnet.yml * fix: add fail fast false to production add fail fast false * fix: add fail fast false to testnet add fail fast false * fix: temporarily move diagnostics to privileged This is a temporary fix to resolve the issue described in #281 so that @NebraLtd/tech-support can continue testing other recent changes * fix: bump diagnostics to fix rockpi provisioning relates to https://github.com/NebraLtd/hm-diag/pull/260 * Update miner to latest GA 2021.11.30.1 Co-authored-by: Aaron Shaw Co-authored-by: Marvin Arnold Co-authored-by: Kashif Iftikhar Co-authored-by: Kashif Iftikhar Co-authored-by: Zhang Co-authored-by: mr-bump Co-authored-by: Marvin Arnold --- .github/workflows/push-to-prod.yml | 82 ++++++--------------------- .github/workflows/push-to-testnet.yml | 14 ++++- docker-compose.yml | 21 ++++--- 3 files changed, 43 insertions(+), 74 deletions(-) diff --git a/.github/workflows/push-to-prod.yml b/.github/workflows/push-to-prod.yml index 05b33eae..4a76614e 100644 --- a/.github/workflows/push-to-prod.yml +++ b/.github/workflows/push-to-prod.yml @@ -7,77 +7,29 @@ on: - production jobs: - outdoor-868: + build-prod: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sbc: [raspi, rockpi] + frequency: [470, 868, 915] + variant: [indoor, outdoor] steps: - name: Checkout uses: actions/checkout@v2 + - name: Change i2c bus for RockPi + if: matrix.sbc == 'rockpi' + run: | + sed -i -E "s/\/dev\/i2c-1:\/dev\/i2c-1/\/dev\/i2c-7:\/dev\/i2c-7/g" docker-compose.yml + ROCKPI="-rockpi" + echo "ROCKPI=$ROCKPI" >> $GITHUB_ENV - name: Balena Deploy - uses: nebraltd/balena-cli-action@v12.51.1 + uses: nebraltd/balena-cli-action@v12.54.5 if: success() with: balena_api_token: ${{secrets.BALENA_API_TOKEN}} - balena_command: "deploy nebraltd/helium-outdoor-868 --logs --debug --nocache --build" - - indoor-868: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Balena Deploy - uses: nebraltd/balena-cli-action@v12.51.1 - if: success() - with: - balena_api_token: ${{secrets.BALENA_API_TOKEN}} - balena_command: "deploy nebraltd/helium-indoor-868 --logs --debug --nocache --build" - - outdoor-915: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Balena Deploy - uses: nebraltd/balena-cli-action@v12.51.1 - if: success() - with: - balena_api_token: ${{secrets.BALENA_API_TOKEN}} - balena_command: "deploy nebraltd/helium-outdoor-915 --logs --debug --nocache --build" - - indoor-915: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Balena Deploy - uses: nebraltd/balena-cli-action@v12.51.1 - if: success() - with: - balena_api_token: ${{secrets.BALENA_API_TOKEN}} - balena_command: "deploy nebraltd/helium-indoor-915 --logs --debug --nocache --build" - - outdoor-470: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Balena Deploy - uses: nebraltd/balena-cli-action@v12.51.1 - if: success() - with: - balena_api_token: ${{secrets.BALENA_API_TOKEN}} - balena_command: "deploy nebraltd/helium-outdoor-470 --logs --debug --nocache --build" - - indoor-470: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Balena Deploy - uses: nebraltd/balena-cli-action@v12.51.1 - if: success() - with: - balena_api_token: ${{secrets.BALENA_API_TOKEN}} - balena_command: "deploy nebraltd/helium-indoor-470 --logs --debug --nocache --build" + balena_command: "deploy nebraltd/helium-${{ matrix.variant }}-${{ matrix.frequency }}${{ env.ROCKPI }} --logs --debug --nocache --build" open-fleet: runs-on: ubuntu-latest @@ -85,7 +37,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Balena Deploy - uses: nebraltd/balena-cli-action@v12.51.1 + uses: nebraltd/balena-cli-action@v12.54.5 if: success() with: balena_api_token: ${{secrets.BALENA_API_TOKEN}} @@ -97,7 +49,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - name: Balena Deploy - uses: nebraltd/balena-cli-action@v12.51.1 + uses: nebraltd/balena-cli-action@v12.54.5 if: success() with: balena_api_token: ${{secrets.BALENA_API_TOKEN}} diff --git a/.github/workflows/push-to-testnet.yml b/.github/workflows/push-to-testnet.yml index 9fb81a41..8b88814a 100644 --- a/.github/workflows/push-to-testnet.yml +++ b/.github/workflows/push-to-testnet.yml @@ -9,12 +9,22 @@ on: jobs: testnet: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sbc: [raspi, rockpi] steps: - name: Checkout uses: actions/checkout@v2 + - name: Change i2c bus for RockPi + if: matrix.sbc == 'rockpi' + run: | + sed -i -E "s/\/dev\/i2c-1:\/dev\/i2c-1/\/dev\/i2c-7:\/dev\/i2c-7/g" docker-compose.yml + ROCKPI="-rockpi" + echo "ROCKPI=$ROCKPI" >> $GITHUB_ENV - name: Balena Deploy - uses: nebraltd/balena-cli-action@v12.51.1 + uses: nebraltd/balena-cli-action@v12.54.5 if: success() with: balena_api_token: ${{secrets.BALENA_API_TOKEN}} - balena_command: "deploy nebraltd/helium-testnet --logs --debug --nocache --build" + balena_command: "deploy nebraltd/helium-testnet${{ env.ROCKPI }} --logs --debug --nocache --build" diff --git a/docker-compose.yml b/docker-compose.yml index 70a375b6..6f34ea6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,12 +3,12 @@ version: '2' services: gateway-config: - image: nebraltd/hm-config:e0c6f88 + image: nebraltd/hm-config:8cc544f depends_on: - dbus-session - diagnostics environment: - - FIRMWARE_VERSION=2021.11.22.0-1 + - FIRMWARE_VERSION=2021.11.30.1 - DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket - DBUS_SESSION_BUS_ADDRESS=unix:path=/session/dbus/session_bus_socket privileged: true @@ -34,7 +34,7 @@ services: - pktfwdr:/var/pktfwd helium-miner: - image: nebraltd/hm-miner:arm64-d760384 + image: nebraltd/hm-miner:arm64-3565d25 depends_on: - dbus-session - diagnostics @@ -50,16 +50,19 @@ services: - dbus:/session/dbus cap_add: - SYS_RAWIO - privileged: true + devices: + - /dev/i2c-1:/dev/i2c-1 restart: on-failure environment: - DBUS_SYSTEM_BUS_ADDRESS=unix:path=/session/dbus/session_bus_socket - RELEASE_BUMPER=foobar diagnostics: - image: nebraltd/hm-diag:b30bd8a + image: nebraltd/hm-diag:72f141f environment: - - FIRMWARE_VERSION=2021.11.22.0-1 + - FIRMWARE_VERSION=2021.11.30.1 + - DIAGNOSTICS_VERSION=72f141f + - DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket volumes: - pktfwdr:/var/pktfwd - miner-storage:/var/data @@ -67,9 +70,13 @@ services: - "80:5000" cap_add: - SYS_RAWIO + devices: + - /dev/i2c-1:/dev/i2c-1 privileged: true labels: io.balena.features.sysfs: 1 + io.balena.features.procfs: 1 + io.balena.features.dbus: 1 upnp: image: nebraltd/hm-upnp:b575a2f @@ -85,7 +92,7 @@ services: - dbus:/session/dbus environment: - DBUS_ADDRESS=unix:path=/session/dbus/session_bus_socket - - FIRMWARE_VERSION=2021.11.22.0-1 + - FIRMWARE_VERSION=2021.11.30.1 volumes: miner-storage: