Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golioth deploy: Auto rollout main release #59

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
# Beta V4 Blueprint
GOLIOTH_BLUEPRINT: 65c3ebd0f4542d968bf23817
GOLIOTH_API_KEY: ${{ secrets.GOLIOTH_API_KEY }}
GOLIOTH_ROLLOUT: true
shell: bash

- name: Upload to Golioth (Release)
Expand All @@ -49,6 +50,7 @@ jobs:
# Production V4 Blueprint
GOLIOTH_BLUEPRINT: 638a8a406a504ec89e7b18ee
GOLIOTH_API_KEY: ${{ secrets.GOLIOTH_API_KEY }}
GOLIOTH_ROLLOUT: false
shell: bash

- name: Upload artifacts
Expand Down
2 changes: 1 addition & 1 deletion modules/ribbit/sensors/battery.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, registry, id, interval=60):
# The read_once method is called every time the sensor is polled.
async def read_once(self):
# Read the two bytes of voltage from the sensor.
bytes = self._i2c.readfrom_mem(self.ADDRESS, self.REG_VCELL, 2)
bytes = self._i2c_bus.readfrom_mem(self.ADDRESS, self.REG_VCELL, 2)
self.voltage = unpack(">H", bytes)[0] * 78.125 / 1_000_000

# The export method is called to get the data from the sensor.
Expand Down
3 changes: 3 additions & 0 deletions tools/upload-to-golioth.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def load_version():

project = os.environ["GOLIOTH_PROJECT"]
blueprint = os.environ["GOLIOTH_BLUEPRINT"]
rollout = os.environ.get("GOLIOTH_ROLLOUT", "false")


req = {
"blueprintId": blueprint,
Expand Down Expand Up @@ -50,6 +52,7 @@ def load_version():
"artifactIds": [
artifact["data"]["id"],
],
"rollout":rollout
}
),
headers={
Expand Down
Loading